re: crash in the carbon event loop

Emmanuel Quetelard <[email protected]>
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
Here is the backtrace of my crash:

#0	0x005f1c28 in GC_free at malloc.c:411
#1	0x91b0e768 in HIObject::HandleClassHIObjectEvent
#2	0x91b0e5d3 in HIObject::EventHook
#3	0x91b0e13d in DispatchEventToHandlers
#4	0x91b0d57b in SendEventToEventTargetInternal
#5	0x91b0d3e0 in SendEventToEventTargetWithOptions
#6	0x91b4ce22 in HIObject::Destruct
#7	0x91251516 in _CFRelease
#8	0x91c5f7e2 in MenuData::~MenuData
#9	0x91b0e768 in HIObject::HandleClassHIObjectEvent
#10	0x91b0e5d3 in HIObject::EventHook
#11	0x91b0e13d in DispatchEventToHandlers
#12	0x91b0d57b in SendEventToEventTargetInternal
#13	0x91b0d3e0 in SendEventToEventTargetWithOptions
#14	0x91b4ce22 in HIObject::Destruct
#15	0x91251516 in _CFRelease
#16	0x91b8cdfa in ReleaseMenu
#17	0x91b8bf5e in SystemAppMenuHandler
#18	0x91b0e13d in DispatchEventToHandlers
#19	0x91b0d57b in SendEventToEventTargetInternal
#20	0x91b0d3e0 in SendEventToEventTargetWithOptions
#21	0x91b51fb9 in SendMenuPopulate
#22	0x91b51e73 in PopulateMenu
#23	0x91b514dc in Check1MenuForKeyEvent
#24	0x91b50cda in CheckMenusForKeyEvent
#25	0x91b50939 in _IsMenuKeyEvent
#26	0x91b50685 in IsMenuKeyEvent
#27	0x91c08a52 in HIMenuBar::HandleKeyboardEvent
#28	0x91b0e649 in HIObject::EventHook
#29	0x91b0e13d in DispatchEventToHandlers
#30	0x91b0d57b in SendEventToEventTargetInternal
#31	0x91b0d3e0 in SendEventToEventTargetWithOptions
#32	0x91b3c307 in ToolboxEventDispatcherHandler
#33	0x91b0e4f6 in DispatchEventToHandlers
#34	0x91b0d57b in SendEventToEventTargetInternal
#35	0x91b29ecc in SendEventToEventTarget

last call of my code from here
#36	0x00178c5a in AGLWindowManager::processEvents at macosx_agl.mm:1089
#37	0x0017610b in WindowManager::mainLoop at wm_common.cpp:33
#38	0x0004e85d in main_layer_load at emitter.cpp:5378
#39	0x00006b6c in main at main.cpp:313

here is the code of the function processing events :

int AGLWindowManager::processEvents(void)
{
   //RunApplicationEventLoop();
	
	
   EventRef event;
   EventRecord oldStyleMacEvent;
   EventTargetRef eventDispatcher = GetEventDispatcherTarget();

   while (ReceiveNextEvent(0, NULL, 0.0, TRUE, &event)==noErr) {
      if (ConvertEventRefToEventRecord(event, &oldStyleMacEvent)) {
         if (oldStyleMacEvent.what==kHighLevelEvent) {
            AEProcessAppleEvent(&oldStyleMacEvent);
         }
      }
	  
      SendEventToEventTarget(event, eventDispatcher);
      //ReleaseEvent(event);
   }

   return(0);
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.