Opened 12 years ago

Closed 11 years ago

Last modified 11 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
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 12 years ago.
PalmOS debug log (-d5)
logs.zip (9.0 KB) - added by SF/chrilith 11 years ago.
-d2 Elvira 1 / -d3 Elvira 2

Download all attachments as: .zip

Change History (17)

Changed 12 years ago by SF/chrilith

Attachment: scumm.log added

PalmOS debug log (-d5)

comment:1 Changed 12 years ago by Kirben

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

comment:2 Changed 12 years ago by Kirben

Owner: set to Kirben

comment:3 Changed 12 years ago by fingolfin

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 Changed 12 years ago by Kirben

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 Changed 12 years ago by fingolfin

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

comment:6 Changed 12 years ago by fingolfin

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

Changed 11 years ago by SF/chrilith

Attachment: logs.zip added

-d2 Elvira 1 / -d3 Elvira 2

comment:7 Changed 11 years ago by SF/chrilith

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

comment:8 Changed 11 years ago by Kirben

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 Changed 11 years ago by Kirben

Priority: normalblocker

comment:10 Changed 11 years ago by Kirben

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

comment:11 Changed 11 years ago by SF/chrilith

Priority: blockerlow
Status: newpending

comment:12 Changed 11 years ago by SF/chrilith

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 Changed 11 years ago by SF/chrilith

Status: pendingclosed

comment:14 Changed 11 years ago by SF/chrilith

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 Changed 11 years ago by Kirben

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