UFO:Alien Invasion
Technical support => Mac => Topic started by: keybounce on March 20, 2009, 07:18:40 pm
-
How can I disable the signal handler for ufo-ai so that the macintosh can actually give the full stack backtrace?
Change gametype to 'Skirmish mode'
Could not find rank 'rifleman'
Could not find rank 'rifleman'
Could not find rank 'rifleman'
Could not find rank 'rifleman'
Could not find rank 'rifleman'
Could not find rank 'rifleman'
Could not find rank 'rifleman'
Could not find rank 'rifleman'
------- Loading game.dylib -------
LoadLibrary (./base/game.dylib)
==== InitGame ====
Map:wilderness Offset:(0, 0, 0)
wpMins:(128, 118, 0) wpMaxs:(193, 197, 7)
Shifted wpMins:(128, 118, 0) wpMaxs:(193, 197, 7)
Tile bounds: (128, 118, 0) to (193, 197, 7)
Source bounds: (128, 118, 0) to (193, 197, 7)
Done copying data.
0 ufo 0x0019b780 Sys_Mkdir + 180
1 ufo 0x0019b7f8 Sys_Mkdir + 300
2 libSystem.B.dylib 0x92f3399c _sigtramp + 68
Wrote keys.cfg
Error: Received signal 11.
That's not very informative.
All I could find was:
Kleiman-ibook:src michael$ egrep signal */*.c
common/net.c:# include <signal.h>
common/net.c: signal(SIGPIPE, SIG_IGN);
-
I run the game from gdb (on linux), and it can make backtrace.
-geever
-
Ahh.
I generally run from the disk image. I figure the same way that anyone will run the final program.
Running direct from the command line this time was a bit of an experiment, and plus I didn't want to go through rebuilding the whole thing just for a quick test.
Having to run from gdb just to get information needed to give to the developers? Well, if that's what it takes ...
-
you are talking about the automatically generated stacktrace?
maybe we should deactivate our own stacktrace feature for macos. can you send an example stacktrace from macos please?
-
Here's a sample from "World of Goo" on loading a custom level into the demo version (which apparently doesn't support custom levels)
[attachment deleted by admin]
-
@@ -524,6 +522,8 @@
#ifdef HAVE_CURSES
signal(SIGWINCH, Sys_Signal);
#endif
+ /* apple provides a nice backtrace feature on their own */
+#if !(defined (__APPLE__) || defined (MACOSX))
signal(SIGHUP, Sys_Signal);
signal(SIGINT, Sys_Signal);
signal(SIGQUIT, Sys_Signal);
@@ -532,4 +532,5 @@
signal(SIGFPE, Sys_Signal);
signal(SIGSEGV, Sys_Signal);
signal(SIGTERM, Sys_Signal);
+#endif
}
Please try this patch and let me know whether that works for you.
-
Kleiman-ibook:unix michael$ pbpaste | patch
missing header for unified diff at line 1 of patch
can't find file to patch at input line 1
Perhaps you should have used the -p or --strip option?
File to patch: unix_main.c
patching file unix_main.c
Hunk #1 succeeded at 518 (offset -4 lines).
patch unexpectedly ends in middle of line
Hunk #2 FAILED at 528.
1 out of 2 hunks FAILED -- saving rejects to file unix_main.c.rej
Kleiman-ibook:unix michael$
Manually adjusting ...
Here's what I have compared to the trunk:
Kleiman-ibook:trunk michael$ svn diff
Index: src/ports/unix/unix_main.c
===================================================================
--- src/ports/unix/unix_main.c (revision 23646)
+++ src/ports/unix/unix_main.c (working copy)
@@ -520,6 +520,8 @@
#ifdef HAVE_CURSES
signal(SIGWINCH, Sys_Signal);
#endif
+ /* apple provides a nice backtrace feature on their own */
+#if !(defined (__APPLE__) || defined (MACOSX))
signal(SIGHUP, Sys_Signal);
signal(SIGINT, Sys_Signal);
signal(SIGQUIT, Sys_Signal);
@@ -528,4 +530,5 @@
signal(SIGFPE, Sys_Signal);
signal(SIGSEGV, Sys_Signal);
signal(SIGTERM, Sys_Signal);
+#endif
}
Index: build/maps.mk
===================================================================
--- build/maps.mk (revision 23646)
+++ build/maps.mk (working copy)
@@ -32,7 +32,8 @@
endif
NICE = 19
-UFO2MAPFLAGS = -v 2 -nice $(NICE) -extra -t $(NUMTHREADS)
+# UFO2MAPFLAGS = -v 2 -nice $(NICE) -extra -t $(NUMTHREADS)
+UFO2MAPFLAGS = -nice $(NICE) -extra -t $(NUMTHREADS)
FAST_UFO2MAPFLAGS = -v 2 -quant 6 -nice $(NICE) -t $(NUMTHREADS)
ENTS_UFO2MAPFLAGS = -v 2 -nice $(NICE) -onlyents
Full clean compile, including maps, ...
-
looks ok - maybe the forum cut the last newline from my patch.
is it working that way? if yes - then i will think about a cleaner way to handle this.