Latest Posts

Topic: Truncated ERROR - FATAL EXCEPTION output makes debugging harder

Kontorotsui
Avatar
Topic Opener
Joined: 2021-05-20, 14:35
Posts: 40
Ranking
Pry about Widelands
Posted at: 2024-07-22, 11:47

Hello, I'm having troubles debugging my modifications to a tribe LUA, because the output error has the stack trace truncated. As you see below, just when the error is displayed the output is cut.

I'm pretty sure this is some limit in the error output length, can it be fixed? This happens in the Widelands version 1.2~rc1 Release but I had this problem since previous versions. The fix should be pretty easy as it only needs needs to increase the output length.

Here is an example of what I get:

[00:08:22.384 real] ERROR: ############################## [00:08:22.384 real] ERROR: FATAL EXCEPTION: Error while loading tribe 'europeans': [/run/build/Widelands/src/scripting/lua_errors.cc:21] tribe europeans: Failed adding building 'europeans_stonemine_basic': [/run/build/Widelands/src/scripting/lua_errors.cc:21] [/run/build/Widelands/src/scripting/lua_errors.cc:21] [/run/build/Widelands/src/scripting/lua_errors.cc:21] [/run/build/Widelands/src/scripting/lua_errors.cc:21] [/run/build/Widelands/src/scripting/lua_errors.cc:21] europeans_stonemine_level_4: Error in productionsite program mine_granite: Erro [00:08:22.384 real] ERROR: ##############################

Thanks.


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 17:07
Posts: 2005
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2024-07-22, 12:11

Same problem as https://www.widelands.org/forum/topic/5809/ – these messages are generated by a third-party library, so this is not easy at all.


Top Quote
Lillieilla
Avatar
Joined: 2024-08-13, 16:19
Posts: 1
Ranking
Just found this site
Posted at: 2024-09-03, 11:04

If there is a limit set on the length of the output or the size of the buffer for error messages, it might be possible to increase it by modifying the source code of Widelands. This would involve changing the buffer size where the errors are handled and displayed.
You would need to locate where the errors are printed in the code, likely in geometry dash breeze the lua_errors.cc file or similar, and look for any fixed-size buffers or string truncation logic. Adjusting this value and recompiling the game might solve your problem.

Edited: 2024-09-04, 09:47

Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 19:48
Posts: 2489
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2024-09-03, 15:56

A link to an explanations was already posted.

Closing this thread.


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote