Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#3252 closed defect (fixed)

PALM: Elvira 1/2 crashes after game screen is rendered

Reported by: SF/chrilith Owned by: SF/chrilith
Priority: low Component: Engine: AGOS
Version: Keywords:
Cc: Game: Elvira 1

Description

Hi,

This problem occured with Elvira I and II right after the game screen is rendered. System report "Non-Word-aligned handle", so it should be an aligment problem.

I have attached a -d5 output. Version 0.11.0svn (2007-06-16) Elvira I and II AtariST/French/Floppy

Thanks Chris

Ticket imported from: #1738485. Ticket imported from: bugs/3252.

Attachments (2)

scumm.log (101.0 KB ) - added by SF/chrilith 17 years ago.
PalmOS debug log (-d5)
logs.zip (9.0 KB ) - added by SF/chrilith 17 years ago.
-d2 Elvira 1 / -d3 Elvira 2

Download all attachments as: .zip

Change History (17)

by SF/chrilith, 17 years ago

Attachment: scumm.log added

PalmOS debug log (-d5)

comment:1 by Kirben, 17 years ago

What exactly is the meaning of that error message? what should I be look for, code wise?

comment:2 by Kirben, 17 years ago

Owner: set to Kirben

comment:3 by fingolfin, 17 years ago

A non-word-aligbned error would happen if 16 or 32 bit of data are read in one go, from a non-aligned address. So on targets where this is a problem, we #define SCUMM_NEED_ALIGNMENT, which in turn causes safe code to be used for functions like READ_UINT32 etc. -- safe here means that these funcs then read the data bytewise (which is slower, hence we don't always do it).

So, essentially anything that tries to directly read 16 or 32 bit of data from a memory block which is not guaranteed to be memory aligned could trigger the problem.

comment:4 by Kirben, 17 years ago

There was alignment issues in vc45_setWindowPalette() code, but that would only effect Elvira 2 and Waxworks.

The debug levels in the AGOS engine, set a different type of output. The output of debug level 2 (Script opcodes) and 3 (Video opcodes) would be more useful.

comment:5 by fingolfin, 17 years ago

Chris, it would be *really* helpful if you could provide some extra info.

comment:6 by fingolfin, 17 years ago

Summary: PalmOS: Elvira I crashes after game screen is renderedPALM: Elvira I crashes after game screen is rendered

by SF/chrilith, 17 years ago

Attachment: logs.zip added

-d2 Elvira 1 / -d3 Elvira 2

comment:7 by SF/chrilith, 17 years ago

Here are the requested outputs. Sorry for the delay. File Added: logs.zip

comment:8 by Kirben, 17 years ago

Looking at the logs, I suspect the icon decoding code is causing the error. Since you are using AtariST versions of Elvira 1/2, the decompressIconPlanar() function of engines/agos/icons.cpp is been used.

Try adding 'return;' at start of AGOSEngine_Elvira1::drawIcon() and AGOSEngine_Elvira2::drawIcon() functions in engines/agos/icons.cpp, to see if disabling icon decoding prevents the errors.

comment:9 by Kirben, 17 years ago

Priority: normalblocker

comment:10 by Kirben, 17 years ago

Summary: PALM: Elvira I crashes after game screen is renderedPALM: Elvira 1/2 crashes after game screen is rendered

comment:11 by SF/chrilith, 17 years ago

Priority: blockerlow
Status: newpending

comment:12 by SF/chrilith, 17 years ago

I commited a strange workaround for this bug. I've tested many other things but none seems to fix the problem excepted this amazing printf. I reduce the priority for now and keep it open because this is, of course, not the good way to fix this bug...

comment:13 by SF/chrilith, 17 years ago

Status: pendingclosed

comment:14 by SF/chrilith, 17 years ago

Compiler is unbale to optimize properly this piece of code. I changed compiler options and it fixes the problem. We can close this bug since it is due to compiler.

comment:15 by Kirben, 17 years ago

Owner: changed from Kirben to SF/chrilith
Resolution: fixed
Note: See TracTickets for help on using tickets.