Bill Cunnien
|
|
Group: Forum Members
Posts: 785,
Visits: 3.6K
|
I decided to edit one of the offending windows: Inventory Adjustments. When I opened the form in the designer I got this error: Object of type 'Aspire.Model.InventoryTransactionsBO' cannot be converted to type 'MicroFour.StrataFrame.Business.BusinessLayer'. All three BOs on the form kicked out the same error. So, I took a look at the BO. It's class is defined as follows: public partial class InventoryTransactionsBO : MicroFour.StrataFrame.Business.BusinessLayer All looks well there. I have done the rebuild all in the BOM (several times). I will do it again; however, I am suspecting it will do nothing to change things. Also, I will exit VS2008 and start again. Sometimes, that can be a help. I'll keep at it.
|
|
|
Bill Cunnien
|
|
Group: Forum Members
Posts: 785,
Visits: 3.6K
|
I opened the source code in VS2008 and built the solution. No errors. I ran the application and I am still getting the same error. The dispose override looks like this: Protected Overrides Sub Dispose(ByVal disposing As Boolean)
'-- Dispose of the internal list of business objects when done and clear
' the references to the pieces
If disposing Then
If Me._BusinessObjectList IsNot Nothing Then
For Each bo As BusinessLayer In Me._BusinessObjectList.Values
bo.Dispose()
Next
Me._BusinessObjectList.Clear()
End If
'-- Remove the reference to the business object
If Me._BusinessObject IsNot Nothing Then
Me.RemoveBOHandlers()
Me._BusinessObject = Nothing
Me._BusinessObject_CurrentView = Nothing
End If
End If
'-- Base call
MyBase.Dispose(disposing)
End Sub Should I just add a try/catch block and handle the exception myself? I am running totally out of ideas on this.
|
|
|
Bill Cunnien
|
|
Group: Forum Members
Posts: 785,
Visits: 3.6K
|
1.6.7 was available. I hit the link to download, but I left the window open too long so my session timed out. I logged back on and 1.6.7 was gone. 1.7.0 has been released. Ok. Cool. I downloaded it and the source code. Installed both. Updated the Inherited UI with DevEx 9.1.5. Rebuilt all business objects. Ran the application and
WHAM!
Same error.
Message: The given key was not present in the dictionary.
Source: mscorlib
Inner Exception:
Stack Trace: at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at MicroFour.StrataFrame.Business.BusinessLayer.SharedDataTableCollection.get_Item(String SharedTableKey)
at MicroFour.StrataFrame.Business.BusinessLayer.get__CurrentDataTable(Boolean IsSharedTable)
at MicroFour.StrataFrame.Business.BusinessLayer.get__CurrentDataTable()
at MicroFour.StrataFrame.Business.BusinessLayer.get_CurrentView()
at MicroFour.StrataFrame.Business.BusinessBindingSource.RemoveBOHandlers()
at MicroFour.StrataFrame.Business.BusinessBindingSource.Dispose(Boolean disposing)
at System.ComponentModel.Component.Dispose()
at System.ComponentModel.Container.Dispose(Boolean disposing)
at System.ComponentModel.Container.Dispose()
at Aspire.Production.InventoryAdjustments.Dispose(Boolean disposing) in C:\Aspire Projects\AspireSF\Production\InventoryAdjustments.Designer.cs:line 12
at System.ComponentModel.Component.Dispose()
at System.Windows.Forms.Form.WmClose(Message& m)
at System.Windows.Forms.Form.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)
I am now going on two days trying to fix this. Does anyone have any idea how to repair this problem? Other than getting rid of all Business Binding Sources?!?
Thanks!
Bill
P.S. I am actually getting a bit desperate. My manager is quite annoyed that I spent two full days trying to repair this issue. I have some serious updates to release, but I am stuck. Should I go back to 1.6.6?
|
|
|
Bill Cunnien
|
|
Group: Forum Members
Posts: 785,
Visits: 3.6K
|
Since I have only one major active project at the moment, I decided to uninstall all DevExpress versions and reinstall the latest version, 9.1.5. The installation went without a hitch. I ran the conversion tool on my project and I edited the Inherited UI project. It built with no errors. I then went into my Subclass project and updated its references to the new DevEx version. It rebuilt without incident (after deleting the licenses.licx file). Then, I rebuilt my main project. I ran it...opened a window with a DevEx grid filled by a sproc (no BOs) and it closes without any problem. I open a window with a DevEx grid filled via a BBS and a BO and the data looks good; however, when I close it, I still get the same KeyNotFoundException.
So, reinstalling and upgrading the DevEx controls did not solve the problem. Next, I will uninstall the StrataFrame application and try reinstalling the most recent version, 1.6.7.
(fingers crossed)
|
|
|
Bill Cunnien
|
|
Group: Forum Members
Posts: 785,
Visits: 3.6K
|
A bit more info...I blew away the BOs on a specific window that was generating this error. I replaced them with a DataSet generated by a stored procedure. The window works great. No error. So, the conclusion is that the BOs have something different about them that is causing this error to occur. I will try to rebuild all of the BOs in the BOM; however, I did this already. Maybe something didn't stick properly.
|
|
|
Bill Cunnien
|
|
Group: Forum Members
Posts: 785,
Visits: 3.6K
|
Here are the exception details (if they help):
System.Collections.Generic.KeyNotFoundException was unhandled by user code
Message="The given key was not present in the dictionary."
Source="mscorlib"
StackTrace:
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at MicroFour.StrataFrame.Business.BusinessLayer.get__CurrentDataTable(Boolean IsSharedTable)
at MicroFour.StrataFrame.Business.BusinessBindingSource.RemoveBOHandlers()
at MicroFour.StrataFrame.Business.BusinessBindingSource.Dispose(Boolean disposing)
at System.ComponentModel.Component.Dispose()
at System.ComponentModel.Container.Dispose(Boolean disposing)
at System.ComponentModel.Container.Dispose()
at Aspire.Production.ProductionRequirements.Dispose(Boolean disposing) in C:\Aspire Projects\AspireSF\Production\ProductionRequirements.Designer.cs:line 18
at System.ComponentModel.Component.Dispose()
at System.Windows.Forms.Form.WmClose(Message& m)
at System.Windows.Forms.Form.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)
InnerException:
|
|
|
Bill Cunnien
|
|
Group: Forum Members
Posts: 785,
Visits: 3.6K
|
For what it's worth, I just updated to 1.6.7. I was testing a window for an entirely different reason and received the same error mentioned above. I am getting the error on other windows that have the DevEx Grid, too. Has this been resolved? Is there an easy fix to it all?
I have several updates ready to be released, but I am on hold because of this issue.
Thanks,
Bill
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
The BBS did change as there was a memory leak. The memory leak ensures that the internal objects are disposed of...so there was actually a leak. I will see if I can reproduce the exception.
|
|
|
Edhy Rijo
|
|
Group: StrataFrame Users
Posts: 2.4K,
Visits: 23K
|
Hi Larry, My guess is that something changed in the BBS which may be causing this behavior.
Edhy Rijo
|
|
|
Larry Caylor
|
|
Group: Awaiting Activation
Posts: 592,
Visits: 3.7K
|
I just ran into the same issue after upgrading an existing application to v 1.6.7. I'm using the Infragistics grid. The workaround of unbinding the grid/s from the datasource works but something in the new version of SF introduced this since the app has worked perfectly for months on the previous version of SF.
|
|
|