-
Notifications
You must be signed in to change notification settings - Fork 2
/
nwuser.DEBUG.txt
57 lines (42 loc) · 1.98 KB
/
nwuser.DEBUG.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
10/04/04
The NWUser preload library can be a problem to debug. If there's a problem
in it that causes it to crash during startup, you have no easy way to
attach a debugger.
In order to work around this, there's some #ifdef'd code inside of
nwuser.c that will install signal handlers for SIGSEGV, SIGBUS, and
(hopefully) dump stack traces on a crash.
NOTE: This debugging should only be used if NWUser crashes on startup.
If you get into the game do not use this debugging.
Generally, if NWUser crashes on startup, it _should_ crash for
all programs, not just NWN, so you can use something as simple as
/bin/ls to debug NWUser issues.
Note, it is preferrable to have GDB installed for this, as NWUser
spawns a copy of GDB to figure out what's going on.
This code hasn't been extensively tested, but the general sequence is:
$ cd somewhere
$ gzip -d -c nwuser-public.<release>.tar.gz | tar xvof -
$ cd nwuser
$ ./nwuser_install.pl crash
$ export LD_PRELOAD=`pwd`/nwuser.so
$ ls
$
If '/bin/ls' doesn't seem to crash NWUser, then try full NWN, however, I'd
recommend changing NWN to run in windowed mode before trying, lest you leave
your windowing system in a bad state. (See [Display Options] ->
FullScreen/AllowWindowedMode in the NWN.INI file to change )
In /tmp, you should now have three new files:
/tmp/nwu_crash.log
/tmp/nwu_crash.cmd
/tmp/nwu_crash2.log
I will need the two *.log files. The *.cmd file is just a temporary file
passed to GDB, to pull a stack trace, and may be deleted.
nwu_crash.log is a stack trace generated by the backtrace() family of calls
in glibc. Its not terribly useful, but it does give a place to start.
It should be generated all the time.
nwu_crash2.log is a GDB generated stack trace. Its also the
most useful log file. Unsurprisingly, if GDB is not installed,
this files contents will not be useful. :-)
Eitherway, email me what data you've collected, and I'll at least make
an attempt to look at it.
David Holland