Seems the item number if way off, and wxobj is a null pointer. I don't know if I'm doing something wrong or not.
When running the ListCtrl sample, the arguments given to staticOnGetItemText look correct, but it crashes in some unidentifiable place inside that function.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Virtual list control test
Logged In: YES
user_id=1038085
Originator: YES
Using wxD 0.11, wxWidgets 2.6.4, latest stable dmc, dmd 1.022, bud 3.04, on winxp.
I get an access violation at line 456 of wx/ListCtrl.d when trying to use a virtual list control. A minimal test app is attached. Build command:
bud virtualtest.d -clean -gui -debug -g -Xphobos -version=__WXMSW__ -version=ANSI wxd.lib wxc.lib wxbase26d.lib wxmsw26d_core.lib wxmsw26d_adv.lib wxmsw26d_html.lib wxbase26d_xml.lib wxmsw26d_xrc.lib wxexpatd.lib wxjpegd.lib wxpngd.lib wxtiffd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib odbc32.lib
The same thing happens when running the wxD ListCtrl sample, and I try to switch to a virtual list control.
I set a breakpoint at line 456 in wx/ListCtrl.d when running my test app, and looked at the arguments that staticOnGetItemText receives (using ddbg):
---
Breakpoint 0 hit at c:\prog\dmd\import\wx\ListCtrl.d:456 0x430a6f thread(2144)
return obj.OnGetItemText(item, column);
->lsv
Scope: extern (C) char[] wx.ListCtrl.ListCtrl.staticOnGetItemText(class wx.ListC
trl.ListCtrl, int, int)
column = 0
item = 25173440
obj = ...
->= obj
{
wx.Control.Control = {
wx.Window.Window = {
wx.EvtHandler.EvtHandler = {
wx.wxObject.wxObject = {
wx.common.IDisposable = {},
wxobj = 0x00000000,
memOwn = true
},
listeners = ...,
data = ...
}
}
}
}
->= cast(int)obj
1235792
->
---
Seems the item number if way off, and wxobj is a null pointer. I don't know if I'm doing something wrong or not.
When running the ListCtrl sample, the arguments given to staticOnGetItemText look correct, but it crashes in some unidentifiable place inside that function.