The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: KillFrenzy on April 03, 2009, 10:48:10 pm

Title: Crash when trying to look at the stats of a station with many p****engers
Post by: KillFrenzy on April 03, 2009, 10:48:10 pm
(v102.0) When railroadstation have over 10000 p****angers and then trying to look the stats at that station --> Game crashes.
Title: Re: Bug report
Post by: gerw on April 04, 2009, 07:41:51 am
I can't reproduce this with 13k p****engers.
Title: Re: Bug report
Post by: prissi on April 04, 2009, 08:04:31 pm
Actually only numbers beyond 262000 might produce strange results, since ware_t hold 24 bit of menge. The error is most liekly connected to something else. Or can you reproduce it with your savegame? Then I would need the savegame for debugging.
Title: Re: Bug report
Post by: KillFrenzy on April 05, 2009, 02:51:29 am
Here's a pic
****ertion failed - utils/cbuffer_t.cc line 94 - Expression: count>=0

http://www.mediafire.com/file/willtgwiijt/Crash.bmp

Savegame

http://www.mediafire.com/file/tymdmnzuezy/Project metropolis.sve

And here is my version of the pak files if you need it that too.

http://www.mediafire.com/file/5mmtjzjnd20/pak.rar
Title: Re: Crash when trying to look at the stats of an overflowing station
Post by: whoami on April 05, 2009, 03:09:13 am
@KillFrenzy:
1) the BMP format makes the file so big; please use PNG or JPG instead, even GIF would be much better (might even fit the forum's limits for attachments)
2) even text could be used instead here - the screenshot says (in short): "****ertion failed - utils/cbuffer_t.cc line 94 - Expression: count>=0"
3) that download service is a little annoying (have to wait to get a download link) EDIT: link has been replaced
4) topic title changed to make it useful
5) edit: getting the savegame may be necessary to reproduce and analyze the problem
Title: Re: Crash when trying to look at the stats of an overflowing station
Post by: gerw on April 05, 2009, 10:06:29 am
I can't reproduce the crash (with linux, gcc4).
Title: Re: Crash when trying to look at the stats of an overflowing station
Post by: prissi on April 05, 2009, 08:51:39 pm
I rather suspect an error in the finnish translations. Does this error happens with english too?
Title: Re: Crash when trying to look at the stats of an overflowing station
Post by: KillFrenzy on April 06, 2009, 01:37:00 am
Yes it does... Im starting to think that the error is somewhere else now.
Title: Re: Crash when trying to look at the stats of an overflowing station
Post by: z9999 on April 06, 2009, 06:18:41 am
I could reproduced crashing with both release version and my compiled nightly version. (Windows GDI)
Language is not a problem, I tested this with English, Japanese, and German, but crashed in any cases.

As I said in another topic, this problem is being reported from time to time.
http://forum.simutrans.com/index.php?topic=1714.msg17792#msg17792

[edit]
Nightly versions on wernieman's site don't have this problem.
Maybe, they don't contain ****ert code.

But, Windows versions on SF, both GDI and SDL contain ****ert code.
And this causes the problem.

Code: [Select]
void cbuffer_t::printf(const char* fmt, ...)
{
va_list ap;
va_start(ap, fmt);
int count = vsnprintf( buf+size, capacity-size, fmt, ap);
****ert(count >= 0);
if(capacity-size <= (uint)count) {
Title: Re: Crash when trying to look at the stats of an overflowing station
Post by: prissi on April 06, 2009, 01:45:12 pm
I seems the specifications of vsnprintf are different among different platforms.
Title: Re: Crash when trying to look at the stats of an overflowing station
Post by: z9999 on April 07, 2009, 02:32:53 pm
Quote
r2408
make cbuffer_T somewhat dynamic to allow really large amounts at stations to be displayed

This seems to be working well. Thank you.

[off-topic]
BTW, who need to read such a long list which is up-to-date all the time.
There is no bookmark to jump to the list of other freights. This is annoying.
Title: Re: Crash when trying to look at the stats of a station with many p****engers
Post by: Ruskymator on May 25, 2009, 03:44:43 pm
I've observed the same thing with an own savegame. (102) Nightly
I can show it if its neccessary!

Is there any solution or some requierement to solve this problem?

Greetz
Title: Re: Crash when trying to look at the stats of a station with many p****engers
Post by: Dwachs on May 25, 2009, 05:59:05 pm
please try whether the bug is present in a recent nightly version. then upload a savegame if the bug is there.