Code Monkey home page Code Monkey logo

Comments (18)

V01dZer0 avatar V01dZer0 commented on May 28, 2024

I was using ios4 and got this crash

from gpuimage.

BradLarson avatar BradLarson commented on May 28, 2024

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.

V01dZer0 avatar V01dZer0 commented on May 28, 2024

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.

V01dZer0 avatar V01dZer0 commented on May 28, 2024

Here is the stack of crashed thread
https://github.com/OpenFibers/Images/blob/master/crash.png

from gpuimage.

keichan34 avatar keichan34 commented on May 28, 2024

Is there any error message in the console? [GLProgram link]; should output error messages when it fails

from gpuimage.

V01dZer0 avatar V01dZer0 commented on May 28, 2024

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.

keichan34 avatar keichan34 commented on May 28, 2024

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.

V01dZer0 avatar V01dZer0 commented on May 28, 2024

After I turing zombies on, the crash wasn't happened. Then I turned off NSZombieEnabled, and the crash came again.

from gpuimage.

keichan34 avatar keichan34 commented on May 28, 2024

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.

V01dZer0 avatar V01dZer0 commented on May 28, 2024

Good luck: )It's really a strange bug

from gpuimage.

keichan34 avatar keichan34 commented on May 28, 2024

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.

keichan34 avatar keichan34 commented on May 28, 2024

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.

V01dZer0 avatar V01dZer0 commented on May 28, 2024

Maybe there are some thing wrong with IMGSGX535GLDriver~

from gpuimage.

danieltwagner avatar danieltwagner commented on May 28, 2024

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.

V01dZer0 avatar V01dZer0 commented on May 28, 2024

when validate program id at the second time, the program ids did not change at all.It's safe in my project.

from gpuimage.

BradLarson avatar BradLarson commented on May 28, 2024

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.

danieltwagner avatar danieltwagner commented on May 28, 2024

Thanks for the quick reply!

from gpuimage.

V01dZer0 avatar V01dZer0 commented on May 28, 2024

Thanks a ton BradLarson

from gpuimage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.