Currently Online

Latest Posts

Topic: sigsev on widelands start

kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 19:48
Posts: 2439
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2020-02-16, 09:14

For some reason i can't start widelands anymore. Tried a release build and a debug build, always with deleting the whole directory build. Compiled with compile.sh -r -w and compile.sh -a -w`. Both builds are crashing immediately:

$> ./widelands 
This is Widelands Version r24427[0b5ae14@master] (Debug)
Set home directory: /home/kaputtnik/.widelands
Set configuration file: /home/kaputtnik/.widelands/config
Widelands executable directory: /home/kaputtnik/widelands-repo/widelands/
Speicherzugriffsfehler (Speicherabzug geschrieben)

A backtrace is attached.

Since glibc is somehow involved and there is another problem with the newest glibc version, i have also tried to downgrade glibc, recompiled, but the crash persists.

Anyone else facing this problem?


Attachment:
backtrace.txt (1.6 KB)

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

Top Quote
ModellbahnerTT

Joined: 2009-07-19, 10:58
Posts: 70
Ranking
Likes to be here
Posted at: 2020-02-16, 10:31

Which Compiler do you use? If it is gcc 9 the problem is known.


Top Quote
kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 19:48
Posts: 2439
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2020-02-16, 17:17

Yes, i have gcc9 installed. But i think the problem is the same as https://github.com/widelands/widelands/issues/3518

A workaround is to set the environment variable XDG_DATA_DIRS before starting widelands:

export XDG_DATA_DIRS=
./widelands

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

Top Quote
niektory
Avatar
Joined: 2019-06-03, 19:06
Posts: 206
Ranking
Widelands-Forum-Junkie
Location: Poland
Posted at: 2020-02-16, 17:44

I think I know what the problem is. In this line:

    environment = getenv("XDG_DATA_DIRS");

environment is a std::string variable, but getenv returns a C-style string, or NULL (a null pointer) if the environment variable is not set. A std::string variable is not a pointer, you can't assign NULL to it, therefore it crashes in this case.

Edited: 2020-02-16, 17:51

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2020-02-21, 18:04

Pull request is up: https://github.com/widelands/widelands/pull/3700


Busy indexing nil values

Top Quote