Fri 15 Sep 2006 02:27:04 PM UTC, original submission:
If I change 'xml_notebook.xrc' this way:
+ <!-- comment -->
<?xml version="1.0" encoding="ISO-8859-1"?>
(adding a comment on the first line, where none is allowed)
then the program segfaults. I agree that this invalid '.xrc'
file should be rejected, but think a segfault is too extreme.
I'm using a 2006-06-05 snapshot of wxmsw, so it's possible
that this has been corrected in wx-2.7 . Of course, it's also
possible that it's an lmi-specific error, though that would
not be my initial guess.
Steps to reproduce:
Build with the above change.
Run 'lmi_wx_shared.exe' under msw.
Click 'OK' on the messagebox that says
Unable to load xml resources.
[file C:/lmi/src/lmi/main_wx.cpp, line 442]
Click 'Details' on the subsequent messagebox that says
Cannot load resources from file \
'file:/C%3A/opt/lmi/data/xml_notebook.xrc'.
Then it crashes. If I click 'OK' instead of 'Details'
on the last messagebox, then it terminates normally.
Here is the beginning of a report from a JIT debugger
(I can post the whole stack trace if that's helpful):
lmi_wx_shared.exe caused an Access Violation at location 101a1269 in module wxmsw270_gcc_342.dll Reading from location 00000000.
Call stack:
AddrPC AddrReturn AddrFrame AddrStack Params
101A1269 0041E2B0 0022F378 0022F360 00000000 FFFFFFFF FFFFFFFF 77D6CC9A
101A1269 wxmsw270_gcc_342.dll:101A1269 _ZNK12wxDocManager18GetCurrentDocumentEv docview.cpp:1404
...
wxDocument *wxDocManager::GetCurrentDocument() const
{
> wxView *view = GetCurrentView();
if (view)
return view->GetDocument();
|