You are not logged in.

#1 2012-12-21 19:59:56

AndrzejL
Member
Registered: 2012-12-07
Posts: 160

[SOLVED] Neverwinter Nights Diamond - Linux native client - frozen.

Hi folks.

I have installed Neverwinter Nights Diamond edition as a native Linux client using this HOWTO (with some of my own modifications) to achieve the goal. It worked fine.

Basic idea was to install the game from the DVD media using wine, then download all the Linux related files / patches and unpack overwriting the existing files in the folder just like described in the howto. It worked really superb including the movies and then it stopped working.

I have struggled to get it back to work again as there was no error...

When I tried to start game from terminal I was getting this:

[andrzejl@wishmacer ~]$ /media/Disk_2/Crossover/Neverwinter_Nights/nwn.sh
NOTICE: NWMovies(./nwmain): Version: 20090223.080954
NOTICE: Looking up symbols in libSDL.....
NOTICE: NWMovies: Using libSDL via RTLD_NEXT.
NOTICE: SDL Library determined to be: ./lib/libSDL-1.2.so.0
NOTICE: NWMovies: SDL_WM_GrabInput() address: b75563f0
NOTICE: NWMovies: SDL_GetVideoSurface() address: b7554790
NOTICE: NWMovies: SDL_WM_ToggleFullScreen() address: b75577b0
NOTICE: NWMovies: SDL_PollEvent() address: b7533a00
NOTICE: NWMovies: SDL_WM_IconifyWindow() address: b7557780
NOTICE: NWMovies: Patch 0 Address: 0x08077a9d
NOTICE: NWMovies: Patch 1 Address: 0x08077ab1
NOTICE: NWMovies: Patch 2 Address: 0x0815b5f7
NOTICE: NWMovies: Patch 3 Address: 0x0815b611
NOTICE: NWMovies: Patch 4 Address: 0x0807796f
NOTICE: NWMovies: Patch 5 Address: 0x08207835
NOTICE: NWMovies: Patch 6 Address: 0x08207858
NOTICE: NWMovies: PrePatch0: 8b 80 78 02 00 00 5d c3
NOTICE: NWMovies: PrePatch1: 8b 80 7c 02 00 00 5d c3
NOTICE: NWMovies: PrePatch2: e8 68 c5 f1 ff 83 ec 08
NOTICE: NWMovies: PrePatch3: 169+: eb 59 90 83
NOTICE: NWMovies: PostPatch0: b8 00 00 00 00 90 5d c3
NOTICE: NWMovies: PostPatch1: b8 00 00 00 00 90 5d c3
NOTICE: NWMovies: PostPatch2: 90 90 90 90 90 83 ec 08
NOTICE: NWMovies: PostPatch3: 169+: 90 90 90 83
NOTICE: NWMovies: PrePatch4: 56 8d 5d e8 53
NOTICE: NWMovies: PostPatch4: e9 20 54 73 af
NOTICE: NWMovies: MoviesPrePatch: 6a 00 53 bf 00 00 00 3f e8 72 4f 2a 00 8b 43 60 8b 10 c7 04 24 00 00 80 3f 57 57 57 50 ff 52 44 83 c4 1c
NOTICE: NWMovies: MoviesPostPatch: 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
NOTICE: NWMovies: Initialized.
NOTICE: SDL_WM_GrabInput(QUERY) called..

and the game would froze... I mean there was no reaction. The terminal output just stopped. Game didn't even started... SO I googled for hours trying to come up with the way to troubleshoot the NWN Linux client and I got nada... zip, zero, big bobkas... There was something mentioned about syslog / messages but there was nothing in system logs that would indicate what was broken... Last night I could not sleep. It was 6 am and I was still up. Went for a quick cigarette and when I came back I have decided to try one thing...

Here are few more details before I will tell You what I did.

My installation folder:

/media/Disk_2/Crossover/Neverwinter_Nights

Launching file:

nwn.sh

contains this:

#!/bin/sh
cd /media/Disk_2/Crossover/Neverwinter_Nights/
./nwn

and then the file that's being called:

nwn

contains this:

#!/bin/sh

# This script runs Neverwinter Nights from the current directory

export SDL_MOUSE_RELATIVE=0
export SDL_VIDEO_X11_DGAMOUSE=0

# If you do not wish to use the SDL library included in the package, remove
# ./lib from LD_LIBRARY_PATH
export LD_LIBRARY_PATH=./lib:./miles:$LD_LIBRARY_PATH
export LD_PRELOAD=./nwmovies.so
export NWMOVIES_GRAB_HACK=1
export MALLOC_CHECK_=0
# DisableSound=1
./nwmain $@

so this file calls the hard-coded file:

nwmain

in the main folder of the game.

So last night I did this. Opened 2 terminal windows. In first of them I ran:

su

followed by root password and then:

pacman -S gdb

and I have accepted installation of the debugger.

In the second window I have opened the game directory:

cd /media/Disk_2/Crossover/Neverwinter_Nights/

and then I ran:

export LD_LIBRARY_PATH=./lib:./miles:$LD_LIBRARY_PATH

to make sure I have all the libraries necessary for the game to work loaded. (Notice that this is the same line that can be found in the

nwn

file if You need to modify this line do it). Next:

gdb ./nwmain

and then when I got the:

(gdb)

prompt I typed in:

run

followed by punching enter.

This gave me the following results:

[andrzejl@wishmacer ~]$ cd /media/Disk_2/Crossover/Neverwinter_Nights/
[andrzejl@wishmacer Neverwinter_Nights]$ export LD_LIBRARY_PATH=./lib:./miles:$LD_LIBRARY_PATH
[andrzejl@wishmacer Neverwinter_Nights]$ gdb ./nwm
nwm/                 nwmain.exe           nwmovies.ini         nwmovies.log         nwmovies.so
nwmain               nwmovies/            nwmovies_install.pl  nwmovies.pl         
[andrzejl@wishmacer Neverwinter_Nights]$ gdb ./nwmain
GNU gdb (GDB) 7.5.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /media/Disk_2/Crossover/Neverwinter_Nights/nwmain...(no debugging symbols found)...done.
(gdb) run
Starting program: /media/Disk_2/Crossover/Neverwinter_Nights/nwmain
warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0xb7779b40 (LWP 14241)]
[New Thread 0xb62c6b40 (LWP 14243)]
[New Thread 0xb5ac5b40 (LWP 14244)]
ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred

Program received signal SIGSEGV, Segmentation fault.
0xb79f1237 in std::cout () from /usr/lib/libstdc++.so.6
(gdb)

Sooo my first thought was to reinstall

libstdc++5

in the first terminal and so I did but that changed nothing really.

so I typed in:

bt

at the

(gdb)

prompt in the second terminal and I saw this:

(gdb) bt
#0  0xb79f1237 in std::cout () from /usr/lib/libstdc++.so.6
#1  0xbfffdf8c in ?? ()
#2  0xb7981481 in bool std::has_facet<std::ctype<char> >(std::locale const&) () from /usr/lib/libstdc++.so.6
#3  0xb797422a in std::basic_ios<char, std::char_traits<char> >::_M_cache_locale(std::locale const&) ()
   from /usr/lib/libstdc++.so.6
#4  0xb79742d9 in std::basic_ios<char, std::char_traits<char> >::init(std::basic_streambuf<char, std::char_traits<char> >*) () from /usr/lib/libstdc++.so.6
#5  0xb7964756 in std::ios_base::Init::Init() () from /usr/lib/libstdc++.so.6
#6  0xb51a398e in ?? () from /usr/lib/libtxc_dxtn.so
#7  0xb7fed066 in call_init () from /lib/ld-linux.so.2
#8  0xb7fed14c in _dl_init_internal () from /lib/ld-linux.so.2
#9  0xb7ff10ed in dl_open_worker () from /lib/ld-linux.so.2
#10 0xb7feceae in _dl_catch_error () from /lib/ld-linux.so.2
#11 0xb7ff0954 in _dl_open () from /lib/ld-linux.so.2
#12 0xb79f49ed in ?? () from /usr/lib/libdl.so.2
#13 0xb7feceae in _dl_catch_error () from /lib/ld-linux.so.2
#14 0xb79f4422 in ?? () from /usr/lib/libdl.so.2
#15 0x0e477fec in ?? ()

At first I got stupid... I have started reinstalling packages like

glibc

but that took me nowhere either... and then it hit me...

#6  0xb51a398e in ?? () from /usr/lib/libtxc_dxtn.so

I have installed this package from aur several days ago... could that be it?

I ran:

pacman -R libtxc_dxtn_s2tc

in the first terminal with root privileges and the game started normally when I clicked the NWN icon...

I need the

libtxc_dxtn

package as I am running Tom Clancy's Splinter Cell in the Crossover so I found this package and

makepkg -s ./

and installed it.

All works fine now. Both games are running ok.

Sorry for the long post but I wanted to show how the Neverwinter Nights Linux client can be debugged in case of trouble.

Hope someone will find it useful.

Regards.

Andrzej

Last edited by AndrzejL (2012-12-21 20:09:47)


The worst thing about censorship is ██████ ██ ████ ████████████ and ██████ ███████ ███ ███████████.

Offline

Board footer

Powered by FluxBB