Opened 17 years ago

Last modified 10 years ago

#192 new task

Automatic Error Reporting (Client Side)

Reported by: Jan Wassenberg Owned by:
Priority: Nice to Have Milestone: Backlog
Component: Core engine Keywords:
Cc: Patch:

Description

The (client end) requirements are:


  • must be cross-platform, not Windows-specific. Solution: see $GUI
  • must be able to gather several files (crashlogs/dumps) and/or text and bundle them together for sending.
  • must show a list of the files/data being sent
  • must work out-of-the-box despite weird network setups. This means using the system's proxy settings, etc. Solution is easy; see $SEND.

Recommendations:


1) since it will be called when the game is in an uncertain state (i.e. may have hosed its memory), interaction with the game should be minimal. It should not share all too much code with the game (lest that code be the very source of the error), and should just gather up the crashlogs, send them, and be done.

2) as an extension of #1, we can take a step back from the obvious implementation of "send-after-crash, then exit process". Instead, it may be clever to just write out the crashlogs with our last breath, and then the next time the game starts, check for any unsent crashlogs. This would ensure our socket connection works and is uncorruped, but does have the slight danger that ticked-off users might not even want - or manage to - run the game a second time. Compromise: maybe a combination: try sending immediately after crash, and revert to the other method if that doesn't appear to have worked?

$GUI: First off, a GUI is needed - text mode looks quite unprofessional and leaves a bad impression. We use wxWidgets for this purpose in our other tools. Incidentally, wxW contains code that implements most of the desired functionality (namely: adding files/text, displaying a list, sending it). For details on sending and why their implementation is inadequate, see below. It is unclear how much customization is required for the GUI part of an error reporting dialog, but I suspect not much at all.

$SEND: The current send implementation is apparently based on CURL (a library for sending files via internet). That is fine and very good and takes care of the dirty details of sending things. However, it is apparently accomplished by exec-ing the curl executable, which must lie on the path. That's a bit ugly and requires installation (boo), so ideally we would link directly to CURL (just adding it as a library in binaries/system). To work around this, it should be easy to simply subclass the existing send code and reimplement via public interface. This avoids us needing to patch wxW after each of its new releases.

To recap: the game generates a crashlog, dump file containing register state, and whatever logs may be relevant. This code is already in place. A (wxW) dialog is then generated which displays this information, offers to send them and shows what is contained.

Implementation nice to have:


1) it would be good for this tool to be applicable to various projects. To that end, application-specific dialog title text should be settable from the outside. Also, the paths to the 0ad crashlog files (../logs relative to EXE path) ought not to be all too hard-coded.

2) Ideally, it would be usable as a single obj/DLL file together with a header file defining the interface. That is to say: no direct compile-time dependency on wxw is required of *users* of the error reporter. This makes dropping into other projects easier because wxw need not be configured/built; developers of that project can just add the wxw DLL and be done.

Change History (5)

comment:1 by Erik Johansson, 15 years ago

Owner: joe removed

comment:2 by (none), 14 years ago

Milestone: Advanced Multiplayer Demo

Milestone Advanced Multiplayer Demo deleted

comment:3 by Andrew, 14 years ago

Milestone: Backlog
Owner: set to Andrew

comment:4 by historic_bruno, 13 years ago

Owner: Andrew removed

comment:5 by historic_bruno, 10 years ago

Possible open source solution for client error reporting: https://code.google.com/p/google-breakpad/

Note: See TracTickets for help on using tickets.