Closed
Bug 899463
Opened 12 years ago
Closed 12 years ago
[fig] Bookmark Edit via context menu causes crash
Categories
(Firefox for Android Graveyard :: General, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 26
People
(Reporter: capella, Assigned: capella)
References
Details
(Whiteboard: fixed-fig)
Attachments
(1 file)
1.16 KB,
patch
|
Margaret
:
review+
|
Details | Diff | Splinter Review |
Looks like a small regression from bug 897250 ... patch attached ...
W/dalvikvm(12162): threadid=1: thread exiting with uncaught exception (group=0x41665438)
E/GeckoAppShell(12162): >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 1 ("main")
E/GeckoAppShell(12162): android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
E/GeckoAppShell(12162): at android.view.ViewRootImpl.setView(ViewRootImpl.java:708)
E/GeckoAppShell(12162): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:345)
E/GeckoAppShell(12162): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:224)
E/GeckoAppShell(12162): at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:149)
E/GeckoAppShell(12162): at android.app.Dialog.show(Dialog.java:277)
E/GeckoAppShell(12162): at org.mozilla.gecko.EditBookmarkDialog.show(EditBookmarkDialog.java:239)
E/GeckoAppShell(12162): at org.mozilla.gecko.EditBookmarkDialog$1.onPostExecute(EditBookmarkDialog.java:169)
E/GeckoAppShell(12162): at org.mozilla.gecko.EditBookmarkDialog$1.onPostExecute(EditBookmarkDialog.java:143)
E/GeckoAppShell(12162): at org.mozilla.gecko.util.UiAsyncTask$BackgroundTaskRunnable$1.run(UiAsyncTask.java:56)
E/GeckoAppShell(12162): at android.os.Handler.handleCallback(Handler.java:615)
E/GeckoAppShell(12162): at android.os.Handler.dispatchMessage(Handler.java:92)
E/GeckoAppShell(12162): at android.os.Looper.loop(Looper.java:137)
E/GeckoAppShell(12162): at android.app.ActivityThread.main(ActivityThread.java:4950)
E/GeckoAppShell(12162): at java.lang.reflect.Method.invokeNative(Native Method)
E/GeckoAppShell(12162): at java.lang.reflect.Method.invoke(Method.java:511)
E/GeckoAppShell(12162): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1004)
E/GeckoAppShell(12162): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:771)
E/GeckoAppShell(12162): at dalvik.system.NativeStart.main(Native Method)
--------- beginning of /dev/log/system
Attachment #783000 -
Flags: review?(margaret.leibovic)
Assignee | ||
Updated•12 years ago
|
Attachment #783000 -
Attachment is patch: true
![]() |
||
Updated•12 years ago
|
Priority: -- → P1
Comment 1•12 years ago
|
||
I'm confused about why this is happening... EditBookmarkDialog's constructor takes a Context as a parameter, so it the problem that getActivity().getApplicaitonContext() is returning a different Context that we don't want? If so, should we go back to just passing around the Activity instead?
Cc'ing Sriram because the change that caused this was his suggestion.
Assignee | ||
Comment 2•12 years ago
|
||
Yah, I spotted the back and forth somewhere along the line, fwiw the actual values involved
context org.mozilla.gecko.GeckoApplication@4233c840
getActivity() org.mozilla.fennec_mozilla.App@42352038
Comment 3•12 years ago
|
||
Given how this regression was caused, I think I'd prefer to see us just go back to passing around an Activity instead of a Context inside onContextItemSelected. Basically, revert this change (and the places context is used):
https://hg.mozilla.org/projects/fig/rev/73eef60094a0#l1.65
![]() |
||
Comment 4•12 years ago
|
||
I somehow thought Dialog's can work with ApplicationContext. Seems like they need Activity/Activity's context. Feel free to switch back.
Comment 5•12 years ago
|
||
Comment on attachment 783000 [details] [diff] [review]
bugedit
Sounds good, let's land this. Bonus points if you add a comment above explaining why we need to pass the activity itself in here.
Attachment #783000 -
Flags: review?(margaret.leibovic) → review+
Assignee | ||
Comment 6•12 years ago
|
||
Can haz maple syrup :-P
https://hg.mozilla.org/projects/fig/rev/4e2ac48c1039
Updated•12 years ago
|
Whiteboard: fixed-fig
![]() |
||
Comment 7•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•