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

Core dump if no widgets are visible #8811

Open
white-haired-uncle opened this issue Apr 27, 2024 · 1 comment
Open

Core dump if no widgets are visible #8811

white-haired-uncle opened this issue Apr 27, 2024 · 1 comment
Labels
Bug Issues involving unexpected behavior. UI User interface issues, including both back-end and front-end issues.

Comments

@white-haired-uncle
Copy link
Contributor

white-haired-uncle commented Apr 27, 2024

Game and System Information

  • Version:
    Battle for Wesnoth v1.19.0-dev (ebe84ce5e68-Modified)
  • OS:
    Linux spartan 5.15.0-97-generic #107-Ubuntu SMP Wed Feb 7 13:26:48 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Description of the bug

Wanting to test that visible was a valid property of a stacked widget, I set it to visible=false and wesnoth crashed. I believe the cause is that it was the only widget and therefore there was nothing to display.

wesnoth: src/gui/widgets/widget.cpp:242: virtual void gui2::widget::place(const point&, const point&): Assertion `size.x >= 0' failed.
Abort(coredump)

Steps to reproduce the behavior

  1. Start attached scenario
  2. Use menu item 'stacked_widget_gui', wait 30 seconds or so for wesnoth to crash
  3. Set visible on either widget, lines 1297 and/or 1298, repeat sequence with no crash

GUI_Tutorial.tar.gz

Expected behavior

A helpful error message

Additional context

This is a pretty stupid one that will probably never affect anyone else. But maybe it'll point to something that's worth fixing anyway.

@white-haired-uncle white-haired-uncle added the Bug Issues involving unexpected behavior. label Apr 27, 2024
@soliton-
Copy link
Member

An assert that can be triggered by unexpected input is certainly worth fixing.

@Wedge009 Wedge009 added the UI User interface issues, including both back-end and front-end issues. label Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues involving unexpected behavior. UI User interface issues, including both back-end and front-end issues.
Projects
None yet
Development

No branches or pull requests

3 participants