ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Tue Apr 24, 2018 6:33 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Stupid issue with T1
PostPosted: Sat Jun 19, 2010 7:27 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 704
So I'm playing a mage in T1, aka Pernband. (Yes I know it's old. :P ) I hit m, a for my first spellbook, and then a for the first spell - while holding down the shift key, which *should* display the information on the spell, as with browsing the book. Instead, it causes T1 to crash immediately. If I invoke T1 from the console I get this rather cryptic error when it crashes:

Code:
./tome: software bug 99 33


What does this mean and how can I fix it?


Top
 Profile  
 
 Post subject: Re: Stupid issue with T1
PostPosted: Sat Jun 19, 2010 7:32 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 704
Update: GDB tells me this, for whatever it's worth:

Code:
Program received signal SIGSEGV, Segmentation fault.
0xb7d4ea6d in vfprintf () from /lib/libc.so.6


Also, this is on Zenwalk 6.4, but the bug is observable on Slackware 13 and Arch Linux current.


Top
 Profile  
 
 Post subject: Re: Stupid issue with T1
PostPosted: Mon Jun 21, 2010 1:18 am 
Offline
Reaper

Joined: Sun Jan 26, 2003 11:49 pm
Posts: 1715
Location: West Virginia
I have no idea of what the problem is.

But your post reminded me of what a great game T1 was. I especially liked playing lost souls. I don't think a game ever lasted more than 15 minutes. And the more times I died, the harder it got.


Top
 Profile  
 
 Post subject: Re: Stupid issue with T1
PostPosted: Tue Jun 22, 2010 4:40 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 704
Argh, this happens on the precompiled Windows version too. "tome.exe has experienced a severe error and must close" or whatever. Bleh.


Top
 Profile  
 
 Post subject: Re: Stupid issue with T1
PostPosted: Sun Jun 27, 2010 8:06 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 704
Okay I think I found it. GDB backtrace says this:

Code:
#3  0x0814e751 in vstrnfmt (
    buf=0xbfffeecf "Level 136049245 ?ยค\211\"\bpy\"\b8???", max=78,
    fmt=0x81a5020 "Level %d %s %s (%d mana, %d%% fail)? ",
    vp=0xbfffee84 "pb\034\b\001") at z-form.c:567


And look what's just above line 567?

Code:
            /* Hack -- convert NULL to EMPTY */
            if (!arg) arg = "";


I'm not sure, but I THINK there ought to be a space between those quotes. Let's see if that fixes it.


Top
 Profile  
 
 Post subject: Re: Stupid issue with T1
PostPosted: Sun Jun 27, 2010 8:10 pm 
Offline
Uruivellas

Joined: Tue Dec 13, 2005 12:35 am
Posts: 704
... Nope, no fix. Dang.


Top
 Profile  
 
 Post subject: Re: Stupid issue with T1
PostPosted: Wed Dec 14, 2011 11:32 pm 
Offline
Cornac

Joined: Fri Dec 09, 2011 4:19 pm
Posts: 41
It looks like the code assumes that arg is guaranteed to exist at this point, and is inadvertently writing to some random memory that probably doesn't belong to the program. Also:

Code:
fmt=0x81a5020 "Level %d %s %s (%d mana, %d%% fail)? ",
vp=0xbfffee84 "pb\034\b\001") at z-form.c:567


The format list is calling 5 variables: int, string, string, int, int
Yet the argument buffer contains only 4 arguments. So something is not getting passed correctly.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group