Crash. Why?
Crash. Why?
- Subject: Crash. Why?
- From: Lorenzo <email@hidden>
- Date: Wed, 10 Dec 2003 17:29:51 +0100
I cannot found the origin of a bug. And I am getting crazy.
Can you help me please?
The user click on the "button 1" and I call
--------------
[NSApp runModalForWindow:question1Window];
--------------
the user edits a simple NSTextField, presses OK, I get the string
from the NSTextField, then I send [NSApp stopModal]; then
--------------
[question1Window endEditingFor:nil];
[question1Window close];
--------------
everything works well.
Then the user click on a "button 2" and I call
--------------
[NSApp runModalForWindow:question2Window];
--------------
and on this window, after the user types 2 or 3 characters within a second
NSTextField, my application crashes. The problem is that this happens ONLY
if I earlier called the modal window question1Window, as described here
above. If I don't call the first modal question1Window, my application never
crashes. So, which relationship between the two windows?
Even more strange, I call the first window, then I call the second window
with the keyboard (not clicking on the button 2) and when I type in the
second NSTextField I don't get the crash. I cannot understand why. Amazing!
I include here the debug report. Please help...
#0 0x927d11c4 in HIObject::GetHIObjectFromRef(void*)
#1 0x927d1ba8 in _MenuElementGetDataAtIndex
#2 0x927dc088 in GetMenuItemSystemAttributes(MenuData*, unsigned short,
unsigned long, unsigned long*)
#3 0x927e61c0 in _GetMenuItemAttributes(MenuData*, unsigned short,
unsigned long*)
#4 0x9284b774 in SearchCacheEntries(OpaqueCollection*, unsigned long,
unsigned long, CheckMenuData*, MenuResult*, MenuData**, unsigned long*)
#5 0x92811e0c in SearchCache(OpaqueCollection*, bool, CheckMenuData*,
MenuResult*)
#6 0x92849f04 in CheckMenuKeyCache(MenuData*, CheckMenuData*)
#7 0x9280c730 in CheckMenusForKeyEvent(MenuData*, CheckMenuData*)
#8 0x928188ac in _IsMenuKeyEvent(MenuData*, OpaqueEventRef*, unsigned
long, MenuData**, unsigned short*)
#9 0x92828ac8 in IsMenuKeyEvent
#10 0x92e71c38 in _NSGetMenuItemForCommandKeyEvent
#11 0x92e2ee2c in _NSHandleCarbonMenuEvent
#12 0x92dd2dd0 in _DPSNextEvent
#13 0x92de93fc in -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:]
#14 0x92eb070c in -[NSApplication _realDoModalLoop:peek:]
#15 0x92f5b3c4 in -[NSApplication runModalForWindow:]
#16 0x0003ad4c in -[LorenzoApp openQuestion2Window:] <<<<<<<<<<<<<<<<
#17 0x92e779d0 in -[NSApplication sendAction:to:from:]
#18 0x92e7e754 in -[NSControl sendAction:to:]
#19 0x92f292fc in -[NSTableView _sendAction:to:row:column:]
#20 0x92e7e318 in -[NSTableView mouseDown:]
#21 0x92e02c78 in -[NSWindow sendEvent:]
#22 0x92df534c in -[NSApplication sendEvent:]
#23 0x92dfd754 in -[NSApplication run]
#24 0x92eb9a1c in NSApplicationMain
#25 0x0000ac04 in main
#26 0x0000a808 in _start at crt.c:267
#27 0x0000a67c in start
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.