Opened 14 months ago

Closed 14 months ago

Last modified 14 months ago

#15351 closed defect (fixed)

wxArgNormalizer assert with wxTextEntry on Wayland

Reported by: thibhul Owned by:
Priority: normal Milestone: 3.0.0
Component: wxGTK Version: stable-latest
Keywords: Cc:
Blocked By: Blocking:
Patch: no

Description

For each character typed or removed in a text box, an assert is thrown:

../wxWidgets/include/wx/strvararg.h(452): 
assert "(argtype & (wxFormatStringSpecifier<T>::value)) == argtype" failed in wxArgNormalizer(): 
format specifier doesn't match argument type

It happens in collpane sample, but also in keyboard sample.

How to reproduce:

  • Follow build instructions for Wayland and GTK+(gdk-pixbuf is needed and atk requires gnome-common)
  • Configure wxWidgets from your prefix folder with:
    ../wxWidgets/configure --with-gtk=3 --enable-debug=max \
    --enable-utf8 --enable-stl --disable-display --disable-mediactrl \
    --without-opengl --disable-uiactionsim --disable-webview --prefix=$WLD
    
  • Build libraries and samples
  • Launch Weston and define
    LD_LIBRARY_PATH=path/to/prefix/lib64
    
  • Launch collpane sample and in File menu, choose "Set Label"

Versions:
*Wayland 1.1.90
*GTK+ 3.9.0

Attachments (3)

weston_wx_assert.png download (194.5 KB) - added by thibhul 14 months ago.
Assert that appears when setting label
collpane_wayland_assert.log download (2.1 KB) - added by thibhul 14 months ago.
backtrace logged with assert message
bt_wayland_collpane_full.log download (79.9 KB) - added by thibhul 14 months ago.
full backtrace

Download all attachments as: .zip

Change History (8)

Changed 14 months ago by thibhul

Assert that appears when setting label

Changed 14 months ago by thibhul

backtrace logged with assert message

comment:1 Changed 14 months ago by vadz

It would be helpful if you could please run the program under gdb and check what exactly is being printed/formatted and what is the format string and the type of the argument because I just don't see at all what is happening here: wxString::Format() doesn't appear at all in the stack trace...

Changed 14 months ago by thibhul

full backtrace

comment:2 Changed 14 months ago by thibhul

I added the trace, the assert is near step #8,​9,​10. Key value is 101 and format string seems to be "press".

comment:3 Changed 14 months ago by vadz

Thanks! The format string is actually "%ld" here which means that KeySym apparently is not defined as long in this case. I have no idea why isn't it but using an explicit task should take care of this, so I'll just do it, please test and reopen if it still doesn't help.

Thanks again!

comment:4 Changed 14 months ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [74573]) Don't assume that KeySym is always defined as long in wxGTK.

Apparently this is not the case when using Wayland and using "%ld" to print it
out results in an assert failure.

Closes #15351.

comment:5 Changed 14 months ago by thibhul

Tested and that's fixed.

Note: See TracTickets for help on using tickets.