The International Simutrans Forum

 

Author Topic: [7378 and newer] Some paksets does not start  (Read 3227 times)

0 Members and 1 Guest are viewing this topic.

Offline Václav

  • Devotee
  • *
  • Posts: 3324
  • formerly VaclavMacurek
  • Languages: CZ, EN
[7378 and newer] Some paksets does not start
« on: December 06, 2014, 09:36:02 PM »
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.

Code: [Select]
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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10662
  • Languages: De,EN,JP
Re: [7378 and newer] Some paksets does not start
« Reply #1 on: December 06, 2014, 10:36:14 PM »
Please run at higher debug level, because this tells nothing.

Offline Václav

  • Devotee
  • *
  • Posts: 3324
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: [7378 and newer] Some paksets does not start
« Reply #2 on: December 07, 2014, 11:19:36 AM »
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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5691
  • Languages: EN, NO
Re: [7378 and newer] Some paksets does not start
« Reply #3 on: December 07, 2014, 11:23:20 AM »
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.

Offline Václav

  • Devotee
  • *
  • Posts: 3324
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: [7378 and newer] Some paksets does not start
« Reply #4 on: December 07, 2014, 11:24:08 AM »
Pardon. I found. Done. See in my previous post.

Offline Václav

  • Devotee
  • *
  • Posts: 3324
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: [7378 and newer] Some paksets does not start
« Reply #5 on: December 07, 2014, 01:44:33 PM »
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.

Offline TurfIt

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 1434
Re: [7378 and newer] Some paksets does not start
« Reply #6 on: December 07, 2014, 06:13:19 PM »
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.

Offline Václav

  • Devotee
  • *
  • Posts: 3324
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: [7378 and newer] Some paksets does not start
« Reply #7 on: December 07, 2014, 08:35:16 PM »
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?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10662
  • Languages: De,EN,JP
Re: [7378 and newer] Some paksets does not start
« Reply #8 on: December 07, 2014, 10:50:29 PM »
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.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2836
  • Languages: EN
Re: [7378 and newer] Some paksets does not start
« Reply #9 on: December 08, 2014, 12:25:56 AM »
Quote
because 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.

Quote
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.
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.
« Last Edit: December 08, 2014, 12:46:15 AM by DrSuperGood »

Offline Václav

  • Devotee
  • *
  • Posts: 3324
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: [7378 and newer] Some paksets does not start
« Reply #10 on: December 08, 2014, 08:09:34 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?

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2836
  • Languages: EN
Re: [7378 and newer] Some paksets does not start
« Reply #11 on: December 08, 2014, 04:07:56 PM »
Quote
7408?
I was using 7403. A new nightly must have been published since (they are nightly after all lol).

Quote
In Windows it behaves like fatal error.
Quote
And 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.

Offline Václav

  • Devotee
  • *
  • Posts: 3324
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: [7378 and newer] Some paksets does not start
« Reply #12 on: December 08, 2014, 06:10:34 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.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2836
  • Languages: EN
Re: [7378 and newer] Some paksets does not start
« Reply #13 on: December 08, 2014, 06:38:51 PM »
Quote
I 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).
« Last Edit: December 08, 2014, 06:57:35 PM by DrSuperGood »

Offline Václav

  • Devotee
  • *
  • Posts: 3324
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: [7378 and newer] Some paksets does not start
« Reply #14 on: December 08, 2014, 08:04:26 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?

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5691
  • Languages: EN, NO
Re: [7378 and newer] Some paksets does not start
« Reply #15 on: December 08, 2014, 09:40:05 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).

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2836
  • Languages: EN
Re: [7378 and newer] Some paksets does not start
« Reply #16 on: December 09, 2014, 12:55:20 AM »
Quote
Originally 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.