Thread is being killed by the OS
Posted
by
Or.Ron
on Stack Overflow
See other posts from Stack Overflow
or by Or.Ron
Published on 2011-11-07T21:20:14Z
Indexed on
2011/11/13
1:50 UTC
Read the original article
Hit count: 171
I'm currently programming an app that extracts frames from a movie clip. I designed it so that the extraction will be done on a separate thread to prevent the application from freezing. The extraction process itself is taking a lot of resources, but works fine when used in the simulator. However, there are problems when building it for the iPad. When I perform another action (I'm telling my AV player to play while I extract frames), the thread unexpectedly stops working, and I believe it's being killed.
I assume it's becauase I'm using a lot of resources, but not entirely sure.
Here are my questions: 1. How can I tell if/why my thread stopping? 2. If it's really from over processing what should I do? I really need this action to be implemented.
Heres some code im using: To create the thread:
[NSThread detachNewThreadSelector:@selector(startReading) toTarget:self withObject:nil];
I'll post any information you need, Thanks so much!
Update I'm using GCD now and it populates the threads for me. However the OS still kills the threads.
I know exactly when is it happening. when i tell my [AVplayer play]; it kills the thread.
This issue is only happening in the actual iPad and not on the simulator
© Stack Overflow or respective owner