Crash on industry action 0 & possibly missing cargo prop

Got a problem with TTDPatch? Get help here.

Moderator: TTDPatch Moderators

Post Reply
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Crash on industry action 0 & possibly missing cargo prop

Post by DaleStan »

The attached config breaks both alpha 58 and alpha 59 pre 3, producing the included crashlogs, and the following output from TTDPatch.

Code: Select all

TTDLOADW.OVL is OK.
This version of the program has known addresses.
Starting TTDLOADW.OVL
Result: [Error!]
Press any key to abort.
If I split sprite 72 (the one that causes the crash), as in ArticOre2w.grf

Code: Select all

-   -1 * 19   00 0A 02 02 00 10 0D FF 05 FF 11 01 0C ff ff 07 0D FF FF
+   -1 * 13	00 0A 02 01 00 10 0D FF       11 01 0C ff ff 
+   -1 * 13	00 0A 02 01 01 10       05 FF 11             07 0D FF FF
then both versions then complain about "Invalid sprite #69 (code 6/66)". By my count, that's cargo property 16, which I thought was added in alpha 58.
Attachments
stuff.rar
(32.17 KiB) Downloaded 32 times
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Re: Crash on industry action 0 & possibly missing cargo

Post by Patchman »

DaleStan wrote:By my count, that's cargo property 16, which I thought was added in alpha 58.
So I thought too. But it turns out that one has to add new properties in two places, and I forgot one of them.

I'm not sure what causes the crash, I'm not too familiar with newindustries code. For Csaba, the crash is at the rep movsb in setnormalindustryprop. Somehow EDI doesn't get set correctly, but I fail to see why.
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

OK, I looked into it. It's a fairly silly bug that must've been there almost forever. It should've triggered whenever action 0 had nprops>1 for certain combinations of features/properties (namely those with a special handler function).

The first one would work correctly, but the following ones would set the property given by the previous property value instead of the property number.

I'm surprised it didn't cause problems earlier, or maybe it did but they were never identified...

[edit] It actually only affects those properties which share handlers with other properties it turns out. That's only industry properties 0B..14. Mystery solved!
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
Post Reply

Return to “Problems with TTDPatch”

Who is online

Users browsing this forum: No registered users and 11 guests