The International Simutrans Forum

 

Author Topic: Simutrans doesnt terminate  (Read 4581 times)

0 Members and 1 Guest are viewing this topic.

Offline dndimitr

  • *
  • Posts: 31
  • Languages: GR,EN
Simutrans doesnt terminate
« on: July 06, 2013, 06:03:00 PM »
Hi !!!

I didnt download a package and i tried to run simutrans . When i double click the program , a window appeared with black screen . Then i tried to close it with X button but the program didnt close.

After that i run other instance of simutrans from terminal and i used ctrl + C to close it .  Is it a bug ?? 

Simutrans version : 112.3
Operating system : KUbuntu .



Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: Simutrans doesnt terminate
« Reply #1 on: July 06, 2013, 07:19:54 PM »
Well, it is a bug clearly but more details would be helpful to know what caused it - you state you didn't download a package. If you mean that you didn't have a pakset installed then you should try it with one downloaded as simutrans is unusable without one.

Offline dndimitr

  • *
  • Posts: 31
  • Languages: GR,EN
Re: Simutrans doesnt terminate
« Reply #2 on: July 06, 2013, 08:44:48 PM »
I installed the game as u described in you site , but i didnt install packset. I wanted to run the program without packset to see what can it do . I saw a window and black screen .  After that i tried to close it . I  wasn't able to terminate the program with x button . To test it again , i opened a terminal and i run it from it . I could close it only with ctrl + C .

Finally , I installed the packset and i run the game again. The program was terminated with x button .

It was strange and i would like to say it.

I didn't do anything else . These are the steps    :)

« Last Edit: July 06, 2013, 09:04:01 PM by dndimitr »

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: Simutrans doesnt terminate
« Reply #3 on: July 06, 2013, 08:53:25 PM »
Yes, you should get an error message but the window should close when asked - that's what usually happens on my system anyway.

Offline dndimitr

  • *
  • Posts: 31
  • Languages: GR,EN
Re: Simutrans doesnt terminate
« Reply #4 on: July 07, 2013, 04:03:52 PM »
will u fix it ??? If u dont want to fix it , do u want to tell me  the reason ??  i would like to know .  Thank you

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: Simutrans doesnt terminate
« Reply #5 on: July 07, 2013, 04:50:20 PM »
I can't repeat the error here (with latest trunk version), when I try to run simutrans in a directory with no paksets I get the following:
Code: [Select]
kieron@numenor:~/simutrans-dev$ ./sim
Use work dir /home/kieron/simutrans-dev/
Reading low level config data ...
parse_simuconf() at config/simuconf.tab: Reading simuconf.tab successful!
Preparing display ...
SDL_driver=x11, hw_available=0, video_mem=0, blit_sw=0, bpp=32, bytes=4
Screen Flags: requested=10, actual=10
dr_os_open(SDL): SDL realized screen size width=704, height=560 (requested w=704, h=560)Loading font 'font/prop.fnt'
font/prop.fnt successfully loaded as old format prop font!
Init done.
sh: 1: /home/kieron/simutrans-dev//get_pak.sh: not found
*** No pak set found ***

Most likely, you have no pak set installed.
Please download and install a pak set (graphics).
kieron@numenor:~/simutrans-dev$
A window opens then closes, with control returned to the terminal immediately after error messages are printed.

Not being able to repeat it means that it is quite difficult to know exactly what happened, let alone being able to fix the problem. Could you give more details, whether you can get this error to repeat for example?

Offline dndimitr

  • *
  • Posts: 31
  • Languages: GR,EN
Re: Simutrans doesnt terminate
« Reply #6 on: July 07, 2013, 08:18:56 PM »
well ,  I installed the packset and i havent got any problem .  I mean that now i can play the game .


But , when  packeset wasn't installed , i had the problem that i described .  No errors appeared and the program didnt terminate .

I cant say u more because i didnt do anything special . Think that when i downloaded the simutrans zip i extracted it and i pressed double click to run the program . After that i had the problem .
 :) :)

I would like to know if the problem can be fixed because i have a project which is related to testing open source projects   . Project requires if the problem will be fixed or not . If not  then why ?

Thank you  :)

Offline dndimitr

  • *
  • Posts: 31
  • Languages: GR,EN
Re: Simutrans doesnt terminate
« Reply #7 on: July 07, 2013, 08:29:06 PM »
I ll try to help u more

Steps : ( NO PACKSET)
1)  download simutrans zip
2) extract files into my home folder
3) execute the program
4) the program shows me a window with black screen . No errors .
5) try to close it with X button , but the program still runs.

I didn't do anything else ... 

Look the photo : http://postimg.org/image/7db4iete1/     
or :  http://postimg.org/image/3q0f9grih/


« Last Edit: July 07, 2013, 09:05:58 PM by dndimitr »

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: Simutrans doesnt terminate
« Reply #8 on: July 07, 2013, 09:10:42 PM »
If you run it from a terminal then do you get the following output?
Code: [Select]
kieron@numenor:/data/Upload/simutrans/releasetest/simutrans$ ./simutrans
Use work dir /data/Upload/simutrans/releasetest/simutrans/
Reading low level config data ...
parse_simuconf() at config/simuconf.tab: Reading simuconf.tab successful!
Preparing display ...
SDL_driver=x11, hw_available=0, video_mem=0, blit_sw=0, bpp=32, bytes=4
Screen Flags: requested=10, actual=10
dr_os_open(SDL): SDL realized screen size width=704, height=560 (requested w=704, h=560)Loading font 'font/prop.fnt'
font/prop.fnt successfully loaded as old format prop font!
Init done.
-- Choose at least one of these paks --
1) pak64-112-1
2) pak-german64-110-0c
3) pak64.japan-112-0
4) pakHAJO_0-102-2-2
5) pak96.comic-0.4.10-plus
6) pak128-2.3.0--112.2
7) PAK128.german_0.5_112.x
8) pak192.comic_0-2-2_112-2
9) pak32.comic_102-0
10) pak64.Contrast_910
11) PakHD_v04B_100-0
12) pak128.Britain.1.14-112-0
13) pak128.japan-110.0.1-version16-08-2011
14) pak64.scifi_112.x_v0.2
15) pak48-excentrique_v018
Which paks to install? (enter number or (i) to install or (x) to exit)

This is not a crash - it is waiting for you to select a pakset to download. If you run this from a filemanager rather than a terminal then there's no output for the script however...

Offline dndimitr

  • *
  • Posts: 31
  • Languages: GR,EN
Re: Simutrans doesnt terminate
« Reply #9 on: July 07, 2013, 09:29:05 PM »
When i run it from a terminal , i can close it . 

When i use filemanager X button doesnt work .  To terminate the program i must use the command kill process .  I think that it is not correct .


Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9566
  • Languages: De,EN,JP
Re: Simutrans doesnt terminate
« Reply #10 on: July 07, 2013, 09:36:19 PM »
Problem is that the filemanager is suppressing the output. It is the fault of your window manager. Use another one.

Offline dndimitr

  • *
  • Posts: 31
  • Languages: GR,EN
Re: Simutrans doesnt terminate
« Reply #11 on: July 07, 2013, 09:44:28 PM »
oups . I didnt know it .

 Sorry

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5543
  • Languages: EN, NO
Re: Simutrans doesnt terminate
« Reply #12 on: July 08, 2013, 04:45:18 AM »
Problem is that the filemanager is suppressing the output. It is the fault of your window manager. Use another one.

Isn't that normal? Linux doesn't mark executables as console or GUI like Windows does, so how is it to know whether a console is needed? It would be annoying if I got two windows for every program just in case the console was needed. I've noticed that many GUI programs write to console, which is only seen when running them from the console.

Having a question suddenly appearing in the console among all the logging doesn't feel right. I would not have expected it, certainly not after the GUI window has opened. What if the game is running fullscreened?

It would have been better to open a new console window with the pak selection. How to open a terminal window on Linux is unknown to me, as there are multiple programs for it. The main Simutrans process should wait for that process to end, but also process input while doing so. Exiting Simutrans before the other process should work fine.

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: Simutrans doesnt terminate
« Reply #13 on: July 08, 2013, 08:12:28 AM »
Or exit simutrans completely, and have an option at end of download script to run simutrans again.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9566
  • Languages: De,EN,JP
Re: Simutrans doesnt terminate
« Reply #14 on: July 08, 2013, 09:54:08 AM »
So far on my Linux installations (as well as Mac OS and BeoS btw) a terminal window was opened whenever a program had output.

And unfourtunately there is no portable way to open a window in Linux. Even system() is not guarenteed to do this, as the script to download is called by system ...

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Simutrans doesnt terminate
« Reply #15 on: July 08, 2013, 12:03:23 PM »
But couldn't download code be directly embedded in Simutrans executable without the need for an extra script/exe? (both for win and linux)

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5543
  • Languages: EN, NO
Re: Simutrans doesnt terminate
« Reply #16 on: July 08, 2013, 02:33:12 PM »
So far on my Linux installations (as well as Mac OS and BeoS btw) a terminal window was opened whenever a program had output.

That must mean a lot of console windows around, because I have seen everything from small games (or likely their GUI framework) and media players to Firefox and Blender write output to console. (Blender used to open a console window on Windows, but not on Linux.)

But couldn't download code be directly embedded in Simutrans executable without the need for an extra script/exe? (both for win and linux)

That depends on how much of a user interface Simutrans can have until a pak set has been downloaded. It is also more work of a kind fewer are capable of doing. Apart from that, it certainly would be better and more user friendly. Most people have no experience with this kind of console, but then most of these don't use a sort of Linux that can run Simutrans (at least not yet). I think we've discussed a built-in pak downloader before, but I don't remember the outcome.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9566
  • Languages: De,EN,JP
Re: Simutrans doesnt terminate
« Reply #17 on: July 08, 2013, 08:54:36 PM »
The problem is that the download script has to be executed outside of simutrans, as it needs to call for unpacking wget etc. Therefore I explicitely open a new console with system(). However, Ubuntu is aparently now (my Ubuntu virtual machine is still 10.04 ... ) suppressing even new output via a system console. Lunix going the Windows/Mac route, keeping the User stupid :(

I will investigate how to do this properly.

EDIT: It seems the only solution is indeed ...
Code: [Select]
if gnome-terminal is available
    run gnome-terminal -e yourprogram
else if konsole is available
    run konsole -e yourprogram
else if xterm is available
    run xterm -e yourprogram
else
    print "Sorry, I can't find a terminal application."
« Last Edit: July 08, 2013, 08:59:40 PM by prissi »

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: Simutrans doesnt terminate
« Reply #18 on: July 08, 2013, 09:48:58 PM »
x-terminal-emulator should run the default terminal.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9566
  • Languages: De,EN,JP
Re: Simutrans doesnt terminate
« Reply #19 on: July 08, 2013, 10:20:04 PM »
Gentoo for instance, as well a MacOS and Zeta come without Xterm.

Offline dndimitr

  • *
  • Posts: 31
  • Languages: GR,EN
Re: Simutrans doesnt terminate
« Reply #20 on: July 10, 2013, 02:58:39 PM »
Will you fix it ???  If you have already fixed it , could you tell me where could i download the fixed game ?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9566
  • Languages: De,EN,JP
Re: Simutrans doesnt terminate
« Reply #21 on: July 10, 2013, 09:58:17 PM »
This is something which is almost impossible to fix. It is a problem of bad design of the file manager. I cannot fix this with simutrans; I can fix this to work with a certain version of Ubuntu, but it may be broken on the next release again. So no, cannot be fixed for sure.

Offline dndimitr

  • *
  • Posts: 31
  • Languages: GR,EN
Re: Simutrans doesnt terminate
« Reply #22 on: July 11, 2013, 12:53:55 PM »
ok thank you for the answer  :)