I have been working hard on my iPhone game for about 2 days trying to get the last few bits completed so i can get it to apple by next weekend… stupidly, I hadn’t actually made an iPhone Dev build and ran it on the device… just been remoting within the editor.
So I did a build and there she was… ‘SIGSEGV’ when i terminated the app whilst debugging in XCode.
So here I am (not knowing what SIGSEGV even means) retracing 2 days work, commenting out code etc, trying to nail down the change that caused this anomaly. But can i get it to go away… can I hell!
After a good few hours butchering my project I thought, ‘Ahhh, my project backups, they used to work without issue!’… so off i go to my backups and retrieve one from 3 days ago. Sitting smug in the knowledge that this will terminate without issue I fire it up on the iPhone and… there she was again… ‘SIGSEGV’ on termination!
By now i’m thinking, “i’ve already wasted hours tracing this and it may not even be important as the app doesn’t appear to be crashing!”… but then, not knowing where the problem originates, makes me think, “This [town] stinks like a whorehouse at low tide! (The Untouchables (1987)”.
Anyway, after all this I opted for the good old fashion tech way my dad taught me… turn it all off and on. Off went the Mac and the iPod. Deleted the old app from the iPod and the build directory from the Mac. Did a new build and…
Voila warning/error gone!
So the motto of the story is… who knows. I just thought i’d share, what turned out to be, a complete quagmire. I still don’t know what SIGSEGV means but if I never see one again i’ll die happy.
Yes, it does appear that way now doesn’t it. I always close down XCode between builds so I’m not sure why I kept getting it until I did a full restart of the Mac.
Do you know what SIGSEGV actually means and are there reasons why this could be a genuine warning/error with an app?
My Adobe products always spit out “Unknown SIGSEV” Codes… I also wonder what kindo of error that is. And I know even less about all that … hey: I’m only a graphics dude
SIGSEGV is just a signal sent by the OS to a process which indicates a segmentation fault has occurred. If you dereferenced a null pointer for example.
At least that’s what they are on Unix.
Look at signal.h in your gcc headers for a list of them.
Yeah, SIGSEGV is a Unix thing (Posix compliant anyway - which OSX is ). Thing to remember, it is very unlikely you did this in a Unity app (unless you coded a plugin). It is … possible… if you did something native from C#, but if all you coded was straight up Unity game code, it isn’t you . Unity could cause it, but then so could a buffer overflow attack (provided certain conditions).
You should have had a log file of some kind generated (try searching by time stamp). Based on your description, and the fact restarting XCode didn’t fix it, I would say it occurred in a process XCode calls on during compile/run. That would explain why restarting the OS worked, it restarted the offending process and off you go
In any event, 99% of the time, your Unity game code isn’t going to be the source of this kind of error.
I also had such an error in the past, and I found it to be effectively a null pointer that could only be caught at runtime, but running on the target pltaform (not the editor).
Found it, corrected it, and voilà.
Back at the time, I found the same answers as Quietus one when searching over the forums ^^
To those who wonder why you get just a simple SIGSEGV message and nothing else, just type bt in the debugger console to get a backtrace, it shows you where in your scripts the error occurred so you can get an idea of what’s happening.