Important Dates

Currently Online

Latest Posts

Topic: sigsev on widelands start

kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 1797
Ranking
One Elder of Players
Location: Germany
Posted at: 2020-02-16, 10: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)

Top Quote
ModellbahnerTT
Joined: 2009-07-19, 11:58
Posts: 65
Ranking
Likes to be here
Posted at: 2020-02-16, 11:31

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


Top Quote
kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 1797
Ranking
One Elder of Players
Location: Germany
Posted at: 2020-02-16, 18: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

Top Quote
niektory
Avatar
Joined: 2019-06-03, 20:06
Posts: 59
Ranking
Likes to be here
Location: Poland
Posted at: 2020-02-16, 18: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, 18:51

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

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


Busy indexing nil values

Top Quote