News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

-Experimental causing freezes on Linux

Started by TygerFish, January 03, 2011, 04:40:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TygerFish

Occasionally, Simutrans-Experimental will cause my computer to "freeze."  I can still move the cursor around the screen, but no mouseovers or clicks -- on Simutrans, GNOME elements, or other running applications -- will have any kind of effect.  

This happens after a random interval, anywhere from a few seconds to more than an hour.  It has happened while in pause as well as with time running, although it seems to happen less frequently while paused.  I have also tried turning off network access, as well as Dropbox (which syncs my savegames), and neither prevented the freezing.

I have only seen this behavior on my laptop running Ubuntu 10.10 64-bit (as mentioned here: http://forum.simutrans.com/index.php?topic=6478.0) even though my desktop uses the same operating system with almost the exact same set of applications running and has not once had this behavior.  This freeze happens equally often with different recent versions and architectures; I've experienced it with the pre-compiled 32-bit versions of 9.0 and 9.1 as well as with a locally-compiled 64-bit version from 1/1/11 code (9.1).

I have only ever experienced this freeze when Simutrans-Experimental was running.  I have tested Simutrans vanilla for a substantial amount of time and this behavior did not occur.  (And I've gotten so accustomed to Experimental, it was tedious work playing vanilla long enough to rule it out!  :))

Attached is the tail of a -debug 3 log from when the freeze happened within a few seconds of starting the game.  I used ctrl-alt-F1 to switch to a terminal and observe the logfile, where I could see new "no route" messages being added in real time, so the game was presumably still processing something in the background.  I have also attached the tail of a sample logfile where the freeze happened many minutes after the game had been launched.  Both full logfiles are available here:
http://tygerfish.homelinux.net/simutrans/simu.log.instant_freeze.txt
http://tygerfish.homelinux.net/simutrans/simu.log.freeze2.txt

Since it does not cause a "crash" per se, getting a stack trace might be problematic (also because I can't figure out how to access the same console from within the graphical session and the terminal session), although any further instructions for getting more information would be appreciated.

jamespetts

Hmm - I wonder whether this might be hardware related. One feature in Experimental that takes a great deal of processing power is the system of checking whether private cars can find routes to their destinations: it is that method that is being invoked very frequently in your examples by the looks of the outputs. It may be that this is all too much for your laptop in one way or another. Can you try starting a new game with assume_everywhere_connected_by_road=1 in simuconf.tab and see whether this problem still occurs?

Another possibility is that the problem is caused by the 64-bit issues in the graphics module described here. That should be fixed with the next version, so I'd be interested if you could try that when it is released and see whether there are any improvements.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

TygerFish

Quote from: jamespetts on January 03, 2011, 10:34:08 AM
Hmm - I wonder whether this might be hardware related. One feature in Experimental that takes a great deal of processing power is the system of checking whether private cars can find routes to their destinations: it is that method that is being invoked very frequently in your examples by the looks of the outputs. It may be that this is all too much for your laptop in one way or another. Can you try starting a new game with assume_everywhere_connected_by_road=1 in simuconf.tab and see whether this problem still occurs?
Good thought...
Turns out, I already did; that's the default setting in Pak.German-ex, which I also tested to make sure it wasn't Pak128.Britain that was causing the problems.

Quote from: jamespetts on January 03, 2011, 10:34:08 AMAnother possibility is that the problem is caused by the 64-bit issues in the graphics module described here. That should be fixed with the next version, so I'd be interested if you could try that when it is released and see whether there are any improvements.
I await it eagerly!  :)

prissi

No, the graphcis problem will cause a crash due to a segmentation fault. This cannot be the cause.

jamespetts

Hmm, that's very odd. I'm not sure that I understand why a freeze should occur in one environment and not another. In any event, give it a go with the next version and see whether that makes any difference. Sorry that you've been having trouble.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

TygerFish

I tested my hunch that the freezing seemed to happen less often while paused, and thus far that seems supported.  Building, altering convoys, etc. only while the game is paused definitely seems to help.

I'll upgrade to 9.2 and do some more testing...


jamespetts

Thank you - let me know your results. Does anything else cause that laptop to freeze?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

inkelyad

Userland Linux program should not cause any kind of freeze in stable system.
Even fork/memory bomb can't that. System just kill it. But ulimits not often enabled in desktop systems.
Usual source of freeze -- you need more  memory. Simutrans-Exp is memory hungry and your GNOME applications and X server are swapped out to disk.

jamespetts

A user who was experiencing freezes in Standard has had this advice from Prissi. Can you try the same thing and see whether it helps you?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

TygerFish

Quote from: inkelyad on January 07, 2011, 10:54:06 PM
Userland Linux program should not cause any kind of freeze in stable system.
Even fork/memory bomb can't that. System just kill it. But ulimits not often enabled in desktop systems.
Usual source of freeze -- you need more  memory. Simutrans-Exp is memory hungry and your GNOME applications and X server are swapped out to disk.
Actually, I just upgraded the memory on the system from 2GB to 4GB in the middle of this and it was still doing it... 

Quote from: jamespetts on January 07, 2011, 11:25:55 PM
A user who was experiencing freezes in Standard has had this advice from Prissi. Can you try the same thing and see whether it helps you?
Interesting, I'll give it a try... problem is, now that I'm home from the holidays, I'm having too much fun playing the game on my desktop with no crashes and a 30" monitor.  :D

jamespetts

30" monitor? Goodness!

Do let me know when you get a chance to test it with -nomidi, though!
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

fabio85

Simutrans 102.2-1                     Pak64 102.2-1                  Pak128 1.4.5

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

TygerFish

Quote from: jamespetts on January 08, 2011, 12:37:53 PM
30" monitor? Goodness!
One of the best technology investments I've made!
http://support.dell.com/support/edocs/monitors/3008wfp/en/ug/about.htm#Product Features

Quote from: jamespetts on January 08, 2011, 12:37:53 PM
Do let me know when you get a chance to test it with -nomidi, though!
Alas, I tried both -nomidi and -no_midi and still got the freeze.  Guess I'm stumped.  I'll keep checking from time to time if I think of something else to try or when there's a new version.