News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

[7378 and newer] Some paksets does not start

Started by Václav, December 06, 2014, 09:36:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Václav

I found it with Pak96.comic.

May it be that it is related to something special that is only in this pakset.
May it be that it happens with some other paksets - but I did not test it (excepting a bit older version of pak128, but it runs correctly).

After choosing of pakset, while map is loaded, game crashes. I added produced log text.


Simutrans version 120.0.1 Nightly from Dec  6 2014 r7403
Preparing display ...
parse_simuconf() at pak96.comic/config\simuconf.tab:
Reading city configuration ...
Reading speedbonus configuration ...
Reading menu configuration ...
Reading object data from pak96.comic/...
Reading menu configuration ...
Midi disabled ...
World destroyed.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

prissi

Please run at higher debug level, because this tells nothing.

Václav

Done.

New log is in attachment.

It seems like if it searches for some factories and goods - but I did not change anything in this part.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

Ters

Stuff like this should be done as an attachment. If the file is too big for that, try compressing it. Text like this should compress well.

Václav

Pardon. I found. Done. See in my previous post.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

Václav

1. It seems it was something in file demo.sve - there were still loaded factories from older version of SVN (where some factories and goods have a different name)

2. So, still come question why this version-mismatch began doing problems so late, in 7378.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

TurfIt

It works fine with 'pak96.comic-0.4.10-plus.zip'. The log you posted shows you're either using a different version, or have modified it.
The log also shows a large number of addons being loaded with 'filename='addons/pak96.comic/factory.nuclearkraftwerk.pak'' being the problematic one. It appears to have defined different goods than the nuclearkraftwerk contained in the 'exp-nuclear-ener.pak' that's expected by the demo.sve.

Václav

Yes. It is possible.
Factories of nuclear chain were added to SVN of pak96.comic some time later - and later (after this, uploading to SVN) chain was changed (but chain could be changed before uploading to SVN, I don't know). Goods were renamed and nuclear powerplant was changed - because it did not produce electric power when nuclear waste had to be produced too.

Question is: Why problem with this mismatch appeared so late?

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

prissi

I guess the JIT2 patch has troubles with unknown factories/goods upon loading a game. I had this error twice, but could not really find a quick solution.

DrSuperGood

#9
Quotebecause it did not produce electric power when nuclear waste had to be produced too.
The factory logic for this was missing. I could add it to JIT2 if desired.

QuoteI guess the JIT2 patch has troubles with unknown factories/goods upon loading a game. I had this error twice, but could not really find a quick solution.
I admit I never designed it to cope with missing factories. However I did try to design it as robust as the existing system (I thought it would destroy factories/goods during load if their besche was missing).

Does it crash (fatal error) or just fail to load?

EDIT:
I tried pak96.comic with the latest nightly and it loaded the demo map fine.

Václav

Quote from: DrSuperGood on December 08, 2014, 12:25:56 AM
Does it crash (fatal error) or just fail to load?
In Windows it behaves like fatal error.

Quote
EDIT:
I tried pak96.comic with the latest nightly and it loaded the demo map fine.
7408? I will try it.

And in attachment you have my old demo.sve with which it fails.



Could you send me your demo.sve?

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

DrSuperGood

Quote7408?
I was using 7403. A new nightly must have been published since (they are nightly after all lol).

QuoteIn Windows it behaves like fatal error.
QuoteAnd in attachment you have my old demo.sve with which it fails.
Loaded the attached save "demo.sve" in simutrans r7403 using pak96.comic (downloaded for version 120.1) and there was no fatal error. Both the standard demo map and the demo map you attached loaded successfully. No fatal errors were encountered.

Try re-downloading pak96.comic for Simutrans 120.1 and see if it still crashes. In order to find the cause of the error it needs to be re-creatable.

Václav

Quote from: DrSuperGood on December 08, 2014, 04:07:56 PM
Try re-downloading pak96.comic for Simutrans 120.1 and see if it still crashes. In order to find the cause of the error it needs to be re-creatable.
I use updated nuclear chain as is currently available on SVN. There are new names of factories and goods.

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

DrSuperGood

#13
QuoteI use updated nuclear chain as is currently available on SVN. There are new names of factories and goods.
What was wrong with the existing nuclear chain?

Could you link me to a pre-built download of the particular version giving problems?

I will revise the load code for factories. It might be that some consistency checks are missing (however that should apply to all versions).

EDIT:

I think I might have found the problem. There is no code in place to handle loading factories who besche has changed such that the number of inputs/outputs no longer matches. The old amount will be loaded yet data only exists for the new amount. This means that if ever you were to change the number of inputs/outputs, when loading it will not load the correct number. When raising it will result in a factory with missing inputs/outputs. When lowering it will result in a factory with too many inputs/outputs and a fatal error will occur during a tick process as it tries to fetch information from the besche that does not exist.

The solution in this case is that after loading all inputs/outputs it should check for number equality with the factory besche. If not equal it should resize and initialize so that the appropriate number of inputs and outputs is always present. Factory linking might still be messed up however (it should ideally apply a re-linking stage for any new or substantially changed inputs).

I will need the version which is giving problems to confirm this. I am also waiting for my JIT2 revision to be approved as it substantially alters the factory code (neatens it up a bit).

Václav

Quote from: DrSuperGood on December 08, 2014, 06:38:51 PM
What was wrong with the existing nuclear chain?
Originally some goods have a different name (I don't know reason of change of their names)
Originally nuclear plant was coded to produce nuclear waste - but producing of electricity was out of order

Quote
... for number equality with the factory besche
What is besche?

Chybami se člověk učí - ale někteří lidé jsou nepoučitelní

Ters

Quote from: Václav on December 08, 2014, 08:04:26 PM
What is besche?

I think he's referring to besch, a very important data type, or rather familiy of data types, in Simutrans. It's short for beschreibung, meaning description, descriptions of anything a pak set provides (except texts and tab file parameters).

DrSuperGood

QuoteOriginally nuclear plant was coded to produce nuclear waste - but producing of electricity was out of order
Yeh the industry model was not really designed for that. I could add some logic for power producing factories however there may be other issues such as the waste consumer satisfaction being used to determine city growth. However it appears that the version of pak96 comic used by 120.1 already has this change so it cannot be the cause (I do not see the nuclear power station producing anything in the demo map). As such this change must have happened a long time ago so is not the cause.

Without being able to re-create the error I cannot find the cause. I can only theorize that it may have something to do with changes in the input/output amount of some factories since there appears to be no after load logic check to correct for missing or excess inputs/outputs. If you could link me a download link to the version of pak96 comic giving you problems I will try and resolve the issue as quickly as possible.