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

WML error when pressing key Up/Down in add-on details #6485

Closed
demario-w opened this issue Feb 4, 2022 · 5 comments · Fixed by #6499
Closed

WML error when pressing key Up/Down in add-on details #6485

demario-w opened this issue Feb 4, 2022 · 5 comments · Fixed by #6499
Assignees
Labels
Add-ons Issues with the add-ons client and/or server. Bug Issues involving unexpected behavior. Confirmed Issues that have been successfully reproduced by at least one developer. UI User interface issues, including both back-end and front-end issues.

Comments

@demario-w
Copy link
Contributor

Generate the error by

  • connect to add-on server
  • select any add-on in the list
  • press "Add-on Details" button
  • press arrow key Up/Down[/code]

The error is:

error general: An error due to possibly invalid WML occurred
The error message is :
Mandatory widget 'addons' hasn't been defined.
 
When reporting the bug please include the following error message :
Condition '!must_exist || result' failed at /opt/wesnoth/wesnoth.git.master/src/gui/auxiliary/find_widget.hpp:75 in function 'find_widget'.

Same behavior on BFW 1.16.1.

System settings

The Battle for Wesnoth version 1.17.0+dev x86_64
Running on Debian GNU/Linux 8 (jessie) x86_64
Distribution channel: Default

Game paths

Data dir: /opt/wesnoth/wesnoth.git.master
User config dir: /home/USER/.config/wesnoth
User data dir: /home/USER/.local/share/wesnoth/1.17
Saves dir: /home/USER/.local/share/wesnoth/1.17/saves
Add-ons dir: /home/USER/.local/share/wesnoth/1.17/data/add-ons
Cache dir: /home/USER/.cache/wesnoth

Libraries

Boost: 1.68
Lua: 5.4.2
OpenSSL/libcrypto: 1.0.2l (runtime 1.0.2l)
Cairo: 1.14.0 (runtime 1.14.0)
Pango: 1.36.8 (runtime 1.36.8)
SDL: 2.0.9 (runtime 2.0.9)
SDL_image: 2.0.4 (runtime 2.0.4)
SDL_mixer: 2.0.0 (runtime 2.0.0)

Features

Lua console completion: yes
D-Bus notifications back end: yes

Current video settings

SDL video drivers: [x11] dummy
Window size: 1366x702
Screen refresh rate: 60
Screen dots per inch: 112.286079x112.758377
Screen dpi scale factor: 1.169647x1.174566

@stevecotton stevecotton added Add-ons Issues with the add-ons client and/or server. Bug Issues involving unexpected behavior. Confirmed Issues that have been successfully reproduced by at least one developer. UI User interface issues, including both back-end and front-end issues. labels Feb 4, 2022
@stevecotton
Copy link
Contributor

Note: the add-ons client has two different layouts, depending on window size. This only happens in the small-window layout.

@Wedge009
Copy link
Member

Wedge009 commented Feb 4, 2022

I wasn't able to replicate this in 1.16.2+dev (0983707) in either 'large' or 'small' layouts. But then, I also get a lot of noise from other errors mostly relating to PNGs. Does this bug crash the dialogue or whole application?

@stevecotton
Copy link
Contributor

stevecotton commented Feb 5, 2022

Just the dialog, it falls back to the title screen as in #3059 and it's another part of that bug. I'm going to apply one of the workarounds in #5820 to this too.

In this case, the stack trace (seen in a debugger, as it's not a crash) is

#2  gui2::dialogs::addon_manager::on_addon_select()
#3  operator()() const (__closure=0x55bcd2936240) at /home/steve/development/wesnoth/main/src/gui/dialogs/addon/manager.cpp:348
#19 gui2::listbox::update_visible_area_on_key_event(gui2::listbox::KEY_SCROLL_DIRECTION) (this=0x55bcd19db010, direction=gui2::listbox::KEY_VERTICAL)
#20 gui2::listbox::handle_key_down_arrow(SDL_Keymod, bool&) (this=0x55bcd19db010, modifier=KMOD_NONE, handled=@0x7fffd9612346: true)

Frame 3 is src/gui/dialogs/addon/manager.cpp:348's list.set_modified_signal_handler([this]() { on_addon_select(); });

@stevecotton stevecotton self-assigned this Feb 5, 2022
@stevecotton
Copy link
Contributor

I've run into a related issue while testing the fix: when 050feb6 (the original fix to #3059) was written, the list's filter box wasn't shown on the details screen. That commit made the list ignore changes to the filter while on the details screen, because selecting a different add-on caused the crash.

Since then, 2643671 has changed the UI to show the list's filter box on both the list screen and the details screen, however changes to the filter string are still ignored.

@Wedge009
Copy link
Member

Wedge009 commented Feb 8, 2022

After reviewing #6489 I now understand what's actually happening here and can confirm the issue. I also confirm #6490 appears to resolve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add-ons Issues with the add-ons client and/or server. Bug Issues involving unexpected behavior. Confirmed Issues that have been successfully reproduced by at least one developer. UI User interface issues, including both back-end and front-end issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants