Skip to main content
Topic: Crash when trying to look at the stats of a station with many p****engers (Read 5531 times) previous topic - next topic

Crash when trying to look at the stats of a station with many p****engers

(v102.0) When railroadstation have over 10000 p****angers and then trying to look the stats at that station --> Game crashes.

Re: Bug report

Reply #1
I can't reproduce this with 13k p****engers.

Re: Bug report

Reply #2
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.


Re: Crash when trying to look at the stats of an overflowing station

Reply #4
@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

Re: Crash when trying to look at the stats of an overflowing station

Reply #5
I can't reproduce the crash (with linux, gcc4).

Re: Crash when trying to look at the stats of an overflowing station

Reply #6
I rather suspect an error in the finnish translations. Does this error happens with english too?

Re: Crash when trying to look at the stats of an overflowing station

Reply #7
Yes it does... Im starting to think that the error is somewhere else now.

Re: Crash when trying to look at the stats of an overflowing station

Reply #8
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) {

Re: Crash when trying to look at the stats of an overflowing station

Reply #9
I seems the specifications of vsnprintf are different among different platforms.

Re: Crash when trying to look at the stats of an overflowing station

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

 

Re: Crash when trying to look at the stats of a station with many p****engers

Reply #11
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

Re: Crash when trying to look at the stats of a station with many p****engers

Reply #12
please try whether the bug is present in a recent nightly version. then upload a savegame if the bug is there.
Parsley, sage, rosemary, and maggikraut.