Author Topic: Crash with pak128 compiled under linux  (Read 1020 times)

0 Members and 1 Guest are viewing this topic.

Offline gauthier

Crash with pak128 compiled under linux
« on: April 18, 2017, 08:46:03 PM »
I don't know if the problem is related to code for linux, to makeobj or to simutrans itself, in fact I don't really understand what's going on ... here is the situation:

With Simutrans rr8198, the game crashes upon loading a particular savegame in the cases listed below, other savegames load fine:
_ pak128 2.6 as downloadable on source forge (compiled under windows 7): OK
_ pak128 in its current state on SVN, compiled under windows 7: OK
_ pak128 in its current state on SVN, compiled with makeobj 60 for linux (compiled here too): CRASH
_ pak128 in its current state on SVN, compiled with makeobj 55.3 for linux (downloadable on source force): CRASH

No error message, the crash is a segmentation fault.

The compiling of pak128 under windows is done with a batch file, the compiling under linux is done with a makefile. This makefile was not up to date and was producing non working paksets until yesterday when I spent some hourse to rewrite it completely so as to reproduce the same steps as in the batch file. So far I think it's correct since my other savegames load well.

Before I need to upload my savegame, is it possible to get some verbose things from Simutrans to have more information on what happened before the crash ?

Offline Vladki

Re: Crash with pak128 compiled under linux
« Reply #1 on: April 18, 2017, 10:59:03 PM »
Do you have the latest nightly of both simutrans and makeobj? There was recently a bug fixed that causes such crashes. I don't remember the exact revision when it was fixed.




Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4251
  • Total likes: 177
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Crash with pak128 compiled under linux
« Reply #2 on: April 19, 2017, 09:55:42 AM »
There was a change to makeobj in r8199, which may or may not fix the crash. Can you please upload the savegame anyway? Then I could try to compile pak128 and test.

You could try to start simutrans with '-debug 3', but usually it does not help too much.

Parsley, sage, rosemary, and maggikraut.

Offline gauthier

Re: Crash with pak128 compiled under linux
« Reply #3 on: April 19, 2017, 07:46:23 PM »
After doing some tests with simutrans rr8213 under linux and under windows, with pak128 compiled with makeobj 55.3/4 and makeobj 60 under linux and windows, using official makeobj releases when available and self compilings otherwise: all tests with pak128 built under windows were OK and all tests with pak128 built under linux crashed.

I thought that my makefile for pak128 could be the problem, I tried replacing some pak files that are not straight-forward-to-obtain (more than a single line of makeobj call) with the same from working paksets without success. After reading the stderr output of simutrans, I tried replacing pakfiles related to citybuildings, without success too.

I don't have a place to upload files (savegame and debug logs) at the moment (without spending again a bunch of minutes creating an account, etc ... and I'm quite bored at the moment), will upload them as soon as possible.

EDIT:
my savegame
stdout
stderr
« Last Edit: April 23, 2017, 11:20:45 AM by gauthier »

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2594
  • Total likes: 290
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: Crash with pak128 compiled under linux
« Reply #4 on: April 19, 2017, 08:07:39 PM »
@Dwachs
The makeobj crash fix at r8199 was a fix for a bug introduced in r8171, which both are before the last stable makeobj release, so if you are using stable makeobjs it's not a problem. This bug is somewhere else.

Edit:
Ok, there are no releases for stable makeobj for Linux. For such you need to make sure you have a makeobj compiled with a revision lower than r8171 or higher than r8199.

Offline gauthier

Re: Crash with pak128 compiled under linux
« Reply #5 on: April 19, 2017, 08:21:11 PM »
How can I get the release number from the code ?

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2594
  • Total likes: 290
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: Crash with pak128 compiled under linux
« Reply #6 on: April 19, 2017, 10:17:05 PM »
If you did checkout with SVN:
Code: [Select]
svnversion
If you did with Git:
Code: [Select]
git showIn the message log the number is shown in /trunk@8211

But the bug is not about my changes, because you've compiled with 55.3 from sources at SourceForge, it's lower than r8171.

Offline gauthier

Re: Crash with pak128 compiled under linux
« Reply #7 on: April 20, 2017, 05:42:35 PM »
I have 8211 here anyway.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4251
  • Total likes: 177
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Crash with pak128 compiled under linux
« Reply #8 on: April 21, 2017, 01:28:13 PM »
There seems to be a problem with the makefile: some pak files only are 69Bytes 'large'. Most notably airports.misc, townhalls, pedestrians.
Parsley, sage, rosemary, and maggikraut.

Offline gauthier

Re: Crash with pak128 compiled under linux
« Reply #9 on: April 21, 2017, 06:25:40 PM »
pedestrians, townhalls and airports.misc are compiled as pak128, I can read it explictly in make's logs. The only graphics which are not compiled as pak128 are:
powerlines (pak176)
planes (pak176)
boats (pak250)

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4251
  • Total likes: 177
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Crash with pak128 compiled under linux
« Reply #10 on: April 22, 2017, 08:29:47 AM »
These three pak files are almost empty, something wrong with the makefile.
Parsley, sage, rosemary, and maggikraut.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4862
  • Total likes: 201
  • Helpful: 108
  • Languages: EN, NO
Re: Crash with pak128 compiled under linux
« Reply #11 on: April 22, 2017, 09:05:17 AM »
Could it be an upper/lower case issue? That would only appear on Linux, but not on Windows.

Offline gauthier

Re: Crash with pak128 compiled under linux
« Reply #12 on: April 23, 2017, 09:30:35 AM »
I should have checked that earlier ... Thanks for pointing this out. Again: ... an error message with makeobj compiling empty pak files would be great :p

EDIT: these three files had mistyping in their makefile's rule, fixed and running great. Thanks for your help !

Offline Vladki

Re: Crash with pak128 compiled under linux
« Reply #13 on: April 23, 2017, 10:12:43 AM »
Yesterday I tried compiling simutrans, makeobj (r8214) and pak128 (r1989) from SVN on Linux, and It worked fine.  Thanks for fixing the Makefile.