News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

Memory access error?

Started by Frank, December 24, 2017, 07:58:33 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Frank

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?

jamespetts

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?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Frank

#2

jamespetts

Can I ask you to run Simutrans-Extended with gdb and produce a backtrace for this?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Frank

#4
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

jamespetts

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.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Frank

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

jamespetts

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"?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Frank

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)

jamespetts

That is very odd. Have you tried typing "run" at the GDB prompt in any event?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Frank

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.

jamespetts

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?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

jamespetts

Can I check whether you were able to fix this issue?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Frank

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)

jamespetts

What was the result when you tried to run an executable that you had compiled on the same system?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Frank

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.


jamespetts

This is very odd - does the executable compiled under Mageia work on a Debian based platform?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Frank

#93fabe7 compile under Xubuntu and works under Mageia

jamespetts

So the new versions work without trouble now - or have I misunderstood?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Frank

#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 ...
...

jamespetts

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.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.