News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Simutrans doesnt terminate

Started by dndimitr, July 06, 2013, 06:03:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dndimitr

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 .



kierongreen

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.

dndimitr

#2
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    :)


kierongreen

Yes, you should get an error message but the window should close when asked - that's what usually happens on my system anyway.

dndimitr

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

kierongreen

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:

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?

dndimitr

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  :)

dndimitr

#7
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/



kierongreen

If you run it from a terminal then do you get the following output?

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...

dndimitr

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 .


prissi

Problem is that the filemanager is suppressing the output. It is the fault of your window manager. Use another one.

dndimitr


Ters

Quote from: prissi 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.

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.

kierongreen

Or exit simutrans completely, and have an option at end of download script to run simutrans again.

prissi

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 ...

Fabio

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

Ters

Quote from: prissi 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.

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.)

Quote from: Fabio 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)

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.

prissi

#17
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 ...

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."

kierongreen

x-terminal-emulator should run the default terminal.

prissi

Gentoo for instance, as well a MacOS and Zeta come without Xterm.

dndimitr

Will you fix it ???  If you have already fixed it , could you tell me where could i download the fixed game ?

prissi

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.

dndimitr