I have a problem here : my app crashed on my Iphone (JB) though Xcode doesn’t complain about anything. The app works fine on the simulator though.
However, there is this in the device logs :
Thread 0 Crashed:
0 libSystem.B.dylib 0x00078ac8 __kill + 8
1 libSystem.B.dylib 0x00078ab8 kill + 4
2 libSystem.B.dylib 0x00078aaa raise + 10
3 libSystem.B.dylib 0x0008d03a abort + 50
4 libstdc++.6.dylib 0x00044a20 __gnu_cxx::__verbose_terminate_handler() + 376
5 libobjc.A.dylib 0x00005958 _objc_terminate + 104
6 libstdc++.6.dylib 0x00042df2 __cxxabiv1::__terminate(void (*)()) + 46
7 libstdc++.6.dylib 0x00042e46 std::terminate() + 10
8 libstdc++.6.dylib 0x00042f16 __cxa_throw + 78
9 libobjc.A.dylib 0x00004838 objc_exception_throw + 64
10 CoreFoundation 0x0009fd0e +[NSException raise:format:arguments:] + 62
11 CoreFoundation 0x0009fd48 +[NSException raise:format:] + 28
12 Foundation 0x000125d8 -[NSURL(NSURL) initFileURLWithPath:] + 64
13 Foundation 0x000371e0 +[NSURL(NSURL) fileURLWithPath:] + 24
Any idea what the problem can be ?
I’ve already spent my whole day on that, but… I’m stuck.
Thanks in advance…
Miky Mike
Ok, Here is more then from the console, I get this :
This GDB was configured as
“–host=i386-apple-darwin
–target=arm-apple-darwin”.tty /dev/ttys002 Loading program into
debugger… Program loaded. target
remote-mobile
/tmp/.XcodeGDBRemote-17280-65
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache mem
0x40000000 0xffffffff none mem
0x00000000 0x0fff none run Running…
Error launching remote program: failed
to get the task for process 456. Error
launching remote program: failed to
get the task for process 456. The
program being debugged is not being
run. The program being debugged is not
being run.[Session started at 2010-12-23
20:33:33 +0100.] GNU gdb
6.3.50-20050815 (Apple version gdb-1472) (Thu Aug 5 05:54:10 UTC
2010) Copyright 2004 Free Software
Foundation, Inc. GDB is free software,
covered by the GNU General Public
License, and you are welcome to change
it and/or distribute copies of it
under certain conditions. Type “show
copying” to see the conditions. There
is absolutely no warranty for GDB.
Type “show warranty” for details. This
GDB was configured as
“–host=i386-apple-darwin
–target=arm-apple-darwin”.tty /dev/ttys004 Loading program into
debugger… Program loaded. target
remote-mobile
/tmp/.XcodeGDBRemote-17280-72
Switching to remote-macosx protocol
mem 0x1000 0x3fffffff cache mem
0x40000000 0xffffffff none mem
0x00000000 0x0fff none run Running…
Error launching remote program: failed
to get the task for process 508. Error
launching remote program: failed to
get the task for process 508. The
program being debugged is not being
run. The program being debugged is not
being run.
Here is the code that calls the URL
NSURL *storeURL = [NSURL fileURLWithPath: [[self applicationDocumentsDirectory] stringByAppendingPathComponent: @”TheLearningMachine.sqlite”]];
I hope this will better for you to read.
Somewhere in your app’s startup code you’re making a call to
[NSURL fileURLWithPath:], and it’s raising an exception. You need to check what string is being passed to it, perhaps with anNSLog()call.(My wild guess is the value being passed to it is
nil, because whatever code generates that path is failing for some reason. It’s hard to say without seeing the actual code)