1.1 Bug Report: Cross-mod code contamination due to <Globals

Bug reports for the stable versions go here.
Post Reply
User avatar
pixelfck
Militia Captain
Militia Captain
Posts: 571
Joined: Tue Aug 11, 2009 8:47 pm
Location: Travelling around in Europe

Tue Apr 30, 2013 5:32 pm

I found a very nasty bug, maybe it is a known issue, but I could not find any info on it so I'll just post it here.

Bug description:
When there is tLisp code in a <Globals> block, the script is loaded, even if the mod is *not* selected at game start.
Since the mods sorted by UNID, the last mod is the one to take prevailance, the <Globals> block from this last mod will always overwrite the ones from mods before it, whether the mod is selected at game start, or not.

Bug replication code download:
download


How to reproduce:
1. Download the bug replication mod;
2. Clear all mods from the 'Extensions' folder;
3. Install the two mods;
4. Start a new game with 'Test Mod A v1.0' selected and 'Test Mod B v1.0' *un*selected;
5. Select the Debug-class yacht (the modified Sapphire) and start the game;
6. Press 'U' (use) and choose the 'Test ROM':

Expected result:
An on-screen message saying: "Hello, I'm the Test ROM from Test Mod A!"

Actual result:
An on-screen message saying: "Hello, I'm the Test ROM from Test Mod B!"

Cheers
Image
Download the Black Market Expansion from Xelerus.de today!
My other mods at xelerus.de

PM
Fleet Admiral
Fleet Admiral
Posts: 2239
Joined: Wed Sep 01, 2010 12:54 am

Sun Aug 11, 2013 3:11 pm

EDIT: Nevermind. (Did not fully read everything carefully.)
Download and Play in 1.7 Beta...
Playership Drones v7 (Beta): Acquire and command almost any ship in Stars of the Pilgrim or Eternity Port.
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Relive classic arcade gaming in a new Transcendence adventure!
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.

george moromisato
Developer
Developer
Posts: 2877
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Sun Aug 11, 2013 3:51 pm

I'll look into it and see how hard it is to fix.

<Globals> were originally considered to be, well, global, so they were not expected to clash. But of course, that's not possible with all the different extensions being created.

User avatar
pixelfck
Militia Captain
Militia Captain
Posts: 571
Joined: Tue Aug 11, 2009 8:47 pm
Location: Travelling around in Europe

Fri Aug 16, 2013 11:08 am

I understand where the bug comes from. the globas tag is not identified by a UNID, so the engine has no method, other than file inclusion-chain to identify where a global block belongs to.

But I guess you can image the frustration it took to track this one down :D

~Pixelfck
Image
Download the Black Market Expansion from Xelerus.de today!
My other mods at xelerus.de

george moromisato
Developer
Developer
Posts: 2877
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

Fri Sep 13, 2013 4:36 pm

I believe I have fixed this in 1.2 Beta 2. Please try it out.

The fix is to re-run the <Globals> for the selected extensions/adventure at game-start and game-load time.

User avatar
pixelfck
Militia Captain
Militia Captain
Posts: 571
Joined: Tue Aug 11, 2009 8:47 pm
Location: Travelling around in Europe

Fri Sep 13, 2013 5:05 pm

Thanks.
I read so in the changelog, but did not yet have time to check it out. (But I did remove the 'mod' from xelerus.)
Image
Download the Black Market Expansion from Xelerus.de today!
My other mods at xelerus.de

Post Reply