Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assertion triggered on object construction window #5218

Closed
DorpsGek opened this issue Jun 24, 2012 · 4 comments
Closed

assertion triggered on object construction window #5218

DorpsGek opened this issue Jun 24, 2012 · 4 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

foobar opened the ticket and wrote:

OS: Win7 32bit
OpenTTD: r24355

Reproduction steps:
- Start game with attached FRISS newgrf
- Open object construction window
- Widen object construction window to show more columns at right side
- Repeatedly select any of the last four objects
- You will notice that when doing this, the object window narrows, until at some point the game crashes

Same happens in OpenTTD 1.2.1-RC1.

Same behaviour happens in r24355 with Dutch Road Furniture (also attached), when repeatedly changing selection of the "Matrix Sign Activators", but this time without crashing the game. With Dutch Road Furniture, the window not only narrows, but also widens.

Attachments

Reported version: trunk
Operating system: Windows


This issue was imported from FlySpray: https://bugs.openttd.org/task/5218
@DorpsGek
Copy link
Member Author

frosch wrote:

Attached diff makes the object GUI react less weird to selecting different objects by not resizing horizontally due to longer object names.
Apparently changing the number of cells in the WidgetMatrix for the layout requires to reinit the window, but this should not change the horizontal size.

However, even when it acts weird when selecting objects, the ReInit should not cause a crash. The width of the texts would also change when switching languages.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5218#comment11294

@DorpsGek
Copy link
Member Author

DorpsGek commented Jul 5, 2012

foobar wrote:

I've finally gotten around making a build with your patch, and this seems to fix the issue. No crashes any more, and even the object window stays the same size!


This comment was imported from FlySpray: https://bugs.openttd.org/task/5218#comment11306

@DorpsGek
Copy link
Member Author

DorpsGek commented Jul 6, 2012

Alberth wrote:

Imho the proper fix to the size issue is to compute how much the window size needs to be modified before the call to ReInit (and pass that along), instead of detecting the current size is not big enough, and then calling ReInit, while saying "do not resize the window".

A separate issue seems to be the crash itself, which seems to be caused by the object list changing size to one row, but in an inconsistent way. I have not found the missing piece of the puzzle though.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5218#comment11318

@DorpsGek
Copy link
Member Author

DorpsGek commented Jul 7, 2012

frosch closed the ticket.

Reason for closing: Fixed

in r24378 resp. r24379


This comment was imported from FlySpray: https://bugs.openttd.org/task/5218

@DorpsGek DorpsGek closed this as completed Jul 7, 2012
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant