Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Bugs & Issues> Getting error when refreshing database model
 

Pages: 1
Bugs & Issues
Getting error when refreshing database model
Page:1/1 

  Print all messages in this thread  
Poster Message
WayneBrantley
User



Location:
USA
Joined on:
10-Mar-2006 16:20:08
Posted:
1112 posts
# Posted on: 01-Mar-2014 18:59:50.  
Open existing 3.5 project, refresh catalog and everything works fine.
Open that same project in 4.1 and get the exception below. (So, no changes were made to catalog as I try to refresh after just having refreshed from 3.5) I noticed there were several people with this exception in prior versions, so I suspect something similar - or one of your changes to how this code works did not make it to 4.1. Is there something in the model that I should look for?

Exception information.
=============================================================
LLBLGen Pro version: v4.1. Build: November 26th, 2013

Exception details:
=====================
Message: Object reference not set to an instance of an object.
Source: SD.LLBLGen.Pro.ApplicationCore
Stack trace:
at SD.LLBLGen.Pro.ApplicationCore.ProjectClasses.Project.MigrateRelationshipsAndUniqueConstraints(String driverID, UserConfiguration preferences, IEnumerable`1 populatedCatalogs, Dictionary`2 beforeRefreshRelationshipsToMetaDataElements, LogNode parentLogNode)
at SD.LLBLGen.Pro.ApplicationCore.MetaData.DatabaseMetaData.RefreshMetaData(IEnumerable`1 populatedCatalogs, LogNode refreshLogNode, Project containingProject, UserConfiguration preferences)
at SD.LLBLGen.Pro.ApplicationCore.MetaData.MetaDataStore.RefreshMetaData(String driverID, IEnumerable`1 populatedCatalogs, Project containingProject, UserConfiguration preferences)
at SD.LLBLGen.Pro.ApplicationCore.ProjectClasses.Project.RefreshMetaData(String driverID, List`1 populatedCatalogs, UserConfiguration preferences)
at SD.LLBLGen.Pro.Gui.Classes.GuiController.PerformRefreshMetaDataAction(String driverID)
at SD.LLBLGen.Pro.Gui.Controls.CatalogExplorer._commandManager_CommandClick(Object sender, CommandEventArgs e)
at Janus.Windows.UI.Internal.JNSAU.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at Janus.Windows.UI.Internal.JNSAU.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Inner exception: <null>
SelfServicing, .Net 4.5, Web Applications, SqlServer 2014  Top
WayneBrantley
User



Location:
USA
Joined on:
10-Mar-2006 16:20:08
Posted:
1112 posts
# Posted on: 01-Mar-2014 19:06:21.  
Realized I did not have the latest designer installed....so I did and that did not seem to matter (did not think it would a nothing in release notes)..

Exception information.
=============================================================
LLBLGen Pro version: v4.1. Build: January 16th, 2014

Exception details:
=====================
Message: Object reference not set to an instance of an object.
Source: SD.LLBLGen.Pro.ApplicationCore
Stack trace:
at SD.LLBLGen.Pro.ApplicationCore.ProjectClasses.Project.MigrateRelationshipsAndUniqueConstraints(String driverID, UserConfiguration preferences, IEnumerable`1 populatedCatalogs, Dictionary`2 beforeRefreshRelationshipsToMetaDataElements, LogNode parentLogNode)
at SD.LLBLGen.Pro.ApplicationCore.MetaData.DatabaseMetaData.RefreshMetaData(IEnumerable`1 populatedCatalogs, LogNode refreshLogNode, Project containingProject, UserConfiguration preferences)
at SD.LLBLGen.Pro.ApplicationCore.MetaData.MetaDataStore.RefreshMetaData(String driverID, IEnumerable`1 populatedCatalogs, Project containingProject, UserConfiguration preferences)
at SD.LLBLGen.Pro.ApplicationCore.ProjectClasses.Project.RefreshMetaData(String driverID, List`1 populatedCatalogs, UserConfiguration preferences)
at SD.LLBLGen.Pro.Gui.Classes.GuiController.PerformRefreshMetaDataAction(String driverID)
at SD.LLBLGen.Pro.Gui.Controls.CatalogExplorer._commandManager_CommandClick(Object sender, CommandEventArgs e)
at Janus.Windows.UI.Internal.JNSAU.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at Janus.Windows.UI.Internal.JNSAU.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Inner exception: <null>


SelfServicing, .Net 4.5, Web Applications, SqlServer 2014  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37561 posts
# Posted on: 02-Mar-2014 10:51:25.  
I've attached the .pdb of the applicationcore assembly so line numbers are present in the exception. Could you place this pdb in the llblgen pro folder and retry, so we get a line number where the exception took place?
Removed. Didn't work
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
WayneBrantley
User



Location:
USA
Joined on:
10-Mar-2006 16:20:08
Posted:
1112 posts
# Posted on: 03-Mar-2014 01:58:22. Goto attachments  
I 'unblocked' the file.
I put it in my "program files (x86)/solutions design/llblgen pro v4.1" folder.
I ran it, got exception, no line numbers.
I then ran it as admin, got exception, no line numbers.

Am I missing something here?
Screenshot attached.


SelfServicing, .Net 4.5, Web Applications, SqlServer 2014  Top
daelmo
Support Team



Location:
Guatemala City
Joined on:
28-Nov-2005 23:35:24
Posted:
8076 posts
# Posted on: 03-Mar-2014 05:30:07.  
WayneBrantley wrote:
I put it in my "program files (x86)/solutions design/llblgen pro v4.1" folder.
I ran it, got exception, no line numbers.
I then ran it as admin, got exception, no line numbers.

I think it should work. Do you mind opening a HelpDesk thread (private) and attach your .llblgenproj file?
David Elizondo
LLBLGen'ing (articles and code snippets) | linkedin | twitter
 
Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37561 posts
# Posted on: 03-Mar-2014 10:26:17.  
It should work indeed, but just in case, I have added a debug build of applicationcore with pdb. Please overwrite BOTH files, the pdb I attached earlier is not usable with this debug build, use the two files in the zip attached to this post.

outdated, removed.


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
WayneBrantley
User



Location:
USA
Joined on:
10-Mar-2006 16:20:08
Posted:
1112 posts
# Posted on: 03-Mar-2014 14:40:44.  
That worked:

Quote:
Exception information.
=============================================================
LLBLGen Pro version: v4.1. Build: January 16th, 2014

Exception details:
=====================
Message: Object reference not set to an instance of an object.
Source: SD.LLBLGen.Pro.ApplicationCore
Stack trace:
at SD.LLBLGen.Pro.ApplicationCore.ProjectClasses.Project.MigrateRelationshipsAndUniqueConstraints(String driverID, UserConfiguration preferences, IEnumerable`1 populatedCatalogs, Dictionary`2 beforeRefreshRelationshipsToMetaDataElements, LogNode parentLogNode) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v4.1\Designer 4.1\ApplicationCore\ProjectClasses\Project.cs:line 4743
at SD.LLBLGen.Pro.ApplicationCore.MetaData.DatabaseMetaData.RefreshMetaData(IEnumerable`1 populatedCatalogs, LogNode refreshLogNode, Project containingProject, UserConfiguration preferences) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v4.1\Designer 4.1\ApplicationCore\MetaData\DatabaseMetaData.cs:line 470
at SD.LLBLGen.Pro.ApplicationCore.MetaData.MetaDataStore.RefreshMetaData(String driverID, IEnumerable`1 populatedCatalogs, Project containingProject, UserConfiguration preferences) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v4.1\Designer 4.1\ApplicationCore\MetaData\MetaDataStore.cs:line 239
at SD.LLBLGen.Pro.ApplicationCore.ProjectClasses.Project.RefreshMetaData(String driverID, List`1 populatedCatalogs, UserConfiguration preferences) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v4.1\Designer 4.1\ApplicationCore\ProjectClasses\Project.cs:line 1224
at SD.LLBLGen.Pro.Gui.Classes.GuiController.PerformRefreshMetaDataAction(String driverID)
at SD.LLBLGen.Pro.Gui.Controls.CatalogExplorer._commandManager_CommandClick(Object sender, CommandEventArgs e)
at Janus.Windows.UI.Internal.JNSAU.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at Janus.Windows.UI.Internal.JNSAU.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Inner exception: <null>
SelfServicing, .Net 4.5, Web Applications, SqlServer 2014  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37561 posts
# Posted on: 03-Mar-2014 15:29:14.  
It seems this can only happen if a relationship lost its backing FK. It didn't happen in v3, as the error happens in cascade rule checks. They don't anticipate on a null for the FK. I'll correct this and will upload a new debug build for you to test.

(edit) It likely occurs in the situation where an FK + UC are present, and now only the UC is present, the FK is removed. Is that correct?


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37561 posts
# Posted on: 03-Mar-2014 15:33:19.  
Please use the attached applicationcore assemblies to see whether the issue has been fixed. You have to refresh the catalog to hit the code which bugged. If it doesn't fix it, please let me know.

Outdated.
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
WayneBrantley
User



Location:
USA
Joined on:
10-Mar-2006 16:20:08
Posted:
1112 posts
# Posted on: 03-Mar-2014 15:37:28.  
Yes, that fixed it.
Am I all set?


SelfServicing, .Net 4.5, Web Applications, SqlServer 2014  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37561 posts
# Posted on: 03-Mar-2014 15:50:10.  
I indeed could reproduce it with that scenario: FK+UC forming 1:1 relationship, UC is kept, FK is dropped, refresh, crash. Embarrassed

It's not fixed in full though. Some changes are pending which isn't correct, and it doesn't pick up the UC.

(edit). My bad. I kept the relationship due to settings, Testing the final bits, please hold on a moment.
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37561 posts
# Posted on: 03-Mar-2014 15:58:52.  
There's still a bug. The relationship in the model isn't removed, while the UC isn't added as a UC to the entity.

Looking into this.


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37561 posts
# Posted on: 03-Mar-2014 16:07:06. Goto attachments  
NOW it's fixed. The original issue was somewhere else: if an FK+UC combination lost its FK, it was still marked as a target for an existing model relationship which caused a problem as the FK value was null. As the FK was gone, there's no relationship backing anymore so the relationship should be removed. It now does so, and also re-adds the UC to the entity. The fix I added to the code where the crash happens is then no longer necessary.

I attached a release build for you.
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
WayneBrantley
User



Location:
USA
Joined on:
10-Mar-2006 16:20:08
Posted:
1112 posts
# Posted on: 03-Mar-2014 16:12:52.  
Yes, it works and thanks again.

SelfServicing, .Net 4.5, Web Applications, SqlServer 2014  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.