News:

Congratulations!
 You've won the News Item Lottery! Your prize? Reading this news item! :)

Pull request: crash when clicking on various signs

Started by freddyhayward, January 02, 2021, 11:10:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

freddyhayward

https://github.com/jamespetts/simutrans-extended/pull/331
From pull request comment:
Quotethis is a temporary fix that doesn't address the underlying issue - but it will prevent those crashes in the meantime
.

jamespetts

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.

RESTRICTED ACCOUNT

#2
This is caused by the table layout being corrupted because when a cell is hidden, it is considered non-existent and the cell is skipped instead of being considered a 0 size cell if the rigid is false.
I think the cell size should be considered 0,0 if visible is false given that we can toggle the display with set_visible. (Depending on the conditions after initialization)
However, it's standard code and I haven't changed it so I don't know how to fix it. (´・ω・`)

I have made a change so that it wouldn't crash without at least the freddy fix code (it creates an extra empty line), but, it is worth noting that it does not crash even in such a case. Until then, error displays made it difficult to identify where the cause of the problem was. It has been removed. Thank you very much.

Also, one of the root causes is that code is vulnerable to table layout settings, but freddy changes seem to remedy this vulnerability.

EDIT:
Note that my master branch now has a range sort added to the convoy list for another branch. This is a small addition and not very valuable, but if you don't need it, just pick the fix commit.

Please note that google translate gets worse every day.

jamespetts

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.