News:

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

SIGSEV when opening industry info window

Started by freddyhayward, September 07, 2020, 11:17:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

freddyhayward

Starting a new thread because I'm not sure where it belongs. No reproduction case at the moment. Occurs line 332 of gui_factor_storage_info.cc. Assertion was added to Ranran's patch by ceeac.

Ranran(Hibernating)

I'm not sure if it has something to do with the problem pointed out in this thread. But the compiler was warning about the order of initialization, but I found that applying the GUI overhaul would cause them to crash and not be able to display those dialogs. (´・ω・`)
Therefore I submit a patch that fixes it at this stage. Please check pull request #277.

As far as I confirmed, I think that there is no change in operation with the current version. I don't know about Assertion failure.
However this change seems to be necessary for the GUI overhaul patch.
(´・ω・`)シミュトランスのアップデート履歴(日本語) (※更新停止中)
bit.ly/3AuKHHP

freddyhayward

Update: this is not an assertion failure but a segfault that occurs because of transport_goods being NULL in Ranran's industry UI patch. Ranran, can you please look into this?

Ranran(Hibernating)

(´・ω・`)シミュトランスのアップデート履歴(日本語) (※更新停止中)
bit.ly/3AuKHHP


Ranran(Hibernating)

Can you provide a save game that can reproduce it?
(´・ω・`)シミュトランスのアップデート履歴(日本語) (※更新停止中)
bit.ly/3AuKHHP

freddyhayward

Quote from: Ranran on September 17, 2020, 11:39:40 AM
Can you provide a save game that can reproduce it?
Save the bridgewater-brunel server game, then cllick the builders yard at Pintstock.

freddyhayward

If it's any help, I tried the following 'fixes':
1. do not initialise transport_goods as NULL -> works but possible undefined behaviour
2. if transport_goods == NULL, then transport_goods = new goods_desc_t() -> works but possible memory leak
3. if transport_goods == NULL then continue -> prevents segfault but leads to blank (but clickable) entries

Ranran(Hibernating)

The save data on the bridgewater server is too big to use.

I don't know how the situation was created. I don't think there can be an empty line unless they are connected but there are no goods to transport.
(´・ω・`)シミュトランスのアップデート履歴(日本語) (※更新停止中)
bit.ly/3AuKHHP

jamespetts

Freddy - can you push your no. 3 patch? This should be a temporary solution, I think, as this is much better than crashes occurring.
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.

freddyhayward

I found a better solution that doesn't produce visual bugs or undefined behaviour, and submitted a pull request for it.

jamespetts

Quote from: freddyhayward on September 19, 2020, 11:21:58 AM
I found a better solution that doesn't produce visual bugs or undefined behaviour, and submitted a pull request for it.

Splendid, thank you for that: now incorporated.
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.

Phystam


freddyhayward

Quote from: Phystam on September 20, 2020, 07:02:19 AM
However, the debug message causes another segv.
Reproducable data:https://drive.google.com/file/d/1fR35CSimYnh6_ZuLO1WleaQKXuur20GI/view?usp=sharing

This should be split to a new thread, but I have fixed it here: https://github.com/jamespetts/simutrans-extended/pull/280
James, it would be good to merge this and force-update bridgewater-brunel as soon as possible. Apologies for having caused this with my previous changes.

jamespetts

Thank you for that - I have applied your patch and restarted the server.
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.

freddyhayward

With the UI now working, the underlying issue has been revealed:

The builders yard previously consumed stone from the quarry and wrought iron from the ironworks. Upon being upgraded, it abandoned stone for cement and wrought iron for steel. However, its connections must not have been updated in the process, which now show that it is connected to industries from which it no longer accepts goods.

Ranran(Hibernating)

Yes, I tried to explain that a situation that never happened is happening.
It was trying to show a strange situation where two industries were connected by NULL goods.
Quote from: Ranran on September 19, 2020, 10:07:50 AMI don't know how the situation was created. I don't think there can be an empty line unless they are connected but there are no goods to transport.
(´・ω・`)シミュトランスのアップデート履歴(日本語) (※更新停止中)
bit.ly/3AuKHHP

jamespetts

I am moving this to the solved bug reports section, since the crash has been solved. Any other bug should be reported in a separate thread, as it is confusing to have a discussion about a non-crash bug in a thread whose title refers to a crash bug.
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.