The International Simutrans Forum

 

Author Topic: [Bug - RESOLVED] r3825 Win7 pak96.comic - Game crash every starting month  (Read 5857 times)

0 Members and 1 Guest are viewing this topic.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2836
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
My Simutrans have a really strange bug, it crash for nothing. It happen with last stable version and also with Nightly 3825.

The bug happens at anytime, even doing nothing. The last time it occurred when I was just watching my train and it crashed, I didn't clicked anything. And happens with any pakset.

I'm uploading an edited log file with only the last few lines.
« Last Edit: October 13, 2010, 07:20:00 PM by An_dz »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4552
  • Languages: EN, DE, AT
Re: [Bug] r3825 Win7 pak96.comic - Random strange bug
« Reply #1 on: September 29, 2010, 05:30:11 AM »
Looks like the crash reported here:

http://forum.simutrans.com/index.php?topic=5844.0

Can you confirm that your crash happens at the beginning of a new month? The log file seems to indicate that.

Edit: Do you have the possibility to compile the program youselfes and run it inside a debugger (for instance MS Visual Studio) ?
« Last Edit: September 29, 2010, 05:38:38 AM by Dwachs »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9383
  • Languages: De,EN,JP
Re: [Bug] r3825 Win7 pak96.comic - Random strange bug
« Reply #2 on: September 29, 2010, 07:40:05 PM »
This sounds like paks with illegal definitions out there, like stations with three rotations and some else. There was also a problem with headquarter updates in the stable version, which caused such crashes.

Could you play a game with autosave and post the last save before crash?

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2836
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: [Bug] r3825 Win7 pak96.comic - Random strange bug
« Reply #3 on: September 29, 2010, 09:19:43 PM »
@Dwachs
Confirmed, happens always at day 1 between 3:00 and 7:00.

@Prissi
Are you sure? I tested in pak96.comic(1.4.7), pak128(1.4.6) and pak64(nightly 321) and also tested again with Simutrans version 3036 GDI and SDL. But it can be, cause I tried doing anything, only created a world and let it run a full month, and no bug.

I uploaded a save from pak96.comic, it saved seconds before the bug. LINK

EDIT:Dwachs what I can do for you. I compiled Simutrans at Visual Studio, what informations you need?
« Last Edit: October 13, 2010, 01:21:31 AM by An_dz »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4552
  • Languages: EN, DE, AT
Re: [Bug] r3825 Win7 pak96.comic - Random strange bug
« Reply #4 on: October 13, 2010, 12:08:27 PM »
Just run simutrans from inside Visual Studio (press F5) and then report about crash (Visual Studio should inform you if something strange happens).

To execute simutrans inside Visual Studio, you have to put all simutrans data in the folder, where Visual Studio creates the .exe file.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2836
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: [Bug] r3825 Win7 pak96.comic - Random strange bug
« Reply #5 on: October 13, 2010, 05:57:45 PM »
OK Dwachs I did wat you told with Nightly 3862. I got this error:
Quote
Unhandled exception at 0x102e14cf (msvcr100d.dll) in Simutrans.exe: 0xC0000005: Access violation reading location 0xcccccccd.

Also output.c file was opened showing an arrow pointing to:
Code: [Select]
while (i-- && *p)
    ++p;
textlen = (int)(p - text.sz);    /* length of the string */

Call Stack tab shows an arrow pointing to:
Quote
>   msvcr100d.dll!_output_l(_iobuf * stream, const char * format, localeinfo_struct * plocinfo, char * argptr)  Line 1643 + 0x1f bytes   C++

I also found something special, when creating a new game with English language selected, the bug do not appear, but if I create a new world in Portuguese the error appears. I think that's how you can try reproducing the bug.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4552
  • Languages: EN, DE, AT
Re: [Bug] r3825 Win7 pak96.comic - Random strange bug
« Reply #6 on: October 13, 2010, 06:13:54 PM »
Could you post a scrennshot of the whole call stack tab? (showing all routines that were called before output was called)

output.c is not part of simutrans ???

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9383
  • Languages: De,EN,JP
Re: [Bug] r3825 Win7 pak96.comic - Random strange bug
« Reply #7 on: October 13, 2010, 06:37:23 PM »
This sounds like a problem with the translation of an ingame message. Like %s instead of %i for translation string.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2836
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: [Bug] r3825 Win7 pak96.comic - Random strange bug
« Reply #8 on: October 13, 2010, 06:50:25 PM »
Here's the screen you asked:



And also forgot to say to reproduce bug an vehicle is needed, my tests was with a train just going from one station to another.

@Prissi
I'll take a look in Portuguese language to check.
But I started a game in English and then changed to Portuguese and bug didn't appeared, but it was probably a coincidence.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4552
  • Languages: EN, DE, AT
Re: [Bug] r3825 Win7 pak96.comic - Random strange bug
« Reply #9 on: October 13, 2010, 07:03:32 PM »
Then maybe one of the speed-record messages is wrong in the Portuguese translation?

Edit: I looked up in translator: Both Portuguese translations of record_text in pak96.comic (not in the base texts) are wrong! There the order of %.1f and %s is switched. You have to modify these messages such that the order of these meta-strings is preserved (ie first %.1f, second %s).
« Last Edit: October 13, 2010, 07:08:10 PM by Dwachs »

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2836
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: [Bug] r3825 Win7 pak96.comic - Random strange bug
« Reply #10 on: October 13, 2010, 07:14:13 PM »
I checked here and look like all are OK. But %s is before %.1f:
Quote
New world record for monorails: %.1f km/h by %s.
Novo recorde mundial para monotrilhos: %s com %.1f km/h.
Do it influence in something?

EDIT:
WOW, Thanks prissi and Dwachs it was that. The %s before %.1f was giving the bug. Thanks!
Also Changed the topic title to be more intuitive.
It was my translation file that was incorrect, in Simutranslator they are OK.
It was cause I translated whole Simutrans by myself taking reference a really old version. And I didn't translated this part yet.
« Last Edit: October 13, 2010, 07:24:46 PM by An_dz »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4552
  • Languages: EN, DE, AT
Re: [Bug - RESOLVED] r3825 Win7 pak96.comic - Game crash every starting month
« Reply #11 on: October 13, 2010, 07:57:14 PM »
EDIT:
WOW, Thanks prissi and Dwachs it was that. The %s before %.1f was giving the bug. Thanks!
Without the information you provided, this would not have been possible ;)
Quote
It was my translation file that was incorrect, in Simutranslator they are OK.
It was cause I translated whole Simutrans by myself taking reference a really old version. And I didn't translated this part yet.
On simutranslator, some of these strings are also part of the pak96.comic translation. There the same error appears in the Portuguese translation. Maybe you can correct them as well? The translations in the base texts are fine.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2836
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: [Bug - RESOLVED] r3825 Win7 pak96.comic - Game crash every starting month
« Reply #12 on: October 13, 2010, 08:51:56 PM »
I did it, probably you looked just before I updated it.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4552
  • Languages: EN, DE, AT
Re: [Bug - RESOLVED] r3825 Win7 pak96.comic - Game crash every starting month
« Reply #13 on: October 13, 2010, 09:02:19 PM »
Thank you :)

Offline ispero

  • *
  • Posts: 75
Re: [Bug - RESOLVED] r3825 Win7 pak96.comic - Game crash every starting month
« Reply #14 on: October 14, 2010, 08:57:02 AM »
I read this topic and I find the same bug in the es.tab of the spanish translation.
Is correct this new version of the record_text:

SMS-RADIO\nULTIMA HORA:%.1f ha alcanzado los \n%s km/h\n.\n¡Es un record sensacional!

SIMUTRANS-TV\nNOVEDADES:\n%.1f alcanzó los %s km/h\n.\n¡Esto supone un nuevo record!

I change this in the simutranslator and this afternoon check in my computer if the bugs not appear.

EDIT:

With this changes yhe game run perfectly.

Thanks to all support and development team. You make a great job.
« Last Edit: October 29, 2010, 07:38:19 PM by ispero »