Last Comment Bug 660326 - send java exceptions to crash-stats
: send java exceptions to crash-stats
Status: VERIFIED FIXED
:
Product: Core
Classification: Components
Component: Widget: Android (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: mozilla7
Assigned To: Brad Lassey [:blassey] (use needinfo?)
:
Mentors:
Depends on: 661472
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-27 13:13 PDT by Brad Lassey [:blassey] (use needinfo?)
Modified: 2011-08-23 07:38 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (4.89 KB, patch)
2011-05-27 13:13 PDT, Brad Lassey [:blassey] (use needinfo?)
dougt: review-
Details | Diff | Review
patch (4.76 KB, patch)
2011-06-01 09:57 PDT, Brad Lassey [:blassey] (use needinfo?)
dougt: review+
Details | Diff | Review

Description Brad Lassey [:blassey] (use needinfo?) 2011-05-27 13:13:46 PDT
Created attachment 535725 [details] [diff] [review]
patch
Comment 1 Brad Lassey [:blassey] (use needinfo?) 2011-05-27 13:19:38 PDT
here's an example crash report with this patch https://crash-stats.mozilla.com/report/index/478f8d29-7977-4e12-b724-4b86b2110527
Comment 2 Doug Turner (:dougt) 2011-05-27 13:28:39 PDT
Comment on attachment 535725 [details] [diff] [review]
patch


>+                } catch (Exception e) {
>+                    Log.e("GeckoApp", "top level exception", e);
>+                    ByteArrayOutputStream baos = new ByteArrayOutputStream();
>+                    PrintStream ps = new PrintStream(baos);
>+                    e.printStackTrace(ps);
>+                    GeckoAppShell.reportJavaCrash(baos.toString());
>+                }

StringWriter instead of a ByteArrayOutputStream looks to be much more common.


>+                } catch (Exception e) {
>+                    Log.e("GeckoApp", "top level exception", e);
>+                    ByteArrayOutputStream baos = new ByteArrayOutputStream();
>+                    PrintStream ps = new PrintStream(baos);
>+                    e.printStackTrace(ps);
>+                    GeckoAppShell.reportJavaCrash(baos.toString());
>+                }
>+            }
>+        });

same.

Also, maybe reportJavaCrash should just take the Exception, and call it reportJavaUnhandledException?  Maybe it could take a flag if you want to abort or not.

toss one more up.



Also, ping the server folks and let them know how we are going to pass this data.  not sure if there will be any other request.
Comment 3 Brad Lassey [:blassey] (use needinfo?) 2011-06-01 09:57:43 PDT
Created attachment 536647 [details] [diff] [review]
patch
Comment 4 Doug Turner (:dougt) 2011-06-01 10:02:09 PDT
Comment on attachment 536647 [details] [diff] [review]
patch

discussed.  exceptions are hard over JNI.

did you discuss with server ops people?
Comment 5 Brad Lassey [:blassey] (use needinfo?) 2011-06-01 13:36:07 PDT
pushed http://hg.mozilla.org/mozilla-central/rev/54f7bd940f82
(In reply to comment #4)
> Comment on attachment 536647 [details] [diff] [review] [review]
> did you discuss with server ops people?

Yes, and it was on their agenda to discuss in today's meeting:
https://wiki.mozilla.org/Breakpad/Status_Meetings/2011-June-1#Other_issues
Comment 6 Mihaela Velimiroviciu (:mihaelav) 2011-08-23 06:25:26 PDT
Can anyone please provide some guidelines that I can use to verify this? Do I need to create any specific environment to test it?

Thanks!
Comment 7 Josh Matthews [:jdm] 2011-08-23 07:38:14 PDT
We have seen examples of Java stack traces in socorro reports, so this is verified.

Note You need to log in before you can comment on or make changes to this bug.