#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)
Change History (17)
by , 17 years ago
comment:1 by , 17 years ago
What exactly is the meaning of that error message? what should I be look for, code wise?
comment:2 by , 17 years ago
Owner: | set to |
---|
comment:3 by , 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 , 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 , 17 years ago
Chris, it would be *really* helpful if you could provide some extra info.
comment:6 by , 17 years ago
Summary: | PalmOS: Elvira I crashes after game screen is rendered → PALM: Elvira I crashes after game screen is rendered |
---|
comment:7 by , 17 years ago
Here are the requested outputs. Sorry for the delay. File Added: logs.zip
comment:8 by , 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 , 17 years ago
Priority: | normal → blocker |
---|
comment:10 by , 17 years ago
Summary: | PALM: Elvira I crashes after game screen is rendered → PALM: Elvira 1/2 crashes after game screen is rendered |
---|
comment:11 by , 17 years ago
Priority: | blocker → low |
---|---|
Status: | new → pending |
comment:12 by , 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 , 17 years ago
Status: | pending → closed |
---|
comment:14 by , 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 , 17 years ago
Owner: | changed from | to
---|---|
Resolution: | → fixed |
PalmOS debug log (-d5)