Hi All,

I am sorry if I have posted to cross dev-lists.

I am in a very strange situation. I am bit new to Mac.

I had an existing desktop application. I wanted to run this application inside 
Firefox process for some requirement. So I just built my existing application 
as bundle and started running the application main body in a different thread 
inside firefox process.

As a result of that Firefox has its own  RunApplicationEventLoop() and its 
application queue. And in the secondary thread I created to run my application 
also has one more RunApplicationEventLoop().

Inside my application I have a idleTimer proc that's keeps fetching the events 
from main Application's queue and re fires the events to different controls in 
my application.

After this simple change, everything (my application as well as Firefox) was 
working fine on Tiger and PPC.

But when I run the same on Leapord, firefox's main thread is crashing 
predominantly at the following place if I keep the firefox app idle for a 
mintute or so.

0   com.apple.CoreFoundation         0x959ee13c CFRunLoopAddObserver + 44
1   com.apple.AppKit                 0x9628bd0b -[NSApplication 
setWindowsNeedUpdate:] + 271
2   com.apple.Foundation             0x96b8fb13 __NSThreadPerformPerform + 547
3   com.apple.CoreFoundation         0x959f0615 CFRunLoopRunSpecific + 3141
4   com.apple.CoreFoundation         0x959f0cf8 CFRunLoopRunInMode + 88
5   com.apple.HIToolbox              0x90499da4 RunCurrentEventLoopInMode + 283
6   com.apple.HIToolbox              0x90499bbd ReceiveNextEventCommon + 374
7   com.apple.HIToolbox              0x904f85f2 _AcquireNextEvent + 58
8   com.apple.HIToolbox              0x904f6d4f RunApplicationEventLoop + 207
9   org.mozilla.firefox              0x00237f3f nsAppShell::~nsAppShell() + 133
10  org.mozilla.firefox              0x002c3cde 
nsAppStartup::DestroyExitEvent(PLEvent*) + 148
11  org.mozilla.firefox              0x0000656e XRE_main + 5892
12  org.mozilla.firefox              0x00003178 main + 32
13  org.mozilla.firefox              0x000030fe start + 270
14  org.mozilla.firefox              0x00003019 start + 41

 When firefox crashed, following the call trace of my secondary (applications) 
thread.

#0     0x934f84a6 in mach_msg_trap
#1     0x934ffc9c in mach_msg
#2     0x95cfe0ce in CFRunLoopRunSpecific
#3     0x95cfecf8 in CFRunLoopRunInMode
#4     0x9552dda4 in RunCurrentEventLoopInMode
#5     0x9552dbbd in ReceiveNextEventCommon
#6     0x9558c5f2 in _AcquireNextEvent
#7     0x9558ad4f in RunApplicationEventLoop
#8     0x1129b6b9 in CRealApp::Run at CRealApp.cpp:622
#9     0x112bbffc in CWinAppImpl::Run at CWinAppPPImpl.cpp:386
#10   0x112bc0ff in RunContributeMain at CWinAppPPImpl.cpp:263
#11   0x111cd519 in IBEThreadProc at CContributeApp.cpp:32
#12   0x935296f5 in _pthread_start
#13   0x935295b2 in thread_start

The last call from my app is CRealApp::Run(), that has the main event loop of 
our app (RunApplicationEventLoop).

In the other thread, the complete application is running. This thread is also 
doing UI work. You think of a application running in this thread, so whatever 
application does, something happens here also.

I spoke with my senior colleagues regarding this, from them I got the 
information that in an application all UI work must happen in one thread and we 
should only have one RunApplicationEventLoop() for the application.

But for me at this point of time, pulling out all the UI code from my secondary 
thread to the Firefox's application thread and making changes for single 
RunApplicationEventLoop will be time consuming and I may not able to do now.

Is there are hack that I can do to fix this crash. Is there anybody who had 
this kind of situation.

Could you please through some pointers ?.

 Thanks
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to