Bug 351171 - egoboo fails to load, segfaults
Summary: egoboo fails to load, segfaults
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: egoboo
Version: 7
Hardware: i386
OS: Linux
high
high
Target Milestone: ---
Assignee: Hans de Goede
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-10-24 19:45 UTC by Kevin Kofler
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version: 2.4.3-4.fc7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-10-29 19:11:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Kevin Kofler 2007-10-24 19:45:47 UTC
Description of problem:
Egoboo is completely unplayable, it segfaults as soon as I try to start a 
game.

Version-Release number of selected component (if applicable):
egoboo-2.4.3-2.fc7

How reproducible:
Always

Steps to Reproduce:
1. Run Egoboo.
2. Pick "Single Player".
3. Pick "New Player".
4. Pick a character.
5. Click "Select Module".

Actual results:
Segmentation fault.

Expected results:
Working game.

Additional info:
Backtrace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208637744 (LWP 12077)]
tell_code (read=3647) at script.c:304
304             cTmp=cLineBuffer[read];
(gdb) bt
#0  tell_code (read=3647) at script.c:304
#1  0x0808944f in parse_line_by_line () at script.c:445
#2  0x08089558 in load_ai_script (loadname=0x808cf9e "basicdat/script.txt")
    at script.c:626
#3  0x0807c27e in load_module (smallname=0x85f0da0 "wizard.mod")
    at module.c:168
#4  0x0806875e in SDL_main (argc=1, argv=0xbfc6e284) at game.c:3919
#5  0x08089b52 in main (argc=Cannot access memory at address 0x27
) at sys_lin.c:31
#6  0x00ae7f70 in __libc_start_main () from /lib/libc.so.6
#7  0x0804aba1 in _start ()

Comment 1 Hans de Goede 2007-10-24 21:35:44 UTC
What fun it turns out all character classes accept the one I was testing with
either hang or crash :)

Well 2 bugs (1 hang, 1 crash) later they all work fine. Can you give the
resulting packages from the following build a try once its finished?
http://koji.fedoraproject.org/koji/taskinfo?taskID=212621

I've tested my fixes on x86_64 F-8(ish) if you can confirm that things are ok on
F-7 i386 now too, then I'll push the fixed build as an update for F-7 and ask
for the F-8 build of the fix to be included in the F-8 release.


Comment 2 Kevin Kofler 2007-10-25 01:35:36 UTC
Unfortunately I still get the segfault with egoboo-2.4.3-3.fc7.i386.rpm from 
Koji.

Comment 3 Kevin Kofler 2007-10-25 01:41:26 UTC
I checked the backtrace and it's still the same.

Comment 4 Hans de Goede 2007-10-25 13:46:23 UTC
Ah, what fun. There was an of by one bug in the script parser that upstream
worked around by treating '\0' as whitespace, causing parts of the parser to go
read beyond the string in uninitialized memory until it finds a non '\0'
character. Which it happens to encounter before segfaulting on x86_64, but on
i386 the memory is zero-ed and it segfaults before encountering a non '\0' char.

This and another crash on x86_64 when a script.txt file didn't end with a
newline (paladin class) have been fixed in this build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=213887

Which works well for me. I'll be pushing this to updates-testing, I've put the
koji URL above as it may take a while before the update actually shows up.

Thanks for reporting this! Any further feedback is much appreciated (I ported
this from win32, hence the slew of bugs). Further feedback is esp. appreciated
as  I will be requesting inclusion in F-8 release of this version (as the
current version is rather poor).


Comment 5 Kevin Kofler 2007-10-25 13:52:48 UTC
I can confirm that egoboo-2.4.3-4.fc7 from Koji works.

Windowed mode doesn't quite do the right thing though (using mouse movements as 
input and not capturing the mouse means it's a PITA to control the character). 
(Should I file a separate bug report about that?)

Comment 6 Hans de Goede 2007-10-25 14:04:48 UTC
(In reply to comment #5)
> I can confirm that egoboo-2.4.3-4.fc7 from Koji works.
> 
Good! I hope you enjoy playing it and please let me know of any other bugs.

> Windowed mode doesn't quite do the right thing though (using mouse movements as 
> input and not capturing the mouse means it's a PITA to control the character). 
> (Should I file a separate bug report about that?)

Well you can also control the character with the numeric keypad, and not
capturing the mouse in windowed mode is a feature not a bug IMHO, as capturing
the mouse in windowed mode makes it (nearly) impossible to debug a graphical
application on a single head machine. If you want to play with the mouse, play
fullscreen!


Comment 7 Kevin Kofler 2007-10-25 14:11:08 UTC
I agree that capturing the mouse is an annoyance, if I use windowed mode, I 
don't want the game to capture everything anyway. Thanks for the hint about the 
numeric keypad.

Comment 8 Fedora Update System 2007-10-29 19:11:01 UTC
egoboo-2.4.3-4.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.