Talk About Network

Google





Mac > Mac Programmer Help > Run loop crash
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 3766 of 3889
Post > Topic >>

Run loop crash

by Logan Raarup <logan.dk@[EMAIL PROTECTED] > Jun 9, 2008 at 09:28 PM

Hello,
I'm experiencing crashes with an application that i have developed in 
Cocoa. Everything seems to run fine, but the application crashes after 
22 minutes on every run.


The application is relatively straight-forward:
1) Main thread initiates a second thread - all the steps below happen 
on this thread

2) Initiates a one-shot NSTimer and adds it to the current run loop
3) The callback of the NSTimer contains an NSTask object, that pings 
another host
     - If the host does not respond, step 2 is performed again
4) If the host responds, a synchronization method is run, and the loop 
starts again at step 2

I am running with garbage collection enabled, so I do not reckon that 
it is a memory issue. The crash seems to happen shortly afther the 
NSTimer callback has been executed, and I am left with little debug 
information.


I am hoping that someone here has experienced something similar, and 
can help me overcome the issue. Thank you very much.

Please let me know if you would like to see any source code.


Regards, Logan Raarup


The backtrace looks like this:

#0  0x924c64a6 in mach_msg_trap ()
#1  0x924cdc9c in mach_msg ()
#2  0x919320be in CFRunLoopRunSpecific ()
#3  0x91932cf8 in CFRunLoopRunInMode ()
#4  0x9586bda4 in RunCurrentEventLoopInMode ()
#5  0x9586bbbd in ReceiveNextEventCommon ()
#6  0x9586ba31 in BlockUntilNextEventMatchingListInMode ()
#7  0x9507e505 in _DPSNextEvent ()
#8  0x9507ddb8 in -[NSApplication 
nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#9  0x95076df3 in -[NSApplication run] ()
#10 0x95044030 in NSApplicationMain ()
#11 0x00001dc0 in main (argc=1, argv=0xbffff734) at 
/Users/logan/Do***ents/Projects/Autoson/main.m:13
 




 3 Posts in Topic:
Run loop crash
Logan Raarup <logan.dk  2008-06-09 21:28:34 
Re: Run loop crash
Logan Raarup <logan@[E  2008-06-09 22:36:37 
Re: Run loop crash
Logan Raarup <logan@[E  2008-06-10 00:40:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 18:42:48 PST 2009.