The International Simutrans Forum

 

Author Topic: Simutrans experimental devel git branch fails to run on ArchLinux x86_64[SOLVED]  (Read 3384 times)

0 Members and 1 Guest are viewing this topic.

Offline jspaces

  • *
  • Posts: 15
I have tried the master simutrans-exp branch and experienced a hard lock at the beginning of each month. The CPU is nailed at 98%-101% (not sure why top is reporting 101%). The ticker tape status display keeps on moving. I did see another earlier post regarding this. It was recommended to try the devel branch so I did.
I switched over to the devel branch
Code: [Select]
$ git checkout remotes/origin/devel
warning: refname 'remotes/origin/devel' is ambiguous.
Switched to branch 'remotes/origin/devel
$ git branch -a
  master
* remotes/origin/devel
  remotes/origin/8.x
  remotes/origin/9.x
  remotes/origin/HEAD -> origin/master
  remotes/origin/devel
  remotes/origin/devel-2
  remotes/origin/master
$ git checkout
Not sure about the warning.
After the checkout, I copy config.template to config.default.
Edit the values to:
BACKEND = sdl
COLOUR_DEPTH = 16
OSTYPE = linux
DEBUG = 3
OPTIMISE = 1
SDL_CONFIG     = sdl-config
FLAGS = -DUSE_C -DNDEBUG'
The compile completes with just warnings.
Although when I ran from a terminal, simutrans-exp crashes. I have run valgrind on it and here is the output:
Code: [Select]
valgrind --leak-check=full ./sim
==17086== Memcheck, a memory error detector
==17086== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==17086== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==17086== Command: ./sim
==17086==
Reading low level config data ...
FATAL ERROR: loadsave_t::rdwr_str()
expected "<i32>", got "<boo>"

FATAL ERROR: loadsave_t::rdwr_str()
expected "<i32>", got "<boo>"
==17086==
==17086== HEAP SUMMARY:
==17086==     in use at exit: 99,656 bytes in 26 blocks
==17086==   total heap usage: 29 allocs, 3 frees, 101,360 bytes allocated
==17086==
==17086== 56 bytes in 1 blocks are possibly lost in loss record 4 of 26
==17086==    at 0x4C26AA7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17086==    by 0x57A6898: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.14)
==17086==    by 0x57A6ABA: std::string::_M_mutate(unsigned long, unsigned long, unsigned long) (in /usr/lib/libstdc++.so.6.0.14)
==17086==    by 0x57A6C8B: std::string::_M_replace_safe(unsigned long, unsigned long, char const*, unsigned long) (in /usr/lib/libstdc++.so.6.0.14)
==17086==    by 0x462A24: loadsave_t::rd_open(char const*) (loadsave.cc:157)
==17086==    by 0x5A7B88: simu_main(int, char**) (simmain.cc:492)
==17086==    by 0x629E10: main (simsys_s.cc:731)
==17086==
==17086== 200 bytes in 1 blocks are possibly lost in loss record 5 of 26
==17086==    at 0x4C26509: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17086==    by 0x475B1B: vector_tpl<weighted_vector_tpl<unsigned int> >::vector_tpl(unsigned int) (in /home/pub/build/custompkgs/simutrans-exp-git/src/simutrans/sim)
==17086==    by 0x475647: __static_initialization_and_destruction_0(int, int) (baum.cc:72)
==17086==    by 0x475694: global constructors keyed to _ZN6baum_t16distribute_treesEP7karte_ti (baum.cc:576)
==17086==    by 0x62A3F5: ??? (in /home/pub/build/custompkgs/simutrans-exp-git/src/simutrans/sim)
==17086==    by 0x403A3A: ??? (in /home/pub/build/custompkgs/simutrans-exp-git/src/simutrans/sim)
==17086==    by 0xFF: ???
==17086==    by 0x62A344: __libc_csu_init (in /home/pub/build/custompkgs/simutrans-exp-git/src/simutrans/sim)
==17086==    by 0x5EC4BDF: (below main) (in /lib/libc-2.12.1.so)
==17086==
==17086== 264 bytes in 1 blocks are possibly lost in loss record 9 of 26
==17086==    at 0x4C26509: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==17086==    by 0x4FACE4: vector_tpl<legend_entry>::vector_tpl(unsigned int) (in /home/pub/build/custompkgs/simutrans-exp-git/src/simutrans/sim)
==17086==    by 0x4FABCB: __static_initialization_and_destruction_0(int, int) (map_frame.cc:52)
==17086==    by 0x4FABF7: global constructors keyed to _ZN11map_frame_t4sizeE (map_frame.cc:556)
==17086==    by 0x62A3F5: ??? (in /home/pub/build/custompkgs/simutrans-exp-git/src/simutrans/sim)
==17086==    by 0x403A3A: ??? (in /home/pub/build/custompkgs/simutrans-exp-git/src/simutrans/sim)
==17086==    by 0xFF: ???
==17086==    by 0x62A344: __libc_csu_init (in /home/pub/build/custompkgs/simutrans-exp-git/src/simutrans/sim)
==17086==    by 0x5EC4BDF: (below main) (in /lib/libc-2.12.1.so)
==17086==
==17086== LEAK SUMMARY:
==17086==    definitely lost: 0 bytes in 0 blocks
==17086==    indirectly lost: 0 bytes in 0 blocks
==17086==      possibly lost: 520 bytes in 3 blocks
==17086==    still reachable: 99,136 bytes in 23 blocks
==17086==         suppressed: 0 bytes in 0 blocks
==17086== Reachable blocks (those to which a pointer was found) are not shown.
==17086== To see them, rerun with: --leak-check=full --show-reachable=yes
==17086==
==17086== For counts of detected and suppressed errors, rerun with: -v
==17086== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 6 from 6)
Aborted
I thinking that it is a 64 bit issue since i32 does not appear to be functioning correctly.
I am running ArchLinux x86_64.
The compiler is gcc 4.5.1 without multilib support,
bzip2 1.0.6
libpng 1.4.4
sdl 1.2.14
sdl_mixer 1.2.11
zlib 1.2.5

Hopefully this will help pinpoint the issue, since I really would like to play experimental.
Thanks


« Last Edit: October 13, 2010, 03:33:23 AM by jspaces »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18763
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Simutrans experimental devel git branch fails to run on ArchLinux x86_64
« Reply #1 on: October 12, 2010, 10:02:27 PM »
Hmm - I have trouble debugging 64-bit issues as at present I only have a 32-bit computer (although am planning to upgrade soon). Incidentally, the 9.x branch is more up to date than the -devel branch.

This error:

Code: [Select]
FATAL ERROR: loadsave_t::rdwr_str()
expected "<i32>", got "<boo>"

is not what is causing your problems, however. It is a problem with an incompatible settings-experimental-debug.xml file: delete that file and start again, and you should not have difficulties. The relatively small memory leaks found in Valgrind are unlikely to be behind your problem, either.

Has anyone else with a 64-bit build had this problem?

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: Simutrans experimental devel git branch fails to run on ArchLinux x86_64
« Reply #2 on: October 13, 2010, 03:07:59 AM »
ciao james,

just tried it on 64 bit ubuntu 10.4.
compiled without error in gcc 4.4.3.
started without errors with pak britain-ex (some dev version from early summer).
world creation also worked.
and "Program exited normally."

sorry, no time to test it in depth however.

Offline jspaces

  • *
  • Posts: 15
Re: Simutrans experimental devel git branch fails to run on ArchLinux x86_64
« Reply #3 on: October 13, 2010, 03:32:42 AM »
So I see, the running of the master git branch version 8.02 had created the settings-experimental-debug.xml which caused the 9 version issues.
I wish it was stated in the readme.txt file or something.
I deleted the settings-experimental-debug.xml and behold the version 9 development version is now running. Thanks for the tip, jamespetts.
Also I appreciate your tireless efforts and quick responce. Cheers

Offline Tron

  • Coder/patcher
  • *
  • Posts: 50
I switched over to the devel branch
Code: [Select]
$ git checkout remotes/origin/devel
warning: refname 'remotes/origin/devel' is ambiguous.
Switched to branch 'remotes/origin/devel
$ git branch -a
  master
* remotes/origin/devel
  remotes/origin/8.x
  remotes/origin/9.x
  remotes/origin/HEAD -> origin/master
  remotes/origin/devel
  remotes/origin/devel-2
  remotes/origin/master
$ git checkout
Not sure about the warning.
You made a local branch (refs/heads/remotes/origin/devel), which has almost the same name as a remote branch (refs/remotes/origin/devel) - mind the heads/, which makes the former a local branch. This triggers a warning, because if you use remotes/origin/devel git can either complete it to a name of a local branch (prefixing refs/heads/) or a general ref (prefixing refs/).
You should rename the local branch to e.g. just devel: git branch -m remotes/origin/devel devel

Offline jspaces

  • *
  • Posts: 15
I am really impressed with the support here. Thanks Tron now I know.