OpenTTD dies silently when data files are not installed

Bug #388402 reported by Javier Martin (Habbit)
52
This bug affects 6 people
Affects Status Importance Assigned to Milestone
openttd (Debian)
Fix Released
Unknown
openttd (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: openttd

Ubuntu version: 9.04
Package: openttd 0.6.3-1

Preconditions: package is installed, but additional required data files are not
Expected behavior: a dialog should pop up explaining that the data files are not installed. Optimally, a gksudo or policykit-enabled dialog would prompt the user for its location and install them on the fly.
Actual behavior: if the data files are not installed, OpenTTD dies silently (i.e. there is absolutely no feedback to the user after clicking on the menu item). In order to copy the data files, one has to do so manually, with the additional hurdle of having to copy them into /usr/share/games, i.e. a non-user-writable zone.

Revision history for this message
Javier Martin (Habbit) (habbit) wrote :

I propose the following patch, a shell script that would replace "openttd" as the command to be executed by the OpenTTD menu item. It checks that the data and music files have been installed. If they haven't, it offers to install them, automatically using gksudo for the copy and Zenity for the GUI prompts.
 - It requires data files to be installed, if a suitable source is not found or the user cancels, the script dies
 - Prompts only once for the non-essential music files, if its installation is rejected it does not ask again

Currently it has two main bugs: first, for the sake of asking only once for the data files source directory, it might not check that it contains the music files also before trying to copy them. Second, it's not internationalised. However, I'm in exams right now and this is all I could patch together before returning to my books.

Revision history for this message
Javier Martin (Habbit) (habbit) wrote :

Here is a new version that adds gettext support and fixes the following bugs:
    - If the user cancelled the gksudo "enter password" dialog, it would pop up again and again, once per file. Now the script tried to invoke the "true" program first, and if authentication fails or is aborted, the script understands that the user wants to cancel.
    - If the user rejected the installation of the data files, the script would go on and ask about music files, then try starting OpenTTD. All this makes no sense if the data files are missing, so now the script dies if the user rejects installing the data files.
    - find_ttdx_folder would always look for $DATA_FILES instead of $1. Fixed

Btw, I understand that improving the first-use interface of a game is not that important compared to other bugs, but I would appreciate any signs of life here. If there is some interest about this new version of the patch, I can provide a Spanish translation.

Revision history for this message
Brian Murray (brian-murray) wrote :

Thanks for taking the time to report this bug and the patch for it too. This package is sync'ed with Debian and it'd be quite helpful if you were to submit this bug and your patch upstream to Debian. You can learn more about how to forward bugs to Debian at https://wiki.ubuntu.com/Debian/Bugs.

Revision history for this message
Javier Martin (Habbit) (habbit) wrote :

Passed upstream as per your suggestion, with a new version of the patch that does not use bash-specific syntax: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=533557

Revision history for this message
Jordi Mallach (jordi) wrote :

Debian's #533557 was fixed in the latest 0.7.2-1 upload.

Changed in openttd (Debian):
importance: Undecided → Unknown
status: New → Unknown
Changed in openttd (Ubuntu):
status: New → Triaged
importance: Undecided → Low
importance: Low → Medium
tags: added: bitesize
Revision history for this message
Nonconventionally Creative (br-longbons) wrote :

Dies, but not silently.

Changed in openttd (Ubuntu):
status: Triaged → Fix Released
Changed in openttd (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.