StrataFrame Forum

Error when add new

http://forum.strataframe.net/Topic22467.aspx

By ChanKK - 3/25/2009

Hi,

When I try to add new row, it hit the error below. It only happens with the Business.dll that fix the memory leak problem. Please advice. Thank you



[NullReferenceException: Object reference not set to an instance of an object.]

MicroFour.StrataFrame.Business.BusinessBindingSource.BusinessObject_CurrentView_ListChanged(Object sender, ListChangedEventArgs e) +30

System.ComponentModel.ListChangedEventHandler.Invoke(Object sender, ListChangedEventArgs e) +0

System.Data.DataView.OnListChanged(ListChangedEventArgs e) +356

System.Data.DataView.IndexListChanged(Object sender, ListChangedEventArgs e) +27

System.Data.DataView.IndexListChangedInternal(ListChangedEventArgs e) +75

System.Data.DataViewListener.IndexListChanged(ListChangedEventArgs e) +60

System.Data.Index.b__2(DataViewListener listener, ListChangedEventArgs args, Boolean arg2, Boolean arg3) +6

System.Data.Listeners`1.Notify(T1 arg1, T2 arg2, T3 arg3, Action`4 action) +149

System.Data.Index.OnListChanged(ListChangedEventArgs e) +164

System.Data.Index.OnListChanged(ListChangedType changedType, Int32 newIndex, Int32 oldIndex) +57

System.Data.Index.RecordStateChanged(Int32 oldRecord, DataViewRowState oldOldState, DataViewRowState oldNewState, Int32 newRecord, DataViewRowState newOldState, DataViewRowState newNewState) +230

System.Data.DataTable.RecordStateChanged(Int32 record1, DataViewRowState oldState1, DataViewRowState newState1, Int32 record2, DataViewRowState oldState2, DataViewRowState newState2) +151

System.Data.DataTable.SetNewRecordWorker(DataRow row, Int32 proposedRecord, DataRowAction action, Boolean isInMerge, Int32 position, Boolean fireEvent, Exception& deferredException) +4818040

System.Data.DataTable.SetNewRecord(DataRow row, Int32 proposedRecord, DataRowAction action, Boolean isInMerge, Boolean fireEvent) +40

System.Data.DataRow.SetNewRecord(Int32 record) +21

System.Data.DataRow.EndEdit() +4816925

System.Data.DataRow.set_Item(DataColumn column, Object value) +338

System.Data.DataRow.set_Item(String columnName, Object value) +24

MicroFour.StrataFrame.Data.DataBasics.InitializeNewRow(DataRow NewDataRow, StringCollection IgnoredFields, Dictionary`2 FieldNativeTypes) +231

MicroFour.StrataFrame.Business.BusinessLayer.NewRow() +529

MicroFour.StrataFrame.Business.BusinessLayer.Add(Boolean CheckSecurity) +127

Vfs.Generic.UI.Web.Strataframe.Forms.DataEntryBasePage.Add(Boolean checkSecurity) +34

Vfs.Generic.UI.Web.ExtendedControls.MaintenanceToolbar.HandleMenuItemClick(Object source, MenuItemEventArgs e) +471

DevExpress.Web.ASPxMenu.ASPxMenuBase.OnItemClick(MenuItemEventArgs e) +78

DevExpress.Web.ASPxMenu.ASPxMenuBase.RaisePostBackEvent(String eventArgument) +326

DevExpress.Web.ASPxClasses.ASPxWebControl.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10

System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13

System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565



By Trent L. Taylor - 3/26/2009

How are you adding a new record?  Is this in a grid?  Can you provide more detail plase?
By ChanKK - 3/26/2009

Hi,

No, it is not adding in grid. However, I have grid that bind to same BO in same aspx which another tab.

I have 2 tab pages, 1st tab page contains grid is to allow user to select/filter record. User can click a link in column to show record details. once clicked, it will switch to data entry page to show record details using AJAX UpdatePanel. After that, user click on new button to add new record, aspx is postback and error posted occurred. Also FYI, this was working all the time before using the fix memory leak business dll.



Please advice. Thank you
By Trent L. Taylor - 3/27/2009

The one thing that is common, even for me, is to go after a new release when something begins to fail.  However, the change that we made has nothing to do with an add in any way.  We changed the enumerator which is only used in two places in the framework.  1.) When using a BO through a BBS or WBBS 2.) When using the GetEnumumerator() on the BO.  Neither of these have anything to do with adding a new record.

Additionally, we have actually pushed this release out into the field on our medical product and there are no issues, especially in this area. 

At this point, the only thing I can recommend is a sample that reproduces the error.  You can change the sample that you sent previously with this change.  But adding a new record and the change we made should not have anything to do with each other.

By ChanKK - 3/29/2009

Hi,

Sorry, it is my mistake. It is working fine at this moment after I replaced the latest Business.dll.



Thank you