CarterA / Tribo

Extremely fast static site generator written in Objective-C
http://cartera.me/2011/10/16/made-on-a-mac/
Other
42 stars 6 forks source link

Crashes on my project. #1

Closed sgoodwin closed 12 years ago

sgoodwin commented 12 years ago

I made a test project by copying over your source files and using my own markdown files (named the same format as yours) as articles. The app crashes like so:

Process: Tribo [7742] Path: /Users/USER/Library/Developer/Xcode/DerivedData/Tribo-edvipuhgxmbvqieihrwmzhclnoem/Build/Products/Debug/Tribo.app/Contents/MacOS/Tribo Identifier: com.opt-6.Tribo Version: 1.0 (???) Code Type: X86-64 (Native) Parent Process: launchd [127]

Date/Time: 2012-01-30 22:30:51.521 -0500 OS Version: Mac OS X 10.7.3 (11D42) Report Version: 9

Interval Since Last Report: 929199 sec Crashes Since Last Report: 7 Per-App Interval Since Last Report: 338 sec Per-App Crashes Since Last Report: 2 Anonymous UUID: F66EE468-7C59-4E8D-9F42-8BA96C0057FE

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information: * Terminating app due to uncaught exception 'NSRangeException', reason: '-[__NSCFString substringWithRange:]: Range or index out of bounds' * First throw call stack: ( 0 CoreFoundation 0x00007fff9614afc6 exceptionPreprocess + 198 1 libobjc.A.dylib 0x00007fff89992d5e objc_exception_throw + 43 2 CoreFoundation 0x00007fff9614adfa +[NSException raise:format:arguments:] + 106 3 CoreFoundation 0x00007fff9614ad84 +[NSException raise:format:] + 116 4 CoreFoundation 0x00007fff9611c3ce -[NSCFString substringWithRange:] + 110 5 Tribo 0x000000010d892717 -[TBPost parse] + 487 6 Tribo 0x000000010d89331e +[TBPage pageWithURL:inSite:] + 174 7 Tribo 0x000000010d891f1d +[TBPost postWithURL:] + 93 8 Tribo 0x000000010d890c38 -[TBSite parsePosts] + 888 9 Tribo 0x000000010d8dad05 -[TBSiteDocument readFromURL:ofType:error:] + 181 10 AppKit 0x00007fff8cb6a9d7 -[NSDocument _initWithContentsOfURL:ofType:error:] + 137 11 AppKit 0x00007fff8cb6a8f1 -[NSDocument initWithContentsOfURL:ofType:error:] + 257 12 AppKit 0x00007fff8ccb4be8 -[NSDocumentController makeDocumentWithContentsOfURL:ofType:error:] + 333 13 AppKit 0x00007fff8ccbe209 -[NSDocumentController openDocumentWithContentsOfURL:display:completionHandler:]_block_invoke_8 + 142 14 AppKit 0x00007fff8ccb2148 -[NSDocumentController openDocumentWithContentsOfURL:display:completionHandler:]_block_invoke_4 + 874 15 AppKit 0x00007fff8cb44df9 -[NSDocumentController _openDocumentWithContentsOfURL:usingProcedure:] + 530 16 AppKit 0x00007fff8ccb1dcf -[NSDocumentController openDocumentWithContentsOfURL:display:completionHandler:]_block_invoke_3 + 252 17 libdispatch.dylib 0x00007fff8a89c8ba _dispatch_call_block_and_release + 18 18 libdispatch.dylib 0x00007fff8a89e72a _dispatch_main_queue_callback_4CF + 308 19 CoreFoundation 0x00007fff960e006c CFRunLoopRun + 1724 20 CoreFoundation 0x00007fff960df676 CFRunLoopRunSpecific + 230 21 HIToolbox 0x00007fff8a52b31f RunCurrentEventLoopInMode + 277 22 HIToolbox 0x00007fff8a5325c9 ReceiveNextEventCommon + 355 23 HIToolbox 0x00007fff8a532456 BlockUntilNextEventMatchingListInMode + 62 24 AppKit 0x00007fff8c8eef5d _DPSNextEvent + 659 25 AppKit 0x00007fff8c8ee861 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135 26 AppKit 0x00007fff8c8eb19d -[NSApplication run] + 470 27 AppKit 0x00007fff8cb69b88 NSApplicationMain + 867 28 Tribo 0x000000010d8d8fe2 main + 34 29 Tribo 0x000000010d88f6c4 start + 52 30 ??? 0x0000000000000002 0x0 + 2 )

objc[7742]: garbage collection is OFF terminate called throwing an exception abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff8f0e0ce2 pthread_kill + 10 1 libsystem_c.dylib 0x00007fff8f2977d2 pthread_kill + 95 2 libsystem_c.dylib 0x00007fff8f288a7a abort + 143 3 libc++abi.dylib 0x00007fff8ec1d7bc abort_message + 214 4 libc++abi.dylib 0x00007fff8ec1afcf default_terminate() + 28 5 libobjc.A.dylib 0x00007fff899931b9 _objc_terminate + 94 6 libc++abi.dylib 0x00007fff8ec1b001 safe_handler_caller(void (*)()) + 11 7 libc++abi.dylib 0x00007fff8ec1b05c std::terminate() + 16 8 libc++abi.dylib 0x00007fff8ec1c152 cxa_throw + 114 9 libobjc.A.dylib 0x00007fff89992e7a objc_exception_throw + 327 10 com.apple.CoreFoundation 0x00007fff9614adfa +[NSException raise:format:arguments:] + 106 11 com.apple.CoreFoundation 0x00007fff9614ad84 +[NSException raise:format:] + 116 12 com.apple.CoreFoundation 0x00007fff9611c3ce -[NSCFString substringWithRange:] + 110 13 com.opt-6.Tribo 0x000000010d892717 -[TBPost parse] + 487 (TBPost.m:62) 14 com.opt-6.Tribo 0x000000010d89331e +[TBPage pageWithURL:inSite:] + 174 (TBPage.m:25) 15 com.opt-6.Tribo 0x000000010d891f1d +[TBPost postWithURL:] + 93 (TBPost.m:29) 16 com.opt-6.Tribo 0x000000010d890c38 -[TBSite parsePosts] + 888 (TBSite.m:100) 17 com.opt-6.Tribo 0x000000010d8dad05 -[TBSiteDocument readFromURL:ofType:error:] + 181 (TBSiteDocument.m:94) 18 com.apple.AppKit 0x00007fff8cb6a9d7 -[NSDocument _initWithContentsOfURL:ofType:error:] + 137 19 com.apple.AppKit 0x00007fff8cb6a8f1 -[NSDocument initWithContentsOfURL:ofType:error:] + 257 20 com.apple.AppKit 0x00007fff8ccb4be8 -[NSDocumentController makeDocumentWithContentsOfURL:ofType:error:] + 333 21 com.apple.AppKit 0x00007fff8ccbe209 __-[NSDocumentController openDocumentWithContentsOfURL:display:completionHandler:]_block_invoke_8 + 142 22 com.apple.AppKit 0x00007fff8ccb2148 -[NSDocumentController openDocumentWithContentsOfURL:display:completionHandler:]_block_invoke_4 + 874 23 com.apple.AppKit 0x00007fff8cb44df9 -[NSDocumentController _openDocumentWithContentsOfURL:usingProcedure:] + 530 24 com.apple.AppKit 0x00007fff8ccb1dcf __-[NSDocumentController openDocumentWithContentsOfURL:display:completionHandler:]_block_invoke_3 + 252 25 libdispatch.dylib 0x00007fff8a89c8ba _dispatch_call_block_and_release + 18 26 libdispatch.dylib 0x00007fff8a89e72a _dispatch_main_queue_callback_4CF + 308 27 com.apple.CoreFoundation 0x00007fff960e006c __CFRunLoopRun + 1724 28 com.apple.CoreFoundation 0x00007fff960df676 CFRunLoopRunSpecific + 230 29 com.apple.HIToolbox 0x00007fff8a52b31f RunCurrentEventLoopInMode + 277 30 com.apple.HIToolbox 0x00007fff8a5325c9 ReceiveNextEventCommon + 355 31 com.apple.HIToolbox 0x00007fff8a532456 BlockUntilNextEventMatchingListInMode + 62 32 com.apple.AppKit 0x00007fff8c8eef5d _DPSNextEvent + 659 33 com.apple.AppKit 0x00007fff8c8ee861 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135 34 com.apple.AppKit 0x00007fff8c8eb19d -[NSApplication run] + 470 35 com.apple.AppKit 0x00007fff8cb69b88 NSApplicationMain + 867 36 com.opt-6.Tribo 0x000000010d8d8fe2 main + 34 (Core.m:13) 37 com.opt-6.Tribo 0x000000010d88f6c4 start + 52

Thread 1:: Dispatch queue: com.apple.libdispatch-manager 0 libsystem_kernel.dylib 0x00007fff8f0e17e6 kevent + 10 1 libdispatch.dylib 0x00007fff8a89e5be _dispatch_mgr_invoke + 923 2 libdispatch.dylib 0x00007fff8a89d14e _dispatch_mgr_thread + 54

Thread 2: 0 libsystem_kernel.dylib 0x00007fff8f0e1192 __workq_kernreturn + 10 1 libsystem_c.dylib 0x00007fff8f297594 _pthread_wqthread + 758 2 libsystem_c.dylib 0x00007fff8f298b85 start_wqthread + 13

Thread 3: 0 libsystem_kernel.dylib 0x00007fff8f0e1192 __workq_kernreturn + 10 1 libsystem_c.dylib 0x00007fff8f297594 _pthread_wqthread + 758 2 libsystem_c.dylib 0x00007fff8f298b85 start_wqthread + 13

Thread 4: 0 libsystem_kernel.dylib 0x00007fff8f0e1192 __workq_kernreturn + 10 1 libsystem_c.dylib 0x00007fff8f297594 _pthread_wqthread + 758 2 libsystem_c.dylib 0x00007fff8f298b85 start_wqthread + 13

Thread 5: 0 libsystem_kernel.dylib 0x00007fff8f0e1192 __workq_kernreturn + 10 1 libsystem_c.dylib 0x00007fff8f297594 _pthread_wqthread + 758 2 libsystem_c.dylib 0x00007fff8f298b85 start_wqthread + 13

Thread 6: 0 libsystem_kernel.dylib 0x00007fff8f0e1192 __workq_kernreturn + 10 1 libsystem_c.dylib 0x00007fff8f297594 _pthread_wqthread + 758 2 libsystem_c.dylib 0x00007fff8f298b85 start_wqthread + 13

Thread 7:: com.apple.CFSocket.private 0 libsystem_kernel.dylib 0x00007fff8f0e0df2 select + 10 1 com.apple.CoreFoundation 0x00007fff96128cdb CFSocketManager + 1355 2 libsystem_c.dylib 0x00007fff8f2958bf _pthread_start + 335 3 libsystem_c.dylib 0x00007fff8f298b75 thread_start + 13

Thread 8: 0 libsystem_kernel.dylib 0x00007fff8f0e1192 __workq_kernreturn + 10 1 libsystem_c.dylib 0x00007fff8f297594 _pthread_wqthread + 758 2 libsystem_c.dylib 0x00007fff8f298b85 start_wqthread + 13

Thread 9: 0 libsystem_kernel.dylib 0x00007fff8f0e1192 __workq_kernreturn + 10 1 libsystem_c.dylib 0x00007fff8f297594 _pthread_wqthread + 758 2 libsystem_c.dylib 0x00007fff8f298b85 start_wqthread + 13

Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000000000000 rbx: 0x0000000000000006 rcx: 0x00007fff6d48a808 rdx: 0x0000000000000000 rdi: 0x0000000000000b07 rsi: 0x0000000000000006 rbp: 0x00007fff6d48a830 rsp: 0x00007fff6d48a808 r8: 0x00007fff7a888fb8 r9: 0x00007fff6d48a298 r10: 0x00007fff8f0e0d0a r11: 0xffffff80002d8220 r12: 0x00007fb5745697a0 r13: 0x7fffffffffffffff r14: 0x00007fff7a88b960 r15: 0x00007fff6d48a980 rip: 0x00007fff8f0e0ce2 rfl: 0x0000000000000246 cr2: 0x000000010faff000 Logical CPU: 0

sgoodwin commented 12 years ago

First!

CarterA commented 12 years ago

It looks like it's getting hung up on the formatting at the top of the post, or at the file name formatting. How are your files named, and what do the top of your posts look like?

Side note: Can you edit out all the stuff after the backtrace in that crash log? Most of it is irrelevant.

sgoodwin commented 12 years ago

Yeah I figured it out. Silly me.