Opened 20 years ago

Closed 20 years ago

#1737 closed defect (fixed)

FOTAQ: DC: Crash when talking to Bellboy

Reported by: SF/metafox Owned by: zeldin
Priority: normal Component: Engine: Queen
Version: Keywords:
Cc: Game: Flight of the Amazon Queen

Description

In the 21-08-2004 CVS build for Dreamcast, initiating the conversation with the bellboy in the hotel lobby causes the system to freeze.

Ticket imported from: #1013886. Ticket imported from: bugs/1737.

Change History (9)

comment:1 by SF/metafox, 20 years ago

Owner: set to zeldin
Priority: normalhigh

comment:2 by fingolfin, 20 years ago

Please do not modify priority values -- those are for internal use only.

comment:3 by fingolfin, 20 years ago

Priority: highnormal

comment:4 by cyxx, 20 years ago

Two bug reports at the same place in the game on two different backends (see #923570)... Maybe a compiler or optimizer bug ? Just to know, was that problem present in scummvm 0.6.0 ?

comment:5 by cyxx, 20 years ago

I take some time to look at the part of code handling the dialogue choices and I just realize that we're doing something not really portable here. We're casting a pointer to an integer in order to read some aligned strings... (see talk.cpp and search for ((int)ptr % align) ).

Thus, in order to work, this part of code require that malloc'ed pointers are aligned on a dword boundary (when align == 4). I don't know if that's a problem for the Dreamcast, but I'll try to find some time to rewrite that part.

comment:6 by zeldin, 20 years ago

malloc()ed memory always have 8 byte alignment on Dreamcast, so that's not the problem. But I think you're on the right track. I see that the pointer is casted to a _signed_ int before the % operation. % in C is not really a modulo operator; it will return negative results if the left operand is negative. And guess what? Addresses in the Dreamcast port will have the MSB set. Don't cast them to signed types.

comment:7 by cyxx, 20 years ago

Ok, I just rewrote that part of code. Can someone here with a dreamcast test if that helps ?

comment:8 by SF/metafox, 20 years ago

cyx - It works great now. Thanks. :)

comment:9 by cyxx, 20 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.