Деян Хаджиев
2014-05-14 12:55:58 UTC
Hi,
I have an application with a lot of dynamic content, which gets destroyed
and created on user actions. The application is working OK with wxCarbon
2.8.12 and wxCocoa 2.9.5, but when I tried with wxCocoa 3.0 and 3.1 the
application started crashing. I tried to find out what was causing the
crashes and I think that some destroyed object somehow is still being
accessed from the event loop for handling mouse events. I'm almost certain
of this because I tried to remove all Destroy() functions I call and the
crashes stopped. Prior to that I just tried to remove all dynamic handler
connections I make (with the Connect(..) function) but that didn't have any
effect.
I provide a stack frame from the crashes. Although the crash occurred at
different places the stack frame until the wxWidgetCocoaImpl::mouseEvent()
is always the same (including the mouseEvent()).
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x0000000000000000
0x0000000100145d07 in wxWidgetCocoaImpl::mouseEvent () at dialog.h:72
72 virtual void ModalFinishedCallback(void* WXUNUSED(panel), int
WXUNUSED(returnCode)) {}
(gdb) bt
#0 0x0000000100145d07 in wxWidgetCocoaImpl::mouseEvent () at dialog.h:72
#1 0x00007fff81aad3a7 in -[NSWindow sendEvent:] ()
#2 0x000000010013138c in -[wxNSWindow sendEvent:] () at dialog.h:72
#3 0x00007fff819e2afa in -[NSApplication sendEvent:] ()
#4 0x000000010008e97a in -[wxNSApplication sendEvent:] () at event.h:1911
#5 0x00007fff819796de in -[NSApplication run] ()
#6 0x0000000100123cd8 in wxGUIEventLoop::OSXDoRun () at dialog.h:72
#7 0x000000010034241f in wxCFEventLoop::DoRun () at strconv.h:361
#8 0x00000001002ab991 in wxEventLoopBase::Run () at listbase.h:385
#9 0x0000000100274a57 in wxAppConsoleBase::MainLoop () at listbase.h:385
#10 0x00000001000de487 in wxApp::OnRun () at textctrl.h:681
#11 0x00000001002e44ad in wxEntry () at buffer.h:89
Is this a bug from 3.0 onwards or is it possible that I'm not doing
something right?
Best Regards,
Deyan Hadzhiev
I have an application with a lot of dynamic content, which gets destroyed
and created on user actions. The application is working OK with wxCarbon
2.8.12 and wxCocoa 2.9.5, but when I tried with wxCocoa 3.0 and 3.1 the
application started crashing. I tried to find out what was causing the
crashes and I think that some destroyed object somehow is still being
accessed from the event loop for handling mouse events. I'm almost certain
of this because I tried to remove all Destroy() functions I call and the
crashes stopped. Prior to that I just tried to remove all dynamic handler
connections I make (with the Connect(..) function) but that didn't have any
effect.
I provide a stack frame from the crashes. Although the crash occurred at
different places the stack frame until the wxWidgetCocoaImpl::mouseEvent()
is always the same (including the mouseEvent()).
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x0000000000000000
0x0000000100145d07 in wxWidgetCocoaImpl::mouseEvent () at dialog.h:72
72 virtual void ModalFinishedCallback(void* WXUNUSED(panel), int
WXUNUSED(returnCode)) {}
(gdb) bt
#0 0x0000000100145d07 in wxWidgetCocoaImpl::mouseEvent () at dialog.h:72
#1 0x00007fff81aad3a7 in -[NSWindow sendEvent:] ()
#2 0x000000010013138c in -[wxNSWindow sendEvent:] () at dialog.h:72
#3 0x00007fff819e2afa in -[NSApplication sendEvent:] ()
#4 0x000000010008e97a in -[wxNSApplication sendEvent:] () at event.h:1911
#5 0x00007fff819796de in -[NSApplication run] ()
#6 0x0000000100123cd8 in wxGUIEventLoop::OSXDoRun () at dialog.h:72
#7 0x000000010034241f in wxCFEventLoop::DoRun () at strconv.h:361
#8 0x00000001002ab991 in wxEventLoopBase::Run () at listbase.h:385
#9 0x0000000100274a57 in wxAppConsoleBase::MainLoop () at listbase.h:385
#10 0x00000001000de487 in wxApp::OnRun () at textctrl.h:681
#11 0x00000001002e44ad in wxEntry () at buffer.h:89
Is this a bug from 3.0 onwards or is it possible that I'm not doing
something right?
Best Regards,
Deyan Hadzhiev
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users