News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

[Bug - RESOLVED] r3825 Win7 pak96.comic - Game crash every starting month

Started by An_dz, September 27, 2010, 06:59:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

An_dz

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.

Dwachs

#1
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) ?
Parsley, sage, rosemary, and maggikraut.

prissi

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?

An_dz

#3
@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?

Dwachs

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.
Parsley, sage, rosemary, and maggikraut.

An_dz

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:

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.

Dwachs

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 ???
Parsley, sage, rosemary, and maggikraut.

prissi

This sounds like a problem with the translation of an ingame message. Like %s instead of %i for translation string.

An_dz

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.

Dwachs

#9
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).
Parsley, sage, rosemary, and maggikraut.

An_dz

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

Dwachs

Quote from: An_dz on October 13, 2010, 07:14:13 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.
Parsley, sage, rosemary, and maggikraut.

An_dz


Dwachs

Parsley, sage, rosemary, and maggikraut.

ispero

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.