HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...
Can't convert string to const width (3.0.92-dev, sdl2)
Start the sdl2 client and start a game. Select Pick Nation. Click on the orange arrow on the right of 'Core'. Core doesn't change to Extended, but in Chat you can see that it has happened. On the console you see:
chippo@chippo-Aspire-V3-731:~/Downloads/git_clones/freeciv/freeciv-dev-noasn-checks$ freeciv-sdl2-dev-noasn-checks -F Encodings: Data=UTF-8, Local=UTF-8, Internal=UTF-8 3: Using Video Output: x11 3: Loading tileset "hexemplio". 3: Loading tileset "hexemplio". 1: Can't convert string to const width 3: Backtrace: 3: 0: freeciv-sdl2-dev-noasn-checks(backtrace_print+0x3b) [0x562412961f5b] 3: 1: freeciv-sdl2-dev-noasn-checks(vdo_log+0xad) [0x562412967bad] 3: 2: freeciv-sdl2-dev-noasn-checks(do_log+0xb6) [0x562412967c96] 3: 3: freeciv-sdl2-dev-noasn-checks(convert_utf8_str_to_const_surface_width+0x2b2) [0x5624127d8992] 3: 4: freeciv-sdl2-dev-noasn-checks(create_text_surf_smaller_than_w+0x19) [0x5624127d8a29] 3: 5: freeciv-sdl2-dev-noasn-checks(popup_races_dialog+0xebb) [0x5624127cd20b] 3: 6: freeciv-sdl2-dev-noasn-checks(option_gui_update+0x7d) [0x5624127f014d] 3: 7: freeciv-sdl2-dev-noasn-checks(client_handle_packet+0x3d3) [0x562412786a73] 3: 8: freeciv-sdl2-dev-noasn-checks(client_packet_input+0x3a) [0x56241274592a] 3: 9: freeciv-sdl2-dev-noasn-checks(input_from_server+0xdc) [0x56241274d28c] 3: 10: freeciv-sdl2-dev-noasn-checks(gui_event_loop+0x48b) [0x5624127443cb] 3: 11: freeciv-sdl2-dev-noasn-checks(ui_main+0x380) [0x562412744b40] 3: 12: freeciv-sdl2-dev-noasn-checks(client_main+0x425) [0x562412746145] 3: 13: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7f6f0c81d1e3] 3: 14: freeciv-sdl2-dev-noasn-checks(_start+0x2e) [0x56241274349e]
#1 Updated by Marko Lindqvist about 2 years ago
- Category set to gui-sdl2
- Status changed from New to In Progress
- Sprint/Milestone set to 2.6.3
The "Core" changes to "Extended", but it takes several seconds to process.
The strings that are adjusted to fit limited space are nation names and legends. The error does not occur when one comments legend adjustment line from popup_races_dialog(), which indicates that it's some legend that does not fit.
Legends display is more broken than for the width of some of them. Vertically there is space for just line, meaning that even when they can be made to fit horizontally, they display just a couple of words from the beginning, and even that is crowded.
By right clicking one can bring up legend dialog that is not affected by any of these issues.
Quite obvious fix is to remove the partial legend display completely (but to keep right-click dialog as the way to check the legend)
#2 Updated by Marko Lindqvist about 2 years ago
- File 0016-sdl2-Drop-nation-legend-display-from-races-dialog-ma.patch 0016-sdl2-Drop-nation-legend-display-from-races-dialog-ma.patch added
- File 0005-sdl2-Drop-nation-legend-display-from-races-dialog-ma.patch 0005-sdl2-Drop-nation-legend-display-from-races-dialog-ma.patch added
- Status changed from In Progress to Resolved
S2_6 version of the patch changes sdl-client code too. sdl-client does work at all for me, so that change is not tested. Notably part of the code to remove was already commented out from sdl-client, so it seems to me that it was not affected by the bug. This change to sdl-client only cleans up the code.