Quantcast

[wxOSX] Crash after selecting "About..." menu item

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[wxOSX] Crash after selecting "About..." menu item

Jeff Tupper-2
I've noticed that my application will crash after selecting the
"About..." menu item in the application menu if my application doesn't
have an Info.plist and I haven't mapped the wxID_ABOUT menu event
(i.e. no "EVT_MENU(wxID_ABOUT,MyApp::OnAbout)"). I'm not sure if this
qualifies as a bug, but it could bite someone. A stack trace follows.

#0 0x906131a5 in CFGetTypeID
#1 0x93e47eba in HIAboutBox
#2 0x93cb9c0c in HIStdAppHandler::HandleEvent
#3 0x93cb6f02 in TEventHandler::EventHandler
#4 0x93c3111d in DispatchEventToHandlers
#5 0x93c3055b in SendEventToEventTargetInternal
#6 0x93c4ceac in SendEventToEventTarget
#7 0x93c811c7 in SendHICommandEvent
#8 0x93ca7939 in SendMenuCommandWithContextAndModifiers
#9 0x93ca78f4 in SendMenuItemSelectedEvent
#10 0x93ca780a in FinishMenuSelection
#11 0x93c84474 in MenuSelectCore
#12 0x93d13030 in MenuSelect
#13 0x001af870 in wxMacTopLevelMouseEventHandler at iostream:76
#14 0x0014f49c in wxMacAppEventHandler at iostream:76
#15 0x93c3111d in DispatchEventToHandlers
#16 0x93c3055b in SendEventToEventTargetInternal
#17 0x93c4ceac in SendEventToEventTarget
#18 0x93c5f5e3 in ToolboxEventDispatcherHandler
#19 0x93c314d6 in DispatchEventToHandlers
#20 0x93c3055b in SendEventToEventTargetInternal
#21 0x93c4ceac in SendEventToEventTarget
#22 0x00190315 in wxGUIEventLoop::DispatchAndReleaseEvent at iostream:76
#23 0x0019047a in wxGUIEventLoop::Dispatch at iostream:76
#24 0x0005a88f in wxEventLoopManual::Run at iostream:76
#25 0x0002ec10 in wxAppConsoleBase::MainLoop at iostream:76
#26 0x0008d63a in wxEntry at iostream:76
#27 0x00002f38 in main at nu.cpp:5
_______________________________________________
wx-dev mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [wxOSX] Crash after selecting "About..." menu item

Stefan Csomor
Hi Jeff

On 16.05.09 09:19, "Jeff Tupper" <[hidden email]> wrote:

> I've noticed that my application will crash after selecting the
> "About..." menu item in the application menu if my application doesn't
> have an Info.plist and I haven't mapped the wxID_ABOUT menu event
> (i.e. no "EVT_MENU(wxID_ABOUT,MyApp::OnAbout)"). I'm not sure if this
> qualifies as a bug, but it could bite someone. A stack trace follows.

yes, that's OSX' default handler trying to provide at least some info on the
app by reading the plist file

aren't we always generating an Info.plist for the app ? I'd consider an app
not having one as faulty. Or did I missunderstand the problem ?

Best,

Stefan

_______________________________________________
wx-dev mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [wxOSX] Crash after selecting "About..." menu item

Jeff Tupper-2
On Sat, May 16, 2009 at 12:45 AM, Stefan Csomor
<[hidden email]> wrote:
> Hi Jeff

Bonjour Stefan

> On 16.05.09 09:19, "Jeff Tupper" <[hidden email]> wrote:
>
>> I've noticed that my application will crash after selecting the
>> "About..." menu item in the application menu if my application doesn't
>> have an Info.plist and I haven't mapped the wxID_ABOUT menu event
>> (i.e. no "EVT_MENU(wxID_ABOUT,MyApp::OnAbout)"). I'm not sure if this
>> qualifies as a bug, but it could bite someone. A stack trace follows.
>
> yes, that's OSX' default handler trying to provide at least some info on the
> app by reading the plist file

Yes, I agree.



> aren't we always generating an Info.plist for the app ?

Applications should have an Info.plist. Whether there is one would
depend on how one builds an app, no?



> I'd consider an app not having one as faulty.

OK.



> Or did I missunderstand the problem ?

I think you've got it just fine. The issue is how much hand-holding
wxOSX will do with developers unfamiliar with the Mac / how well wxOSX
will deal with malformed applications. It seems unlikely to crop up as
it apparently requires a missing Info.plist and a missing wx menu
event mapping.
_______________________________________________
wx-dev mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re[2]: [wxOSX] Crash after selecting "About..." menu item

Vadim Zeitlin-4
In reply to this post by Stefan Csomor
On Sat, 16 May 2009 09:45:04 +0200 Stefan Csomor <[hidden email]> wrote:

SC> aren't we always generating an Info.plist for the app ? I'd consider an app
SC> not having one as faulty.

 Maybe but I'd strongly expect wxMac to complain about missing Info.plist
(with a possible link to more information about this problem) instead of
crashing and making the user spend time deducing that the problem is due to
Info.plist from the backtrace which is rather less programmer-friendly.

 Ideal -- if this is possible at all -- would be to have information in
Info.plist inside the application where we could force the user to define
it (e.g. by adding pure virtual functions to wxApp returning it) but I
don't know if it can be done like this or whether Info.plist really does
have to be a separate file.

 Regards,
VZ

_______________________________________________
wx-dev mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-dev

attachment0 (194 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re[2]: [wxOSX] Crash after selecting "About..." menu item

Jeff Tupper-2
On Sat, May 16, 2009 at 4:59 AM, Vadim Zeitlin <[hidden email]> wrote:
> On Sat, 16 May 2009 09:45:04 +0200 Stefan Csomor <[hidden email]> wrote:
>
> SC> aren't we always generating an Info.plist for the app ? I'd consider an app
> SC> not having one as faulty.
>
>  Maybe but I'd strongly expect wxMac to complain about missing Info.plist
> (with a possible link to more information about this problem) instead of
> crashing and making the user spend time deducing that the problem is due to
> Info.plist from the backtrace which is rather less programmer-friendly.

While omitting an Info.plist won't, by itself, trigger this bug, such
an omission can cause other problems. Checking for an Info.plist could
be something a debug build of the library could do. I wouldn't want a
release build to check for it.
_______________________________________________
wx-dev mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wx-dev
Loading...