Comments (18)
I was using ios4 and got this crash
from gpuimage.
This doesn't happen on any of my devices, which are running iOS 5.0, but it very well could be a platform-specific issue. I'll see if I can reproduce it on a device running iOS 4. Did you compile this with Xcode 4.2 or 4.3? I know that 4.3 fixes some issues within the LLVM compiler, so that might also have something to do with this.
from gpuimage.
xcode4.2 and SDK5, running on ios 4.3.3
here is the crash log:
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 IMGSGX535GLDriver 0x30c00586 gldLoadFramebuffer + 10
1 IMGSGX535GLDriver 0x30c0a07e gldUpdateDispatch + 82
2 GLEngine 0x30acd96c gleDoSelectiveDispatchNoErrorCore + 228
3 GLEngine 0x30a4853a glValidateProgramARB_Exec + 282
4 OpenGLES 0x33aca760 glValidateProgram + 20
5 FilterShowcase 0x0000b866 -GLProgram link
6 FilterShowcase 0x00008900 -GPUImageView commonInit
7 FilterShowcase 0x00008692 -GPUImageView initWithCoder:
8 UIKit 0x32abb332 -[UIClassSwapper initWithCoder:] + 142
9 UIKit 0x32b1c1c8 UINibDecoderDecodeObjectForValue + 1640
10 UIKit 0x32b1c340 -[UINibDecoder decodeObjectForKey:] + 60
11 UIKit 0x32abb0d4 -[UIRuntimeConnection initWithCoder:] + 112
12 UIKit 0x32b1c1c8 UINibDecoderDecodeObjectForValue + 1640
13 UIKit 0x32b1bd92 UINibDecoderDecodeObjectForValue + 562
14 UIKit 0x32b1c340 -[UINibDecoder decodeObjectForKey:] + 60
15 UIKit 0x32aba7c0 -[UINib instantiateWithOwner:options:] + 452
16 UIKit 0x32abbe02 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 86
17 UIKit 0x32a355e2 -[UIViewController _loadViewFromNibNamed:bundle:] + 30
18 UIKit 0x32a02f9e -[UIViewController loadView] + 74
19 UIKit 0x328e7eb8 -[UIViewController view] + 24
20 UIKit 0x328f65e8 -[UIViewController contentScrollView] + 16
21 UIKit 0x328f6458 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 24
22 UIKit 0x328f6356 -[UINavigationController _layoutViewController:] + 18
23 UIKit 0x328f5db0 -[UINavigationController _startTransition:fromViewController:toViewController:] + 248
24 UIKit 0x328f5c3c -[UINavigationController _startDeferredTransitionIfNeeded] + 176
25 UIKit 0x328e7d56 -[UINavigationController pushViewController:transition:forceImmediate:] + 634
26 UIKit 0x328e7acc -[UINavigationController pushViewController:animated:] + 28
27 FilterShowcase 0x00006d44 -ShowcaseFilterListController tableView:didSelectRowAtIndexPath:
28 UIKit 0x32905514 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 656
29 UIKit 0x329690e4 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 124
30 Foundation 0x33d696ce __NSFireDelayedPerform + 362
31 CoreFoundation 0x32dffa40 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 8
32 CoreFoundation 0x32e01ec4 __CFRunLoopDoTimer + 844
33 CoreFoundation 0x32e0283e __CFRunLoopRun + 1082
34 CoreFoundation 0x32d92ebc CFRunLoopRunSpecific + 224
35 CoreFoundation 0x32d92dc4 CFRunLoopRunInMode + 52
36 GraphicsServices 0x338fb418 GSEventRunModal + 108
37 GraphicsServices 0x338fb4c4 GSEventRun + 56
38 UIKit 0x328dfd62 -[UIApplication _run] + 398
39 UIKit 0x328dd800 UIApplicationMain + 664
40 FilterShowcase 0x00003510 main (main.m:8)
41 FilterShowcase 0x00002f58 start + 32
from gpuimage.
Here is the stack of crashed thread
https://github.com/OpenFibers/Images/blob/master/crash.png
from gpuimage.
Is there any error message in the console? [GLProgram link];
should output error messages when it fails
from gpuimage.
Nothing in console.Program received signal:"EXC_BAD_ACCESS" is the only message.
Could it be initializing OpenGLES at second time?
I hope this would help,https://github.com/OpenFibers/Images/blob/master/crash.png : )
from gpuimage.
Hmm, sounds like a memory issue...try turning NSZombieEnabled on
http://stackoverflow.com/questions/2190227/how-do-i-setup-nszombieenabled-in-xcode-4
from gpuimage.
After I turing zombies on, the crash wasn't happened. Then I turned off NSZombieEnabled, and the crash came again.
from gpuimage.
Ah, I have a 3GS with 4.x on it, I'll try checking out the problem later when I have access to it (Hopefully in a few hours)
from gpuimage.
Good luck: )It's really a strange bug
from gpuimage.
I was able to reproduce the error. The problem is in GLProgram.m
, when NSZombieEnabled is on, the - dealloc
method is never called, which keeps the shaders and programs there, therefore when a new filter is created, it's assigned new filters and shaders. However, when NSZombieEnabled is off, the - dealloc
method is called, deleting the shaders and program. Then, when the program tries to validate on line 159, a EXC_BAD_ACCESS is thrown.
I'm not exactly sure how to fix it, though.. You can't just not call glDeleteProgram
, because then we'd be leaking memory...
from gpuimage.
Update: commenting out GLProgram.m:159 glValidateProgram(program);
seems to work, but I'm not sure if this is safe or not.
@BradLarson , what do you think? Is there a bug in glValidateProgram in iOS 4, when using old program IDs perhaps?
from gpuimage.
Maybe there are some thing wrong with IMGSGX535GLDriver~
from gpuimage.
I am experiencing the same issue on iOS4. Has there been any progress made on the subject? Can anyone confirm whether keichan34's solution is safe?
from gpuimage.
when validate program id at the second time, the program ids did not change at all.It's safe in my project.
from gpuimage.
After digging into it, that glValidateProgram() call was completely unnecessary. If the compilation of a shader fails, other checks will catch it. It still shouldn't have been crashing, but I've read that this might be due to a driver bug which was fixed in 5.0. I've removed this, which appears to eliminate crashing on my iOS 4.0 test device.
from gpuimage.
Thanks for the quick reply!
from gpuimage.
Thanks a ton BradLarson
from gpuimage.
Related Issues (20)
- help you to kill a bug
- How to get the buffer after using Filter? HOT 2
- Video with GPUImageMovie has a strange lines when I apply GPUImageLookupFilter HOT 2
- H
- 可以给第三方传过来的视频加美颜、滤镜吗? HOT 8
- didCompletePlayingMovie call immediately HOT 1
- photo
- How to create Ordered Dithering filter using GPUImageFilter
- 添加一些滤镜,画面出现屏闪现象
- The rapid growth of memory
- GPUImageStillCamera crash with invalid array index HOT 1
- Build input file cannot be found module.modulemap Xcode project Objective-C
- How to use Lookup Filter to Video? HOT 1
- GPUImageMovie 如何播放网络视频,同时添加滤镜效果 HOT 1
- 如何用gpuimage在一个视频里添加2种模式水印?
- ShaderDesigner[4974:64452] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x60000299bb00> F8BB1C28-BAE8-11D6-9C31-00039315CD46
- GPUimage导入使得 UIDeviceOrientationDidChangeNotification 通知接受不到
- A function declaration without a prototype is deprecated in all versions of C and is not supported in C2x
- 'AVCaptureStillImageOutput' is deprecated: first deprecated in iOS 10.0 - Use AVCapturePhotoOutput instead.
- GPUImage for Android?! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpuimage.