The International Simutrans Forum

 

Author Topic: Pull request: crash when clicking on various signs  (Read 215 times)

0 Members and 1 Guest are viewing this topic.

Offline freddyhayward

  • Devotee
  • *
  • Posts: 645
  • Languages: EN
Pull request: crash when clicking on various signs
« on: January 02, 2021, 11:10:59 PM »
https://github.com/jamespetts/simutrans-extended/pull/331
From pull request comment:
Quote
this is a temporary fix that doesn't address the underlying issue - but it will prevent those crashes in the meantime
.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20713
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pull request: crash when clicking on various signs
« Reply #1 on: January 02, 2021, 11:19:46 PM »
Incorporated - thank you.

Offline Ranran

  • Devotee
  • *
  • Posts: 1467
  • Languages: ja
Re: Pull request: crash when clicking on various signs
« Reply #2 on: January 03, 2021, 01:52:28 AM »
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.
« Last Edit: January 03, 2021, 02:47:57 AM by Ranran »

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20713
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Pull request: crash when clicking on various signs
« Reply #3 on: January 03, 2021, 11:21:39 AM »
Thank you - now incorporated.