News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

[BUG] Possibility of factory smoke crash

Started by Ranran(retired), August 20, 2020, 06:14:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran(retired)

I was doing a desync check in a loacal environment and the server side crashed, so I quit the client that was alive, loaded the save in a debug build, and after a while, it crashed.

I'm not sure what to report, so I'll paste the image. (´・ω・`)









gr seems to be NULL.

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

jamespetts

Interesting, thank you for this. Can you check what sort of industry it was with a NULL ground? If it was a water industry, the fix should be a simple check to see whether gr is NULL. That should stop the crash in other cases, but something is wrong if welt->lookup_kartenboden() is returning NULL on any valid land tile (or if a non-water industry is giving it a tile other than a valid land tile here).
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.

Ranran(retired)

Quote from: jamespetts on August 20, 2020, 06:38:36 PMCan you check what sort of industry it was with a NULL ground?
It was a coal mine and a coal power plant around 1910. I was connecting the two and playing for a while.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

TurfIt

Rotated factory near the map edge? Standard used to crash from that - already fixed.

jamespetts

Quote from: TurfIt on August 20, 2020, 07:26:43 PM
Rotated factory near the map edge? Standard used to crash from that - already fixed.

Interesting, thank you for letting me know. May I ask how one would go about finding the fix in the Standard Github repository that mirrors the SVN?
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.

Ranran(retired)

Quote from: TurfIt on August 20, 2020, 07:26:43 PMRotated factory
No. (´・ω・`)

Quotenear the map edge?
Yes.


I was wondering if the saved game was lost due to the crash, but fortunately the first data was left.
So I managed to make a saved game that can reliably reproduce this crash.

Load this saved game and fast forward a bit. Soon your game will be burnt in smoke.
You can check if this issue is fixed.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

jamespetts

Thank you for that - that is helpful. What it appears was happening was that gr was being set from an invalid tile (-1, 185), and so was becoming NULL. This was because nothing in the code constrained the tile to one within the map. I have added code so constraining it, so now it does not crash, and, unlike the simple solution of simply checking whether gr is NULL, also does not prevent the factory smoke from working. The smoke does not move as much as it would in a different position, but this is preferable either to crashing or there being no smoke at all.

I should be grateful if you could re-test with the latest version on the master branch. Thank you.
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.

Ranran(retired)

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

jamespetts

Quote from: Ranran on August 27, 2020, 12:24:09 PM
I've confirmed that this bug has been fixed.
Thank you for your work. (´・ω・`)b

Splendid, thank you for confirming.
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.