adamwulf / JotUI

OpenGL based drawing view built for and used by Loose Leaf for iPad
http://getlooseleaf.com/opensource/
MIT License
268 stars 28 forks source link

Crash #5

Closed ghost closed 7 years ago

ghost commented 7 years ago

Cannot run example.

2016-11-16 22:51:37.120290 jotuiexample[22411:3562223] subsystem: com.apple.UIKit, category: HIDEventFiltered, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0 2016-11-16 22:51:37.176339 jotuiexample[22411:3562223] subsystem: com.apple.UIKit, category: HIDEventIncoming, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0 2016-11-16 22:51:37.194446 jotuiexample[22411:3562219] subsystem: com.apple.BaseBoard, category: MachPort, enable_level: 1, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0, enable_private_data: 0 2016-11-16 22:51:37.387358 jotuiexample[22411:3561974] subsystem: com.apple.UIKit, category: StatusBar, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0 2016-11-16 22:51:38.403 jotuiexample[22411:3561974] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ' -[NSBundle initWithURL:]: nil URL argument' *** First throw call stack: ( 0 CoreFoundation 0x000000010b6fd34b exceptionPreprocess + 171 1 libobjc.A.dylib 0x000000010b15e21e objc_exception_throw + 48 2 CoreFoundation 0x000000010b766265 +[NSException raise:format:] + 197 3 Foundation 0x000000010ac51b3d -[NSBundle initWithURL:] + 87 4 Foundation 0x000000010ac51ad3 +[NSBundle bundleWithURL:] + 45 5 jotuiexample 0x0000000108702b35 -[JotGLProgram initWithVertexShaderFilename:fragmentShaderFilename:withAttributes:andUniforms:] + 549 6 jotuiexample 0x00000001086fa298 -[JotGLPointProgram initWithVertexShaderFilename:fragmentShaderFilename:withAttributes:andUniforms:] + 504 7 jotuiexample 0x000000010870e7cd -[JotGLColorlessPointProgram init] + 221 8 jotuiexample 0x00000001087053dc 37-[JotGLContext colorlessPointProgram]_block_invoke + 60 9 jotuiexample 0x0000000108705c8c -[JotGLContext runBlock:] + 156 10 jotuiexample 0x0000000108705373 -[JotGLContext colorlessPointProgram] + 147 11 jotuiexample 0x00000001086f0e6b 35-[JotGLLayerBackedFrameBuffer bind]_block_invoke + 107 12 jotuiexample 0x0000000108705b0e +[JotGLContext runBlock:] + 398 13 jotuiexample 0x00000001086f0de6 -[JotGLLayerBackedFrameBuffer bind] + 166 14 jotuiexample 0x00000001086f14d2 36-[JotGLLayerBackedFrameBuffer clear]_block_invoke + 82 15 jotuiexample 0x0000000108705b0e +[JotGLContext runBlock:] + 398 16 jotuiexample 0x00000001086f1460 -[JotGLLayerBackedFrameBuffer clear] + 128 17 jotuiexample 0x00000001086f0c6a 44-[JotGLLayerBackedFrameBuffer initForLayer:]_block_invoke + 586 18 jotuiexample 0x0000000108705b0e +[JotGLContext runBlock:] + 398 19 jotuiexample 0x00000001086f09ba -[JotGLLayerBackedFrameBuffer initForLayer:] + 586 20 jotuiexample 0x00000001087218ec -[JotView createFramebuffer] + 396 21 jotuiexample 0x0000000108721586 21-[JotView finishInit]_block_invoke_3 + 262 22 jotuiexample 0x0000000108705c8c -[JotGLContext runBlock:] + 156 23 jotuiexample 0x00000001087213b6 -[JotView finishInit] + 2070 24 jotuiexample 0x0000000108720a21 -[JotView initWithCoder:] + 145 25 UIKit 0x00000001097e548b -[UIClassSwapper initWithCoder:] + 240 26 UIKit 0x00000001099e0dbd UINibDecoderDecodeObjectForValue + 684 27 UIKit 0x00000001099e0b0a -[UINibDecoder decodeObjectForKey:] + 98 28 UIKit 0x00000001097e5132 -[UIRuntimeConnection initWithCoder:] + 136 29 UIKit 0x00000001099e0dbd UINibDecoderDecodeObjectForValue + 684 30 UIKit 0x00000001099e0f73 UINibDecoderDecodeObjectForValue + 1122 31 UIKit 0x00000001099e0b0a -[UINibDecoder decodeObjectForKey:] + 98 32 UIKit 0x00000001097e4300 -[UINib instantiateWithOwner:options:] + 1249 33 UIKit 0x0000000109577ff5 -[UIViewController _loadViewFromNibNamed:bundle:] + 386 34 UIKit 0x0000000109578917 -[UIViewController loadView] + 177 35 UIKit 0x0000000109578c4c -[UIViewController loadViewIfRequired] + 201 36 UIKit 0x00000001095794a0 -[UIViewController view] + 27 37 UIKit 0x0000000109443045 -[UIWindow addRootViewControllerViewIfPossible] + 71 38 UIKit 0x0000000109443796 -[UIWindow _setHidden:forced:] + 293 39 UIKit 0x00000001094570a9 -[UIWindow makeKeyAndVisible] + 42 40 jotuiexample 0x00000001086eac58 -[AppDelegate application:didFinishLaunchingWithOptions:] + 616 41 UIKit 0x00000001093ce68e -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 290 42 UIKit 0x00000001093d0013 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4236 43 UIKit 0x00000001093d63b9 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1731 44 UIKit 0x00000001093d3539 -[UIApplication workspaceDidEndTransaction:] + 188 45 FrontBoardServices 0x000000010e8d576b FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 24 46 FrontBoardServices 0x000000010e8d55e4 -[FBSSerialQueue _performNext] + 189 47 FrontBoardServices 0x000000010e8d596d -[FBSSerialQueue _performNextFromRunLoopSource] + 45 48 CoreFoundation 0x000000010b6a2311 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 49 CoreFoundation 0x000000010b68759c CFRunLoopDoSources0 + 556 50 CoreFoundation 0x000000010b686a86 CFRunLoopRun + 918 51 CoreFoundation 0x000000010b686494 CFRunLoopRunSpecific + 420 52 UIKit 0x00000001093d1db6 -[UIApplication _run] + 434 53 UIKit 0x00000001093d7f34 UIApplicationMain + 159 54 jotuiexample 0x00000001086ea9cf main + 111 55 libdyld.dylib 0x000000010d22568d start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

adamwulf commented 7 years ago

It looks like you need to copy the .fsh and .vsh files into your project. That crash happens when it can't load those shaders from the bundle

adamwulf commented 7 years ago

I just pushed an update that copied the shader files into the included sample project - that should do the trick for you, lmk if not