Latest Posts

Topic: 2 crashes and few remarks

freem

Topic Opener
Joined: 2012-07-03, 07:25
Posts: 32
Ranking
Pry about Widelands
Posted at: 2016-08-29, 16:38

Ok, I know this is not the good place for bug reports, but launchpad seems to refuse me to send bugs there, so before the information is lost... Those behaviors happened in commit 77829145eeeeb4e58016d081c2f870b15caab2b0 from the github mirror.

bugs

Crash: boost::bad_format_string

Here is the trace of the executable (I tend to run stuff I compiled from a terminal, for that kind of things):

TI(100540): destination appears to have become split from current location -> fail
Cmd_EnemyFlagAction::execute player(3): flag->owner(4) number=10
Forcing flag at (31, 39) 
Cmd_EnemyFlagAction::execute player(3): flag->owner(1) number=9
Fatal exception: boost::bad_format_string: format-string is ill-formed
Game: Writing Preload Data ... zsh: segmentation fault  /usr/local/widelands

I tried a debug version, but the log is really heavy and I have no idea from where to select for useful informations.

It happen if the AI attack, when I have (at least) 1 castle selected and hiden in a screen corner (botom-right, in my case). I still have a savegame allowing to reproduce it, it happens around 4h09m.

freeze with no window on fullscreen

Usually, I am using widelands in windowed mode. By accident, I asked my window manager to place it under it's fullscreen mode. This caused the game to freeze without having a window on a graphic report. Really close to a crash imho, but the process still being there... so let's call it a freeze :) The same problem obviously happen when using widelands' interface to go fullscreen. Here is the trace:

This is Widelands Version unofficial-git-7782914 (Release)
Set home directory: /home/USER/.widelands
Widelands executable directory: /usr/local/
Adding directory: /usr/local/data
selected language: (system language)
using locale fr_FR.UTF-8
Graphics: Try to set Videomode 1280x800
Graphics: OpenGL: Version "3.3.0 NVIDIA 340.96"
Graphics: SDL_GL_RED_SIZE is 8
Graphics: SDL_GL_GREEN_SIZE is 8
Graphics: SDL_GL_BLUE_SIZE is 8
Graphics: SDL_GL_ALPHA_SIZE is 0
Graphics: SDL_GL_BUFFER_SIZE is 24
Graphics: SDL_GL_DOUBLEBUFFER is 1
Graphics: SDL_GL_DEPTH_SIZE is 24
Graphics: SDL_GL_STENCIL_SIZE is 0
Graphics: SDL_GL_ACCUM_RED_SIZE is 16
Graphics: SDL_GL_ACCUM_GREEN_SIZE is 16
Graphics: SDL_GL_ACCUM_BLUE_SIZE is 16
Graphics: SDL_GL_ACCUM_ALPHA_SIZE is 16
Graphics: SDL_GL_STEREO is 0
Graphics: SDL_GL_MULTISAMPLEBUFFERS is 0
Graphics: SDL_GL_MULTISAMPLESAMPLES is 0
Graphics: SDL_GL_ACCELERATED_VISUAL is 1
Graphics: SDL_GL_CONTEXT_MAJOR_VERSION is 2
Graphics: SDL_GL_CONTEXT_MINOR_VERSION is 1
Graphics: SDL_GL_CONTEXT_FLAGS is 0
Graphics: SDL_GL_CONTEXT_PROFILE_MASK is 2
Graphics: SDL_GL_SHARE_WITH_CURRENT_CONTEXT is 0
Graphics: SDL_GL_FRAMEBUFFER_SRGB_CAPABLE is 0
Graphics: OpenGL: Double buffering enabled
Graphics: OpenGL: Max texture size: 8192
Graphics: OpenGL: ShadingLanguage: "3.30 NVIDIA via Cg compiler"
**** GRAPHICS REPORT ****
 VIDEO DRIVER x11
 pixel fmt 370546692
 size 2720 1024
**** END GRAPHICS REPORT ****

Remarks

Those are really remarks, not important stuff.

annoying window position

I am using i3 as a window manager. It is a tiling one. When I start widelands, it appears as a floating window split with every half of the window on each screen.

make install moves things directly in /usr/local

I know it's a wanted behavior, but only because I read the CMakeLists.txt. There were no documentation about that. This could be fixed by adding a simple readme making it explicit. Also, I'm curious about why you forced the paths, I think cmake does it's job decently usually (even if it would not place the stuff into /usr/local/games, but I don't think that distinction is really useful honestly). I guess you have a good reason, but I fail to see which one.

the wiki about dependencies will be outdated

The wiki says that widelands depends on SDL1.2 stuff, but for build 19, it will depend on SDL2 stuff. This is just to remind you to update it face-smile.png

PS: again, sorry about not using the bug tracker, it just refuses to work, and after trying to do a bug report twice, it becomes annoying (and tbh, I really dislike it's interface, but it's a matter of taste, and if it worked I would have done with it).

PPS: the markdown help lacks the instruction to quote and place "code".

Edited: 2016-08-29, 16:44

Top Quote
SirVer

Joined: 2009-02-19, 14:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2016-08-29, 18:26

freem wrote:

Ok, I know this is not the good place for bug reports, but launchpad seems to refuse me to send bugs there, so before the information is lost... Those behaviors happened in commit 77829145eeeeb4e58016d081c2f870b15caab2b0 from the github mirror.

yes, this is not the best place. Launchpad is, but better somewhere than nowhere I guess.

Crash: boost::bad_format_string Here is the trace of the executable (I tend to run stuff I compiled from a terminal, for that kind of things):

I guess this is a localization error of a string in the game - a boost formatting string got wrongly translated. Bugs like these are the reason why we do feature freezes and do not allow translations at some point. Which locale are you playing on? Can you reproduce this? Can you provide a savegame before the crash?

freeze with no window on fullscreen

Dunno what that is - the output looks fine.

I am using i3 as a window manager. It is a tiling one. When I start widelands, it appears as a floating window split with every half of the window on each screen.

outside of Widelands control. SDL chooses where to place the window. For what it's worth, awesome (the window manager) does place the game floating in the middle of the first screen.

make install moves things directly in /usr/local

there are cmake options for defining the install directory which we adhere too. if you run a ./configure && make install, most software will install into /usr/local. What would you expect otherwise?

The wiki says that widelands depends on SDL1.2 stuff, but for build 19, it will depend on SDL2 stuff. This is just to remind you to update it face-smile.png

Thanks face-smile.png

PS: again, sorry about not using the bug tracker, it just refuses to work, and after trying to do a bug report twice, it becomes annoying (and tbh, I really dislike it's interface, but it's a matter of taste, and if it worked I would have done with it).

not to worry, I think the first bug is easy to track down, the second one non-fixable without your system and a repro case.


Top Quote
freem

Topic Opener
Joined: 2012-07-03, 07:25
Posts: 32
Ranking
Pry about Widelands
Posted at: 2016-08-29, 19:56

SirVer wrote:

freem wrote: Crash: boost::bad_format_string Here is the trace of the executable (I tend to run stuff I compiled from a terminal, for that kind of things):

I guess this is a localization error of a string in the game - a boost formatting string got wrongly translated. Bugs like these are the reason why we do feature freezes and do not allow translations at some point. Which locale are you playing on? Can you reproduce this? Can you provide a savegame before the crash?

GunChleoc asked me to send him the savegame by mail, I did it. I am playing with the french locale, and can reproduce that bug easily, sounds like it's caused by having a window partially outside screen while that attack. Not sure any other event could trigger the crash.

freeze with no window on fullscreen

Dunno what that is - the output looks fine.

I am using i3 as a window manager. It is a tiling one. When I start widelands, it appears as a floating window split with every half of the window on each screen.

outside of Widelands control. SDL chooses where to place the window. For what it's worth, awesome (the window manager) does place the game floating in the middle of the first screen.

I guess the placement on virtual screen's center is a change from SDL2, since widelands was centered on the screen from which it was started before. And about being floating, I think that wesnoth might have found a way, but now that you mention it, it's true that I don't know a lot of games with SDL not having floating windows by default... I wonder how they did it. I'll try to find out (seems like it is possible to receive non-portable events from window managers, but it seems like a lot of work and I doubt they used that to fix this).

make install moves things directly in /usr/local

there are cmake options for defining the install directory which we adhere too. if you run a ./configure && make install, most software will install into /usr/local. What would you expect otherwise?

Sorry I was not explicit enough. The binary to go in /usr/local/bin, data in /usr/local/share, etc. Or, at least, the stuff going into a single folder in /usr/local/widelands. For now, it gives this:

% ls /usr/local 
bin  ChangeLog  COPYING  CREDITS  data  doc  etc  games  include  lib  man  mpd  sbin  share  src  VERSION  widelands  wl_map_info  wl_render_richtext

Again, not a big problem, can easily be fixed by the user.

The wiki says that widelands depends on SDL1.2 stuff, but for build 19, it will depend on SDL2 stuff. This is just to remind you to update it face-smile.png

Thanks face-smile.png

PS: again, sorry about not using the bug tracker, it just refuses to work, and after trying to do a bug report twice, it becomes annoying (and tbh, I really dislike it's interface, but it's a matter of taste, and if it worked I would have done with it).

not to worry, I think the first bug is easy to track down, the second one non-fixable without your system and a repro case.

I simply really don't like using forums for bug reports, it makes bugs and improvements harder to track. Useless work.


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 19:48
Posts: 2439
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2016-08-29, 21:33

Instead of 'usr/local' widelands should use /usr/bin for executables (widelands, wl_map_info, wl_map_object_info, wl_render_richtext) and /usr/local/share/widelands for the contents of 'data' , imho.

This structure is used by arch-linux widelands-bzr

Edited: 2016-08-29, 21:38

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

Top Quote
freem

Topic Opener
Joined: 2012-07-03, 07:25
Posts: 32
Ranking
Pry about Widelands
Posted at: 2016-08-30, 03:05

your reply make me realize that it is more complex than what I thought, since, on Debian, binaries not from packages are installed in /usr/local/bin, and this would include widelands. I can't think of any way to put it into any games section under /usr/local that would be portable. Now, about why I noticed the thing was installed into /usr/local and not /usr/local/bin, the reason is simple: I am a programmer myself, so I gave myself the rights to install stuff in /usr/local, to avoid using root idendity everytime I need to try something in roughly real conditions. I thought cmake defaults were a pretty decent configuration, but it seems my sight was too short.


Top Quote
SirVer

Joined: 2009-02-19, 14:18
Posts: 1445
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2016-08-30, 06:20

GunChleoc asked me to send him the savegame by mail.

You mean send her the savegame. face-smile.png

Install path

Oh wow, I was misreading your message, freem. I though it installed just fine into /usr/local/bin/widelands, /usr/local/share/widelands/ and so on. But it literal just dumped everything under /usr/local. That is indeed not great behavior.

Edited: 2016-08-30, 06:20

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2016-08-30, 08:17

I can't reproduce the crash from the savegame on current trunk - it might indeed be a translation error. Which language did you play in?

ETA: I just ran i18nspector, and it didn't flag up any placeholder issues except for 2 strings in the en_GB Tribal Encyclopedia).

Edited: 2016-08-30, 09:10

Busy indexing nil values

Top Quote
freem

Topic Opener
Joined: 2012-07-03, 07:25
Posts: 32
Ranking
Pry about Widelands
Posted at: 2016-09-01, 02:25

SirVer wrote:

GunChleoc asked me to send him the savegame by mail.

You mean send her the savegame. face-smile.png

Huh... sure face-smile.png I'll try to remember. No garantee at all though.

Install path

Oh wow, I was misreading your message, freem. I though it installed just fine into /usr/local/bin/widelands, /usr/local/share/widelands/ and so on. But it literal just dumped everything under /usr/local. That is indeed not great behavior.

I think this behavior is because the cmake defaults was override. CMakes does quite a nice job,except that it's unable to know if the software is a game or not. Now, I must say that I think putting games in a different folder is something I can not understand any technical reason to do so. I only see problems with that convention.

GunChleoc wrote:

I can't reproduce the crash from the savegame on current trunk - it might indeed be a translation error. Which language did you play in?

I'm playing with the french locale.

ETA: I just ran i18nspector, and it didn't flag up any placeholder issues except for 2 strings in the en_GB Tribal Encyclopedia).

Maybe it's because of some other aspect of my system. I am using a Debian which is a lot customized, for example I am not using dbus, systemd or pulseaudio, at all. But I can't see how this could be related...

Edited: 2016-09-01, 02:27

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2016-09-01, 08:45

freem wrote:

SirVer wrote:

You mean send her the savegame. face-smile.png

Huh... sure face-smile.png I'll try to remember. No garantee at all though.

No worries, you couldn't have known and I won't be offended it you forget. Just treat me like a human being face-tongue.png

GunChleoc wrote:

I can't reproduce the crash from the savegame on current trunk - it might indeed be a translation error. Which language did you play in?

I'm playing with the french locale.

ETA: I just ran i18nspector, and it didn't flag up any placeholder issues except for 2 strings in the en_GB Tribal Encyclopedia).

Maybe it's because of some other aspect of my system. I am using a Debian which is a lot customized, for example I am not using dbus, systemd or pulseaudio, at all. But I can't see how this could be related...

boost::format errors usually occur when there is a problem with substituting place holders in strings, or if a string contains a weird character that can't be handled (e.g. if something is accidentally escaped).

I tested this again and I still can't reproduce the crash. I loaded the savegame, selected a castle, moved the castle outside of the screen to the bottom right, then moved the Widelands window outside of the screen on the bottom right.


Busy indexing nil values

Top Quote
freem

Topic Opener
Joined: 2012-07-03, 07:25
Posts: 32
Ranking
Pry about Widelands
Posted at: 2016-09-02, 13:43

GunChleoc wrote:

freem wrote:

SirVer wrote:

You mean send her the savegame. face-smile.png

Huh... sure face-smile.png I'll try to remember. No garantee at all though.

No worries, you couldn't have known and I won't be offended it you forget. Just treat me like a human being face-tongue.png

Shouldn't be too hard face-smile.png

boost::format errors usually occur when there is a problem with substituting place holders in strings, or if a string contains a weird character that can't be handled (e.g. if something is accidentally escaped).

Oh, it's the boost's enhanced sprintf, then? I think I see how it works (but never used it).

I tested this again and I still can't reproduce the crash. I loaded the savegame, selected a castle, moved the castle outside of the screen to the bottom right, then moved the Widelands window outside of the screen on the bottom right.

I've launched a gdb instance on the crash, and the line of the crash is game_preload_packet.cc:112. Now, it no longer happens git commit 48e6c8. I have seen nothing in changelogs indicating a change on that file, I'm running git bisect to know when exactly that crash stopped to happens (because it may just have hidden and not actually fix. Plus, I've got some time). I wish there was a way to load a map from command-line, would spare some steps. Or better, a way to script actions, but I know this would be quite hard to code face-grin.png


Top Quote