News:

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

All industries lose connections without warning, usually a crash after.

Started by merry, March 14, 2024, 05:50:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

merry

Having recently returned to Simutrans-Extended, i am finding that maps can suddenly, and with no identifiable reason, lose all connections between industries (whether there is a transport conenction or not). Most times, after viewing an industry where the 'missing connections' are warned of, the game crashes shortly afterwards (crash = unscheduled immediate termination of process, in this case).
Version in use: 123.0.1 build 14.21
This is making games frustratingly unplayable, even if saved regularly.

I am working in about 1853, but haven't built railways yet so transport is primarily road carriages, ships, and canals. If that has any bearing on the matter.

i have searched bug reports and scrolled through bug lists, and can't see this reported, so forgive me if it is a known issue, I couldn't find the report when I searched.

Ranran(retired)

Developers appreciate that you take the trouble to report a bug.
It will improve the game.

I think one cause I can think of is related to the new just_in_time=5 that was added about two years ago.
The configuration is not playable, it has not been extensively tested, and there is no one to fix it.
That setup will cause mass factory closures anyway.
I think the phenomenon you reported is similar to what occurs in that setting.
(However, the root cause may also be the closure and regeneration of the industry)

Can you check what just_in_time is set to?
You can check it by pressing the shortcut key i to open the settings dialog, then open the economy tab.

Also, submitting reproducible save data will almost always lead to early resolution of bugs.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

merry

A couple of updates:
(1) just_in_time = 4 (this will have come from defaults)
(2) recently, I left the game running for a few game-months - the connections disappeared during that time but it didn't crash (perhaps I didn't open a dialog at a critical point? So I have before & after saves (links in onedrive) if that helps.
Save before (link)
Save after (link)
Hopefully someone will be able to use these to improve the situation (either a fix or workaround). Unfortunately i'm not much of a coder... 'tinkerer' is about my limit these days.

Ranran(retired)

I tried using the before save to advance to Feb.1858, but was unable to reproduce the game crash...
However, no industry closures occurred during that time.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

jamespetts

Thank you very much for your report and apologies for not having had the chance to respond hitherto. Generally, finding and fixing bugs is only really possible (within the resources of amateur developers such as those who work on Simutrans, at least) with a reliable reproduction case. That means a saved game in which the fault can reliably be reproduced (if necessary, by following specific instructions) within a reasonable time so that we can look inside the game code when the problem occurs or get a backtrace for any crash.

I note that Ranran has had trouble reproducing the crash from the saved game, suggesting that the bug may be hard to find. Unfortunately, intermittent bugs are typically difficult to reproduce and track down. If we can get a reliable reproduction case, especially for the crash, that would be very helpful (although it might turn out that the crash is just a symptom of all the industries losing their connexions, and that what we need to track down is the earlier point in time when this happens).
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Modular6638

I'm having the same issue in every map I make. Here are some things I observed
- It does not matter the year or map.
- It seems to happen more often when placing a new stop & line near the end of the month.
- The game doesn't always crash immediately, it only does so when opening a factory info window and clicking on the empty space where the missing supplier/consumer are supposed to be, early on it also seemed to happen if I kept the factory window open.

I tried debugging, and in gui_factory_connection_stat_t::infowin_event the variable target_fab is null and is being accessed. My understanding is that if another factory is not linked, its not supposed to be in fab_list, but the missing connection is still in there. So that is the cause of the crash. Looking into it more, the reason fabrik_t::get_fab(fab_list[line]) returns null is because of the is_factory flag of the associated gebaeude_t is false. I think there might be a problem in the newmonth update because of when the crashes seem to happen and that is also one of the few points where is_factory is modified. Still trying to look into it but my first time looking at the code.

Ranran(retired)

Thank you for confirming.
fab_list was originally vector_tpl<koord>, but PJMack changed it to a different type, so it won't get the correct koord if there is no factory.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)