Closed Bug 1097098 Opened 11 years ago Closed 11 years ago

crash in java.lang.RuntimeException: Unhandled error for GeckoRequest: Session:GetHistory at org.mozilla.gecko.util.GeckoRequest.onError(GeckoRequest.java)

Categories

(Firefox for Android Graveyard :: General, defect)

36 Branch
All
Android
defect
Not set
critical

Tracking

(firefox36 affected, fennec36+)

RESOLVED FIXED
Firefox 37
Tracking Status
firefox36 --- affected
fennec 36+ ---

People

(Reporter: aaronmt, Assigned: vivek, Mentored)

References

Details

(Keywords: crash)

Crash Data

Attachments

(1 file, 2 obsolete files)

This bug was filed from the Socorro interface and is report bp-7abcb9ea-ff1e-4421-9259-378b22141110. ============================================================= java.lang.RuntimeException: Unhandled error for GeckoRequest: Session:GetHistory at org.mozilla.gecko.util.GeckoRequest.onError(GeckoRequest.java:89) at org.mozilla.gecko.GeckoAppShell$3.handleMessage(GeckoAppShell.java:437) at org.mozilla.gecko.EventDispatcher.dispatchEvent(EventDispatcher.java:168) at org.mozilla.gecko.GeckoAppShell.handleGeckoMessage(GeckoAppShell.java:2259) at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method) at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method) at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method) at org.mozilla.gecko.GeckoAppShell.runGecko(GeckoAppShell.java:370) at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:190)
* Crash when opening long press back menu. Back button was unresponsive, pressed multiple times. Crash after previous app reappeared. Rnewman * hitting the back button
Vivek, want to take this?
Flags: needinfo?(vivekb.balakrishnan)
Mentor: bnicholson
tracking-fennec: ? → 36+
Yes thanks, I will look into that.
Assignee: nobody → vivekb.balakrishnan
Flags: needinfo?(vivekb.balakrishnan)
Vivek says he hasn't been able to reproduce, so marking steps-wanted for some QA help. Bug 1052158 should help us here once it lands since reports will also include the JS stack.
Keywords: steps-wanted
Vivek, bug 1104053, bug 1103605, and bug 1103409 have stacks showing that we throw at nsISHistory.getEntryAtIndex(), so it looks like we're sending invalid indices somewhere. Might be worth enabling the "always restore tabs" pref, then killing/restoring Fennec while hitting the back button to see if things get out of sync somewhere. Can you see if that helps to reproduce?
Flags: needinfo?(vivekb.balakrishnan)
Status: NEW → ASSIGNED
Aaron, do you happen to have any STR?
Flags: needinfo?(aaron.train)
I have not encountered this; the comments in comment #1 are what's detailed here. Is this code called only on invoking the long-press back menu button?
Flags: needinfo?(aaron.train)
(In reply to Aaron Train [:aaronmt] from comment #13) > I have not encountered this; the comments in comment #1 are what's detailed > here. Is this code called only on invoking the long-press back menu button? Yep.
Attached patch 1097098.patch (obsolete) — Splinter Review
As discussed, a new patch which offloads the from and to Index calculation based on the browser history maintained in js. This will solve the issue with history not in sync between java and js.
Flags: needinfo?(vivekb.balakrishnan)
Attachment #8531913 - Flags: review?(bnicholson)
Attached patch 1097098.patch (obsolete) — Splinter Review
Added bug comment and review info.
Attachment #8531913 - Attachment is obsolete: true
Attachment #8531913 - Flags: review?(bnicholson)
Attachment #8531918 - Flags: review?(bnicholson)
Comment on attachment 8531918 [details] [diff] [review] 1097098.patch Review of attachment 8531918 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/BrowserApp.java @@ +3071,5 @@ > } > > Tab tab = Tabs.getInstance().getSelectedTab(); > if (tab != null && !tab.isEditing()) { > + return tabHistoryController.showTabHistory(TabHistoryController.HistoryAction.ALL); Please keep tab, then pass the tabId to Gecko. ::: mobile/android/base/tabs/TabHistoryController.java @@ +41,4 @@ > JSONObject json = new JSONObject(); > try { > + json.put("action", action.name()); > + json.put("maxListSize", Tab.MAX_HISTORY_LIST_SIZE); Since this isn't used anywhere else, you might as well drop this and define MAX_HISTORY_LIST_SIZE in JS instead of Java. ::: mobile/android/chrome/content/browser.js @@ +1961,5 @@ > this._prefObservers = newPrefObservers; > }, > > + // This method will return a list of history items and toIndex based on the action provided from the fromIndex to toIndex, > + // optionally selecting selIndex(if fromIndex<=selIndex<=toIndex) Nit: add some spaces between words/operators: "selIndex (if fromIndex <= selIndex <= toIndex)" @@ +1966,4 @@ > getHistory: function(data) { > + let action = data.action; > + let maxListSize = data.maxListSize; > + let webNav = BrowserApp.selectedTab.window.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebNavigation); We should get the tab using the given tabId instead. @@ +2001,5 @@ > + } else { > + // return empty list immediately. > + return { "historyItems" : listitems, > + "toIndex" : toIndex > + }; Nit: please format this block like so: return { historyItems: listitems, toIndex: toIndex, }; (Removed space before ":", reformatted indentation, and trailing commas on all lines). @@ +2018,5 @@ > } > > + return { "historyItems" : listitems, > + "toIndex" : toIndex > + }; Same here.
Attachment #8531918 - Flags: review?(bnicholson) → feedback+
Attached patch 1097098.patchSplinter Review
Review comments correction. As discussed added a sanity check in Session:Navigate to deal with index not in sync between JS and Java Try server run : https://tbpl.mozilla.org/?tree=Try&rev=dc3bdd37a3a8
Attachment #8531918 - Attachment is obsolete: true
Attachment #8532781 - Flags: review?(bnicholson)
Comment on attachment 8532781 [details] [diff] [review] 1097098.patch Review of attachment 8532781 [details] [diff] [review]: ----------------------------------------------------------------- Nice, looks good to me. Let's hope this fixes the crash.
Attachment #8532781 - Flags: review?(bnicholson) → review+
Keywords: crash
Blocks: 1108720
Blocks: 732752
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 37
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: