Closed
Bug 636663
Opened 15 years ago
Closed 15 years ago
Android Java Crash java.lang.IllegalArgumentException
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(fennec2.0+)
RESOLVED
DUPLICATE
of bug 663447
| Tracking | Status | |
|---|---|---|
| fennec | 2.0+ | --- |
People
(Reporter: pavlov, Assigned: blassey)
References
Details
(Keywords: crash)
Attachments
(1 file, 1 obsolete file)
|
2.12 KB,
patch
|
dougt
:
review+
|
Details | Diff | Splinter Review |
java.lang.IllegalArgumentException: View not attached to window manager
at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:391)
at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:236)
at android.view.Window$LocalWindowManager.removeView(Window.java:432)
at android.app.Dialog.dismissDialog(Dialog.java:278)
at android.app.Dialog.access$000(Dialog.java:71)
at android.app.Dialog$1.run(Dialog.java:111)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:5068)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Updated•15 years ago
|
Comment 1•15 years ago
|
||
Stuart, how did you get this crash in the Android OS? Does it have something to do with Fennec?
Severity: normal → critical
Updated•15 years ago
|
tracking-fennec: --- → ?
Updated•15 years ago
|
tracking-fennec: ? → 2.0-
| Reporter | ||
Updated•15 years ago
|
tracking-fennec: 2.0- → ?
Comment 2•15 years ago
|
||
stuart, str? were you rotating the screen when this happened?
Updated•15 years ago
|
Assignee: nobody → doug.turner
Comment 3•15 years ago
|
||
So, the window manager owns a view. When we change the view, it is best to be on the main thread or things become racy. You can change the view by simply calling dismiss on a view. This happens in the crash reporting code.
finish() calls .dismiss on the progress dialog:
http://mxr.mozilla.org/mozilla-central/source/embedding/android/CrashReporter.java.in#94
We call finish after posting the crash report on a separate thread here:
http://mxr.mozilla.org/mozilla-central/source/embedding/android/CrashReporter.java.in#301
So, if the orientation changes, you will see this throw.
It is easy enough to wrap the dimiss() with a try/catch. However, do the reports suggest that there are other ways of crashing? Looking through gecko, i don't see other android system dialogs that are dismissed.
mwu, blassey?
Assignee: doug.turner → nobody
Updated•15 years ago
|
Assignee: nobody → doug.turner
Comment 4•15 years ago
|
||
The other thing I noticed is that at startup I see 4 calls on AndroidBridge that are not on the main thread:
Init()
SetSurfaceView()
SetMainThread()
AttachThread()
Can any of these race on anything view related? I don't think so, but not sure.
| Assignee | ||
Updated•15 years ago
|
tracking-fennec: ? → 2.0+
| Assignee | ||
Comment 5•15 years ago
|
||
Assignee: doug.turner → blassey.bugs
Attachment #516881 -
Flags: review?(doug.turner)
| Assignee | ||
Updated•15 years ago
|
Whiteboard: [needs-review (dougt)]
Comment 6•15 years ago
|
||
Comment on attachment 516881 [details] [diff] [review]
patch
in order to prevent multiple doFinish() calls, you should move:
mHandler = new Handler()
into doFinish() like so:
void doFinish() {
if (mHandler == null) {
mHandler = new Handler()
mHandler.post(new Runnable(){
public void run() {
finish();
}});
}
}
Attachment #516881 -
Flags: review?(doug.turner) → review-
| Assignee | ||
Comment 7•15 years ago
|
||
No, the handler needs ti be created on thee main thread. That's the whole point of this. Besides there shouldn't be anything dangerous about multiple finish () calls, nor do I think thur code can even do that
Comment 8•15 years ago
|
||
could you comment why the handler is created where it is? if so, i am happy with that.
Whiteboard: [needs-review (dougt)]
| Assignee | ||
Comment 9•15 years ago
|
||
added comment dougt asked for on irc
Attachment #516881 -
Attachment is obsolete: true
Attachment #516991 -
Flags: review?(doug.turner)
Updated•15 years ago
|
Attachment #516991 -
Flags: review?(doug.turner) → review+
| Assignee | ||
Comment 10•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Stuart, can you provide steps to reproduce please?
| Reporter | ||
Comment 12•15 years ago
|
||
I don't have STR -- this was reported from the Android market java crash stats
Comment 13•14 years ago
|
||
Can someone please verify this bug ?
Comment 14•14 years ago
|
||
Not fixed. We still see this crash in beta 5 (see bug 663447). Making a dup of bug 663447 so we can keep tracking it.
Resolution: FIXED → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•