News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

Computer going to sleep makes vehicles with wait times get stuck

Started by moogal, September 17, 2012, 12:13:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

moogal

I've been playing Simutrans for several years now and this bug has been present in all the versions since the vehicle wait time option was added. I've experienced it both on the Mac and latest Windows versions. I'm using pak128, not sure if it happens with pak64.

Basically if I play Simutrans on my laptop and leave the game running when the computer goes to sleep, any vehicle which has a "month wait time" set and is currently waiting on that instruction, will not time out. This means if they are at a stop where there are very few/no goods/passengers generated, they will sit there for much longer than intended, and show up as "stucked" in the vehicle list.

If the game is paused when the computer goes to sleep, this does not happen.

Ters

A different aspect here is whether Simutrans should allow the computer to go to sleep when running in the first place. If I intentionally let Simutrans run unattended, it's probably because I want it to run for a while and I wouldn't want it to fall asleep. On the other hand, if Simutrans was left running alone unintentionally on a laptop, Simutrans would drain the battery until hibernation kicks in. (I don't think Simutrans should try to pervent hibernation.)

Roads

One of the first things I do when I get a new computer is turn off the sleep thingy.  I have no use for that capability at all...no idea how others use it.

kierongreen

"month wait time" is part of simutrans experimental I thought?

Ters

Quote from: kierongreen on September 17, 2012, 05:38:24 AM
"month wait time" is part of simutrans experimental I thought?

No, it has been a feature in standard for quite some time now. It sets a maximum time a convoy will wait for the given load percent.

Roads

I am not positive but I can't remember any vehicles in my games leaving the station after a month without the specified load.  I have had vehicles where the print turned yellow for their name if you clicked on the route.  That only happens after a month doesn't it?  I'm talking about pak128.

Ters

Quote from: Roads on September 17, 2012, 04:37:20 PM
I am not positive but I can't remember any vehicles in my games leaving the station after a month without the specified load.

Most likely because you didn't tell them to. And it's not necessarily after a month. It could be half a month, a quarter of a month, 128th of a month, etc.

prissi

This indicates that the time (ms since last reboot) does have the wrong value. This is rather a bug of the OS. But thanks for notification.

greenling

That problem that moogal find cam out windows.
In Windows 7 make the energy option often after new installing problems.
That have i  self a life.


Opening hours 20:00 - 23:00
(In Night from friday on saturday and saturday on sunday it possibly that i be keep longer in Forum.)
I am The Assistant from Pakfilearcheologist!
Working on a big Problem!

Roads

Ters, I haven't a clue what you are talking about.  What I'm saying and I may be off in the lower 40 talking about something completely unrelated but...my vehicles leave the station as I direct.  It doesn't matter if I tell them 1/32 or 1 month.  They leave when that time has expired or when the specified load requirement has been met.  If I put 100% load with no expiration time, the vehicle stays at the station until it reaches 100% load regardless of how long that is - it could possibly be years as far as I know.

Fabio

Quote from: prissi on September 17, 2012, 04:51:39 PM
This indicates that the time (ms since last reboot) does have the wrong value. This is rather a bug of the OS. But thanks for notification.

Could it be fixed e.g. saving ms time every game month and if ms time is smaller than saved, set all variables checking against ms time to the new value + delta?

Ters

Quote from: Roads on September 17, 2012, 06:20:37 PM
Ters, I haven't a clue what you are talking about.  What I'm saying and I may be off in the lower 40 talking about something completely unrelated but...my vehicles leave the station as I direct.  It doesn't matter if I tell them 1/32 or 1 month.  They leave when that time has expired or when the specified load requirement has been met.  If I put 100% load with no expiration time, the vehicle stays at the station until it reaches 100% load regardless of how long that is - it could possibly be years as far as I know.
Then you know the setting. I just misunderstood and thought that you didn't. I'm not sure what you are writing about in your second post then.

prissi

Actually that is done, i.e. delta_t <0 should not occur.

Did this happen in fast forward only or?

moogal

I haven't tried it in Fast Forward mode, but it certainly does it in normal speed.

prissi

Because in normal speed more than one place actually check for negative delta_t s ... Hmm ???

EDIT: I added some code, which may fix it. Please test with the next nightly.

Roads

I am understanding only part of what is being said here but the bottom line is...I like how it works now and hope it does not change.  Sometimes, especially in cases with ships, which may need a long time to load because the only capacity ship you can buy is very large.  I offer the steel ship available in 1930 as an example.  I believe its capacity is 800 whereas the largest bulk truck is 6.  Both passengers and mail sometimes need to wait for a long time if the game engine is going through one of its spells of switching passenger/mail destinations from one location to another.

Ters

Quote from: Roads on September 17, 2012, 09:48:21 PM
I am understanding only part of what is being said here but the bottom line is...I like how it works now and hope it does not change.  Sometimes, especially in cases with ships, which may need a long time to load because the only capacity ship you can buy is very large.  I offer the steel ship available in 1930 as an example.  I believe its capacity is 800 whereas the largest bulk truck is 6.  Both passengers and mail sometimes need to wait for a long time if the game engine is going through one of its spells of switching passenger/mail destinations from one location to another.
Nothing is changing, except that something that normally works needs to work all the time.

Roads

Thanks Ters and I was wrong about the steel ship.  Its capacity is 500.