Issue255

Title Improve error reporting on Linux
Priority feature Status open
Assigned To Keywords
Linked issues Watchers

Submitted on 2011-07-24 19h07 by tracker_migration, last changed by ahuillet.

Messages
Author: tracker_migration Date: 2009-02-05   10h01
Submitted by stedevil
When running the game on Linux, we in general have a good error description output in the console.

However, if a user doesnt start the game manually but eg via an icon, they dont have a console, and thus get no info at all about what is happening.

This means they will likely think FDRPG is a buggy crap software that keeps crashing when we eg are just exiting with a fatal warning providing info about the error.

To get more bugreports about things not working as they should we should do both

a) Provide the error info in a popup inside the game before exiting.
b) Send the console output to a error textfile, easy to email or post on the tracker.
Author: tracker_migration Date: 2009-02-06   13h58
Posted by barbatrixx
>>This means they will likely think FDRPG is a buggy crap software that keeps
>>crashing when we eg are just exiting with a fatal warning providing info
>>about the error.

Yes, a good point.

>>Send the console output to a error textfile, easy to email or post on
the tracker.

I fully agree :]
Author: tracker_migration Date: 2009-02-08   09h33
Posted by matthiaskrgr
>However, if a user doesnt start the game manually but eg via an icon, they
>dont have a console, and thus get no info at all about what is happening.

As far as I know there is a /home/username/.xsession-errors file where output of not-terminal-started programs is saved.



>b) Send the console output to a error textfile, easy to email or post on
>the tracker.

Do you mean something like "freedroidRPG -whatever | tee errortextfile.txt"?
Author: tracker_migration Date: 2009-02-08   16h52
Posted by ahuillet
a) is not doable (what if you were not able to load font files? lots of corner cases here)

b) we send it to stderr which is pretty standard behavior. where would you want to output the errormsg? two possibilities would be /tmp or ~/.freedroid_rpg but I am not sure. this would be *very* non standard practice.
Author: tracker_migration Date: 2009-02-08   20h31
Posted by stedevil
*nix by default has been the territory of admins and generally tech savy people.

However we are getting more and more regular users on Linux, and many of those are potential FDRPG users. We cant assume they know how to deal with awkward "standards linux practice".

So we need something that shows a user starting the game from an icon what the *ell is going on when the game doesnt start or just drops to desktop for no apparent reason.

For a) not doable, I think we can live with not showing an ingame popup if the game doesnt even manage to start up. But once it's up I think proper behaviour on an exit would be to first show a popup, likely even allow for an emergency save of a current game, before sending the user to the desktop. Its just bad manners to behave like we would be crashing when we are not.

b) Donno where the best place would be, but perhaps to an errorlog in ~/.freedroid_rpg would be the most intuitive?
Author: tracker_migration Date: 2009-03-18   14h43
Posted by ahuillet
Hi,

a) can indeed probably be worked out in certain cases.
However, in this case, you have managed to start the game, so we're moving away from your original problem description (which differs notably because 95% of fatal errors come from a game incorrectly installed).
Besides, you cannot copy paste an on screen message. And if you are in the situation of not thinking about starting the game from a terminal, then virtually by definition you are not able to act upon the error message which means its only use is to be forwarded as-is to the developers. 
Therefore I doubt this is useful. We might as well display a popup saying "Fatal error - details written to stderr"

b) you expect people who do not know/do not want to learn about stderr to go look in ~/.freedroid_rpg (a hidden directory, by the way...)?

What I would advise in any case is to add one sentence in the README file reminding people to start the game from a terminal if it does not work right away.
We certainly cannot assume that our users all know how to deal with (awkward or very easy, depending on the point of view) "standard practice" in Linux world, but we can help teach them. 
Author: tracker_migration Date: 2009-03-18   20h55
Posted by stedevil
> so we're moving
> away from your original problem description 

How do you mean? I can see no such limitation in my original description and I never intended there to be either.

> which differs notably because
> 95% of fatal errors come from a game incorrectly installed

Which in turn isn't much of a problem, since those 95% contains no loss of user data. So those remaining 5% is the important ones for a good user experience since it might lose them several hours of gaming progress (which pisses a user off quite much, and for good reason, since it's completely unnecessary in many cases).

> We might as well display a popup saying 
> "Fatal error - details written to stderr"

Works for me. Just throw in a "emergency save of your game is being made." and in the logfile "It might be possible to continue playing your game from the emergency save, depending on what triggered it, but its main intent is to provide a test case for the developers for reproducing the issue and fix it so it doesnt happen again." 

> b) you expect people who do not know/do not want to learn about 
> stderr to go look in ~/.freedroid_rpg (a hidden directory, by the way...)?

Definitly. Hidden dirs are easy to "find". Starting software via console every time (instead of just clicking the menu icon) just in case you might have a problem, is just ridiculous. 

> What I would advise in any case is to add one sentence in the README 
> file reminding people to start the game from a terminal if it does not 
> work right away.

README saying "watch in console" or "open error logfile" is equally advanced. The 2nd also offers the advantage of working in hindsight, while with the console option you are still screwed if the crash already happened.

> "standard practice" in Linux world, but we can help teach them. 

Why should we teach people an old, tedious/outdated way of doing things when we can improve the situation and offer something better quite easily?
Author: tracker_migration Date: 2009-03-23   04h16
Posted by jkwood
Not sure I'd call the use of the terminal for debugging purposes outdated.  I actually use it almost daily.  What I find to be frustrating is programs that don't give me anything at all in the way of console output.  I find FreedroidRPG to be one of the most useful in that regard, as far as I've found.

Not that I think it would be wrong to create a log... we'll just need rotation if we don't want to take up inordinate amounts of disk space.
Author: tracker_migration Date: 2009-03-28   00h52
Posted by stedevil
> Not sure I'd call the use of the terminal for debugging purposes outdated. 

Depends on your target audience. Is it Linux admins and programers or todays 15 year olds that barely know what a terminal is (PS & XBox dont have those)?

Right now we rely solely on people running in a terminal for error messages to even be visible. If they don't, all the error info is lost to the void and the game appears to just crash. 

> we'll just need rotation
> if we don't want to take up inordinate amounts of disk space.

On windows we overwrite the log file each time. I think that should work for Linux as well.
Author: tracker_migration Date: 2010-03-22   14h11
Posted by cygal
The advantage of writing to a logfile in ~/.freedroidrpg is that we can then ask the file to users on the mailing list. Rewriting it at each startup is simple indeed.
History
Date User Action Args
2011-07-26 07:53:54ahuilletsetpriority: bug -> feature
title: Need errorlog and user INFO on Linux -> Improve error reporting on Linux
2011-07-24 19:07:45tracker_migrationcreate