Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#4579 closed defect (fixed)

T7G: Compiling in Visual C++ 2008 Express causes error

Reported by: SF/aroenai Owned by: bluegr
Priority: normal Component: Engine: Groovie
Version: Keywords: build
Cc: Game: 7th Guest

Description

Compiling ScummVM in MS Visual C++ 2008 Express Edition causes a "Trying to read a script byte at address 0xF102, while the script is just 0x4113 bytes long!" error when starting The 7th Guest. The game works normally in the daily build, I keep getting this error on both my computers after I compile the project.

This is a fresh svn checkout of r43847.

Ticket imported from: #2847539. Ticket imported from: bugs/4579.

Attachments (1)

vs2008grooviefix.patch (1.1 KB ) - added by SF/aroenai 15 years ago.
makes groovie load when built in release mode

Download all attachments as: .zip

Change History (16)

comment:1 by SF/aroenai, 15 years ago

Priority: normalhigh

comment:2 by wjp, 15 years ago

Please don't change the priority of tickets.

comment:3 by wjp, 15 years ago

Priority: highnormal

comment:4 by scott-t, 15 years ago

Have you tried a full build after doing a clean? If "starting" means straight after loading from the launcher, then it almost appears an endian issue since there is a jump to 0x02F1, but there is no reason for the swap to occur.

Several other devs also use MSVC (myself included) and haven't encountered this issue.

comment:5 by SF/aroenai, 15 years ago

Yes, it does the same thing whether I do a fresh svn checkout or use the clean option from the build menu. Right, it's from the launcher, I double click the name and that error pops up.

comment:6 by scott-t, 15 years ago

Actually, I've just encountered this for the first time now. For some reason, it's being triggered in Release mode while I usually run in Debug mode which is a regression _somewhere_ (I'm 95% sure I've run in Release before fine), but I don't know where, or where to start looking :/

comment:7 by SF/aroenai, 15 years ago

I can confirm that it works normally when you set it to debug, release mode is what causes it.

I'm not sure, but I think it happened sometime around the time when the output directory for the final exe changed.

comment:8 by SF/aroenai, 15 years ago

I was right, here's where it started:

r42286 - Groovie works fine in release

r42287 - (doesn't compile, preparing for r42288 I guess)

r42288 - "Trying to read a script byte at address 0xF102, while the script is just 0x4113 bytes long!"

by SF/aroenai, 15 years ago

Attachment: vs2008grooviefix.patch added

makes groovie load when built in release mode

comment:9 by SF/aroenai, 15 years ago

maybe groovie.vcproj is getting the wrong options? I just added some stuff that was different in the previous file version and after I compiled in release mode it worked, so there's probably a lot of junk that isn't actually needed in my patch but maybe it's a good starting point.

comment:10 by scott-t, 15 years ago

Thanks for tracking it down. I'll try to take a look over the next few days.

comment:11 by fingolfin, 15 years ago

What is the status of this item?

comment:12 by scott-t, 15 years ago

I got caught up with RL for a while, but I did get a chance to take a look at it with [md5] on IRC 2 days ago. It appears we can "fix" the problem by changing the optimization level in the Release vsprops file from 1 to 3, however rather than just committing this, it would be nice to work out why changing the optimisation level fixes it.

aroenai: Can you confirm that just the change in optimisation level removes the error?

comment:13 by bluegr, 15 years ago

I changed the optimization settings to the default (i.e. full optimization), and this seems to have fixed it

Closing this

comment:14 by bluegr, 15 years ago

Owner: set to bluegr
Resolution: fixed
Status: newclosed

comment:15 by scott-t, 15 years ago

After some discussion on IRC, we found an ambiguity in the Groovie multi-byte script variable reads which should certainly fix any future issues.

Note: See TracTickets for help on using tickets.