Linux 64-bit binary and build issues

Discuss Chaos Strikes Back for Windows and Linux, an unofficial port of Chaos Strikes Back to PC by Paul Stevens, as well as CSBuild, an associated dungeon editor.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
pjs
Novice
Posts: 14
Joined: Thu Dec 30, 2021 8:37 pm

Linux 64-bit binary and build issues

Post by pjs »

A few observations based on dmweb and http://dianneandpaul.net/CSBwin/Games/. Dungeon Master for Linux x86-64 SDL2 2018-05-08 was packaged as tarball (worked fine). The latest CSB is dated 2018-04-21 and is published only as a binary file. You can use it by taking the x86-32 tarball from 2015-12-12. But I wonder if there was any special reason why the latest CSB 64-bit version has never been published as tarball?

The 'Utility' in the aforementioned binary (for importing CSBwin DM characters to CSB) didn't work: it crashed with message:

SBwin 15.7v0
SDL initialized.
Timer: 10 ms established...
Message:
Flags = 00000001
Title = (null)
Message = You have encountered code at
relative address 0x007e42 that I
thought was unused. I guess I
was wrong. Please let me know
about it and the circumstances in
which it happened.

I also grabbed the latest(?) published source code (CSBwin_SRC_20190702.7z) and compiled it. The utility works, but the game itself crashes with segfault when I click 'Prison' or 'Resume'. Gdb backtrace suggests that this occurs somewhere in the UI (also the quick playback works):

(gdb) bt
#0 0x0000000000443079 in UI_ProcessOption(char**, int&) ()
#1 0x00007fffffffde30 in ?? ()
#2 0x000000000047bba2 in SOUNDER::Sound(char*, int) ()
#3 0x000000000047bc04 in StartSound(unsigned char*, int, int) ()
#4 0x00000000004354aa in _TAG01f746() ()
#5 0x00000000004372db in DispatchCSB(CSB_UI_MESSAGE*) ()
#6 0x000000000044a31b in CSBUI(CSB_UI_MESSAGE*) ()
#7 0x0000000000443dd4 in Process_ecode_IDC_Timer() ()
#8 0x00000000004447ef in Process_SDL_USEREVENT() ()
#9 0x00000000004451b8 in main ()

Running 32bit version on 64bit OS was a bit messy (had to install a few libraries), and that crashed at some point in the beginning as well.

I wonder if there is a newer CSB packaging for linux 64-bit than the ones from 2015/2019 or more recent source? I wonder if the backtrace provides sufficient information to figuring out what's wrong in 20190702?

After converting the characters with the self-compiled binary I can now successfully play with the 2018-04-21 published binary. But I suppose going forward it would be nice to have this sorted out.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Re: Linux 64-bit binary and build issues

Post by Paul Stevens »

After converting the characters with the self-compiled binary I can now successfully play with the 2018-04-21 published binary. But I suppose going forward it would be nice to have this sorted out.
I'm glad you found a way to play. But you are certainly correct. It would be nice
to sort this out. Let me see what I can do. I had rather forgotten this entire
project and it might take me a bit of time to get started again.

My minimal goal is to publish a new source and a 64-bit linux binary.
Then......well, we will see.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Re: Linux 64-bit binary and build issues

Post by Paul Stevens »

I finally got around to trying this.

I downloaded CSBwin_SRC_20190702.7z, unzipped it, compiled it on
my 64-bit Ubuntu machine using the 'makefile' contained in the zip archive,
and placed it in a Dungeon Master folder with a 'config.linux'. It
worked just fine. It also worked without the 'config.linux'.

So, unless you have any great ideas, I suppose the next step is for you
to ship me your game folder with all the needed files (including the
executable) so that I can see if I can get it to fail on my machine.
It is hard to fix things that don't fail.
pjs
Novice
Posts: 14
Joined: Thu Dec 30, 2021 8:37 pm

Re: Linux 64-bit binary and build issues

Post by pjs »

Sorry, I had missed your reply. Now that I checked this again, I still see similar problems. When compiling "CSBwin_SRC_20190702.7z", I'll have to create "CSB" subdirectory manually, however, otherwise it won't link.

I have put two tarballs on a google drive. First includes a dump of the source file directory after compilation. The second includes the binary and the data files and a couple of saves copied from a year back.

https://drive.google.com/drive/folders/ ... sp=sharing

With this binary and saves, like a year ago, the utility seems to work to some degree, but clicking "resume" or "prison" crashes. These saves work with an earlier binary as described in the original post.

Hope this helps..
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Re: Linux 64-bit binary and build issues

Post by Paul Stevens »

Well here is what I did on a X86 64-bit Ubuntu machine:

I unpacked your binary and data files into a directory CSB1.
I played the game, restarting from CSBGAME.DAT. Everything worked
as far as I could tell.

I unpacked your source into directory CSB2.
I "touched *.cpp" and did a "make". All the files
compiled without error and the linking worked without error.
I copied the game files into subdirectory "CSB" (where the
executable was) and played the game, starting at CSBGAME.DAT.
Everything worked well as far as I could tell. I packed up the
contents of the CSB subdirectory and posted it at:

http://dianneandpaul.net/CSBwin/Games/D ... 127.tar.gz

Could you try it, please?
pjs
Novice
Posts: 14
Joined: Thu Dec 30, 2021 8:37 pm

Re: Linux 64-bit binary and build issues

Post by pjs »

The linked file does not exist (a 404 error). Maybe a wrong name or the file was put somewhere else?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Re: Linux 64-bit binary and build issues

Post by Paul Stevens »

pjs
Novice
Posts: 14
Joined: Thu Dec 30, 2021 8:37 pm

Re: Linux 64-bit binary and build issues

Post by pjs »

For some reason, this version appears to work fine for me, except the keypad bindings are a bit different in the config and don't; replacing the config from an earlier version fixes this. This is the first time I get CSB prison to work for me as well, yay!
Post Reply

Return to “Chaos Strikes Back for Windows & Linux (CSBWin) / CSBuild”