The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: Frank on December 24, 2017, 07:58:33 AM

Title: Memory access error?
Post by: Frank on December 24, 2017, 07:58:33 AM
I compile under Xubuntu 14.04.5 64bit.

By Simutrans-Standard the binary works under Xubuntu 14.04.5, Ubuntu 16.04.3 and Mageia 6.

At Simutrans-Extended the binary works under Xubuntu 14.04.5 and Ubuntu 16.04.3.
With Mageia 6, a memory access error occurs during startup.

Do you have a possible explanation for that?
Title: Re: Memory access error?
Post by: jamespetts on December 24, 2017, 11:19:41 AM
Thank you for the report.

I will not be able to understand the problem without more details of the error: can you give me the exact error message?
Title: Re: Memory access error?
Post by: Frank on December 24, 2017, 01:47:24 PM
sorry german system

https://simutrans-germany.com/simutrans/linux-package/simutrans-extended_mixer_sdl2 (https://simutrans-germany.com/simutrans/linux-package/simutrans-extended_mixer_sdl2)
Title: Re: Memory access error?
Post by: jamespetts on December 24, 2017, 01:58:28 PM
Can I ask you to run Simutrans-Extended with gdb and produce a backtrace for this?
Title: Re: Memory access error?
Post by: Frank on December 24, 2017, 02:20:59 PM
No idea if it helps. I do not get along with gdb.

Type "apropos word" to search for commands related to "word"...
BFD: /usr/local/bin/simutrans-extended/simutrans-extended: don't know how to handle section `' [0x   50000]
BFD: /usr/local/bin/simutrans-extended/simutrans-extended: attempt to load strings from a non-string section (number 30)
"/usr/local/bin/simutrans-extended/./simutrans-extended": not in executable format: File format not recognized
Title: Re: Memory access error?
Post by: jamespetts on December 24, 2017, 02:24:56 PM
Installing gdb is simple: the package name will just be "gdb", and it should be in all the normal Linux repositories.

To run it, type gdb ./simutrans-extended_mixer_sdl2, and then, at the prompt, type "run". When you get the error, type "backtrace", then copy and paste in a reply to this post the output from that latter command.
Title: Re: Memory access error?
Post by: Frank on December 24, 2017, 11:32:23 PM
No idea if it helps. I do not get along with gdb.

Type "apropos word" to search for commands related to "word"...
BFD: /usr/local/bin/simutrans-extended/simutrans-extended: don't know how to handle section `' [0x   50000]
BFD: /usr/local/bin/simutrans-extended/simutrans-extended: attempt to load strings from a non-string section (number 30)
"/usr/local/bin/simutrans-extended/./simutrans-extended": not in executable format: File format not recognized
Title: Re: Memory access error?
Post by: jamespetts on December 24, 2017, 11:43:20 PM
I am not sure what is occurring here. Is this an error that you get when you try to run the command "gdb ./simutrans-extended_mixer_sdl2"?
Title: Re: Memory access error?
Post by: Frank on December 25, 2017, 12:06:16 AM
It is the same file only renamed in the repo. Installed on a laptop.

You can run deb-based Linux.

rpm based linux can not run them.

[mageira@localhost simutrans-extended]$ gdb ./simutrans-extended_mixer_sdl2
GNU gdb (GDB) 7.12-16.mga6 (Mageia release 6)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-mageia-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
BFD: /home/mageira/Schreibtisch/simutrans-extended/simutrans-extended_mixer_sdl2: don't know how to handle section `' [0x   50000]
BFD: /home/mageira/Schreibtisch/simutrans-extended/simutrans-extended_mixer_sdl2: attempt to load strings from a non-string section (number 30)
"/home/mageira/Schreibtisch/simutrans-extended/./simutrans-extended_mixer_sdl2": not in executable format: File format not recognized
(gdb)
Title: Re: Memory access error?
Post by: jamespetts on December 25, 2017, 01:42:09 PM
That is very odd. Have you tried typing "run" at the GDB prompt in any event?
Title: Re: Memory access error?
Post by: Frank on December 25, 2017, 01:55:04 PM
gdb says under Mageia 6 that it is not a program file.

Under Xubuntu and Ubuntu, the same file works as a program.

simutrans-extended_mixer_sdl2": not in executable format: File format not recognized

I suspect the Makefile has something in it what sets the program file on the platform. Because compiled under Mageia works the program file.
Title: Re: Memory access error?
Post by: jamespetts on December 25, 2017, 01:57:50 PM
Quote from: Frank on December 25, 2017, 01:55:04 PM
gdb says under Mageia 6 that it is not a program file.

Under Xubuntu and Ubuntu, the same file works as a program.

simutrans-extended_mixer_sdl2": not in executable format: File format not recognized

That is exceedingly odd. I am not sure that I understand how that can be. Have you tried compiling locally on the RPM based machine?
Title: Re: Memory access error?
Post by: jamespetts on January 08, 2018, 11:07:28 PM
Can I check whether you were able to fix this issue?
Title: Re: Memory access error?
Post by: Frank on January 09, 2018, 06:36:35 AM
https://simutrans-germany.com/simutrans/simutrans-extended (https://simutrans-germany.com/simutrans/simutrans-extended) ~4,7 MByte SDL2 Mixer

[mageira@localhost simutrans-extended]$ gdb ./simutrans-extended
GNU gdb (GDB) 7.12-16.mga6 (Mageia release 6)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-mageia-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
BFD: /home/mageira/Schreibtisch/simutrans-extended/simutrans-extended: don't know how to handle section `' [0x      20]
BFD: /home/mageira/Schreibtisch/simutrans-extended/simutrans-extended: no group info for section
BFD: /home/mageira/Schreibtisch/simutrans-extended/simutrans-extended: don't know how to handle section `' [0x      20]
"/home/mageira/Schreibtisch/simutrans-extended/./simutrans-extended": not in executable format: File format not recognized
(gdb)
Title: Re: Memory access error?
Post by: jamespetts on January 09, 2018, 10:43:52 PM
What was the result when you tried to run an executable that you had compiled on the same system?
Title: Re: Memory access error?
Post by: Frank on January 10, 2018, 06:57:57 AM
Quote from: Frank on December 25, 2017, 01:55:04 PM
....
I suspect the Makefile has something in it what sets the program file on the platform. Because compiled under Mageia works the program file.

Title: Re: Memory access error?
Post by: jamespetts on January 10, 2018, 04:58:57 PM
This is very odd - does the executable compiled under Mageia work on a Debian based platform?
Title: Re: Memory access error?
Post by: Frank on January 20, 2018, 11:17:40 PM
#93fabe7 compile under Xubuntu and works under Mageia
Title: Re: Memory access error?
Post by: jamespetts on January 20, 2018, 11:22:29 PM
So the new versions work without trouble now - or have I misunderstood?
Title: Re: Memory access error?
Post by: Frank on January 21, 2018, 11:49:13 AM
#93fabe7 add to repo rpm/deb

Yes, this version works.

however, there is a long charge break after

...
Init done.
modal_dialogue( sel, magic_none, NULL, empty_objfilename );
...


before the graphics set is loaded

...
modal_dialogue( sel, magic_none, NULL, empty_objfilename );
Pak found: Pak128.Britain-Ex/
parse_simuconf() in pak (Pak128.Britain-Ex/config/simuconf.tab): Reading simuconf.tab successful!
....


there are still errors loading the wav files

....
Reading compatibility sound data ...
...
Loaded /usr/local/bin/simutrans-extended/Pak128.Britain-Ex/sound/forest.wav to sample 13.
Loaded /usr/local/bin/simutrans-extended/Pak128.Britain-Ex/sound/Water.wav to sample 14.
could not load wav (Mix_LoadWAV_RW with NULL src)
Loaded /usr/local/bin/simutrans-extended/Pak128.Britain-Ex/sound/tropic.wav to sample 15.
could not load wav (Mix_LoadWAV_RW with NULL src)
could not load wav (Mix_LoadWAV_RW with NULL src)
could not load wav (Mix_LoadWAV_RW with NULL src)
could not load wav (Mix_LoadWAV_RW with NULL src)
could not load wav (Mix_LoadWAV_RW with NULL src)
Loading BDF font 'font/cyr.bdf'
Reading city configuration ...
Reading electricity consumption configuration ...
Reading menu configuration ...
Reading object data from Pak128.Britain-Ex/...
...
Loaded /usr/local/bin/simutrans-extended/Pak128.Britain-Ex/sound/tdes-cow-farm.wav to sample 82.
could not load wav (Mix_LoadWAV_RW with NULL src)
Loaded /usr/local/bin/simutrans-extended/Pak128.Britain-Ex/sound/ylearkisto-horse.wav to sample 83.
...
Loaded /usr/local/bin/simutrans-extended/Pak128.Britain-Ex/sound/video47-class-55.wav to sample 156.
could not load wav (Unknown 24-bit PCM data format)
Loaded /usr/local/bin/simutrans-extended/Pak128.Britain-Ex/sound/robinhood76-carpenter.wav to sample 157.
...
Loaded /usr/local/bin/simutrans-extended/Pak128.Britain-Ex/sound/ff3170-leyland-tiger-tr.wav to sample 164.
could not load wav (Mix_LoadWAV_RW with NULL src)
Loaded /usr/local/bin/simutrans-extended/Pak128.Britain-Ex/sound/tractor.wav to sample 165.
...
Reading menu configuration ...
...
Title: Re: Memory access error?
Post by: jamespetts on January 21, 2018, 12:18:40 PM
Thank you for confirming: that is helpful. I am not sure why there would be a long wait (how long is it, may I ask?), especially when I am not in a position to reproduce this.

However, the .wav errors are not anything about which to be concerned: they simply result from the pakset not having any background sound for certain climates defined. For some reason, the error messages that you seem to get with that platform are not as informative as the error messages that I normally see on Ubuntu Linux or Windows.