objective c - Crash in kevent on iPhone -


i have iphone app in appstore reports crashlogs of specific type cannot reproduce or find starting point problem.

this part of crashlog relevant:

exception type:  exc_crash (sigsegv) exception codes: 0x00000000, 0x00000000 crashed thread:  1  thread 1 crashed: 0   libsystem.b.dylib               0x31192974 kevent + 24 1   libsystem.b.dylib               0x3123c704 _dispatch_mgr_invoke + 88 2   libsystem.b.dylib               0x3123c174 _dispatch_queue_invoke + 96 3   libsystem.b.dylib               0x3123bb98 _dispatch_worker_thread2 + 120 4   libsystem.b.dylib               0x311e024a _pthread_wqthread + 258 5   libsystem.b.dylib               0x311d8970 start_wqthread + 0 

does know might problem here? looking hints allow me start looking problem in code.

sigsegv (short segmentation violation) means application tries dereference (access) memory has not been allocated or can't dereferenced other reasons.

the fact can't replicate crash makes harder solve.

all "_dispatch" calls in crash log seems indicate thread 1 using gcd (or maybe other api using gcd behind scenes) access variable altered outside block (from thread).

it trying access uninitialized variable (which sigsegv means).

my recommendation @ gcd code , other multithreaded code, focusing on thread safety , mutable objects (such nsmutablearrays).

also, on your memory management , make sure variables initialized , correctly retained/released. had crash log yours problem declared variable without initializing right away

myclass *myvariable; ... // calculations may or may not initialize variale ... if (myvariable) {     [myvariable dosomething];  // <-- crash } 

changing declaration to:

myclass *myvariable = nil; 

solved problem.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -