[v5111] access violations at end of program when using NxDbGrid
Posted 21 February 2011 - 11:56 AM
One thing I noticed while debugging is that the inplace-editor I had assigned to that column got destroyed before the column itself.
It's as if having assigned an inplace-editor to the grid is enough to cause problems.
It might be important to know that I have all added columns design-time and that I am not relying on the 'auto-create'-column feature of the grid.
Also AlphaSkins-component is used to provide a skin.
I've had no luck in creating the same situation in a demo-program.
Posted 21 February 2011 - 07:56 PM
Do you maybe accessing to InplaceEditor after column is destroyed?
First InplaceEditor is destroyed, and then Column (Since column have InplaceEditor).
If you can somehow create small demo project this will help.
BergSoft Home Page: www.bergsoft.net
Members Section: bms.bergsoft.net
Articles and Tutorials: dn.bergsoft.net (Developers Network)
BergSoft Facebook page
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
Posted 22 February 2011 - 11:14 AM
I am not accessing the inplaceEditor in any part of my code as far as I know.
I did notice that the destructor for the edit-controls I am using got called before the grid itself was destroyed, so the columns couldn't destroy the editors even if they wanted to.
However the exception itself appears to be caused by the code trying to free the standard editor that is already assigned to one of the virtual-columns we're using.
Removing those columns from the grid appears to get rid of the error.
-- edit --
I didn't use Editor directly, but I did notice I had referenced it during the construction of the columns in order to try and set autocomplete property.
As such I'm not sure why this could cause an access violation during destruction of the grids and why not every grid was affected in the same way (all three had virtual columns, only one appeared to cause the error).
Posted 25 February 2011 - 10:48 AM
The column just happened to be a TNxVirtualColumn.
As the NextDbGrid.Columns property only is supposed to have TNxDbCustomColumns there are going to be issues if the grid has one or more columns of TNxVirtualColumn.
I guess we do need a proper VirtualColumn (TNxDbVirtualColumn perhaps?) for use in NextDbGrids to solve this.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users