Exception when refreshing catelogs in designer

Posts   
 
    
Barry
User
Posts: 232
Joined: 17-Aug-2005
# Posted on: 31-Jul-2006 05:20:44   

I've removed a table in database, and the designer (build July 24th) throw an exception when I refresh the project.


Internal Argument Error Exception occured in: EntityContainer.Remove for argument definitionToRemove: Target of entity 'SD.LLBLGen.Pro.ApplicationCore.Entities.EntityDefinition', 'XXX' isn't part of this project.
Parameter name: definitionToRemove

-----[Core exception]--------------------
   at SD.LLBLGen.Pro.ApplicationCore.Entities.EntityContainer.Remove(EntityDefinition definitionToRemove)
   at SD.LLBLGen.Pro.ApplicationCore.CatalogRefresher.MigrateEntities()
   at SD.LLBLGen.Pro.ApplicationCore.CatalogRefresher.MigrateProjectToNewCatalog(Boolean isUnattended, SelectTargetsForOrphanedElementsCallBack targetSelectCallBack)
   at SD.LLBLGen.Pro.Gui.Forms.MainWindow.RefreshCatalogs(Boolean unattended, Hashtable catalogsToRefresh)
   at SD.LLBLGen.Pro.Gui.Forms.MainWindow.RefreshAllCatalogs(Boolean unattended)
   at SD.LLBLGen.Pro.Gui.Forms.MainWindow.OnProjectExplorerCatalogsRefreshClicked(Object sender, CatalogRefreshEventArgs e)
   at SD.LLBLGen.Pro.Gui.Forms.ProjectExplorer._menuItemCatalogsRefresh_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Walaa avatar
Walaa
Support Team
Posts: 14952
Joined: 21-Aug-2005
# Posted on: 31-Jul-2006 07:08:44   

Refering to the following threads: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=5465 http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=5172

Would you please e-mail us (support AT llblgen.com) the lgp file with the SQL DDL to try to reproduce it?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39621
Joined: 17-Aug-2003
# Posted on: 31-Jul-2006 09:10:57   

I've received the email, thanks Barry. I'll look into it.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39621
Joined: 17-Aug-2003
# Posted on: 31-Jul-2006 15:51:11   

Reproduced

(edit): caused by the fact there are two catalogs in the project and orphaned entities in the SECOND catalog to process. This triggers a bug in the Remove code of an entity. The refresher does: - remove all entity -> target relations in the entitiescontainer - per catalog: --- add new entity -> target bindings --- if an entity is orphaned, it's removed. It then tests if there are bindings in the bindingslist. If that's the case, it thinks it's not called by the refresher and does these internal checks. However, you already see this coming: if the SECOND catalog is processed, there are already entities in the bindingslist, which thus causes the remove routine to do the checks. poof

Great huh, internal error checks which bug flushed .

(edit) fixed it. Fixed in next build. This build is available later today.

Frans Bouma | Lead developer LLBLGen Pro