Closed Bug 1390857 Opened 8 years ago Closed 7 years ago

Aborted forced cast in SQLiteHistory.getModifiedHistory

Categories

(Firefox for iOS :: Data Storage, enhancement, P1)

All
iOS
enhancement

Tracking

()

RESOLVED FIXED
Iteration:
1.29
Tracking Status
fxios 9.0 ---

People

(Reporter: st3fan, Assigned: justindarc)

Details

(Whiteboard: [Crash][MobileCore])

Attachments

(1 file)

This crash popped up in Sentry for the 8.2 release: https://sentry.prod.mozaws.net/share/issue/3235392e363339313830/ It is a forced cast that is failing. Possibly because one of those values is nil.
Whiteboard: [History][Crash] → [History][Crash][Sync]
Unclear where this data is coming from, but marking as Sync anyway.
Flags: needinfo?(sarentz)
Stefan, where do you see any reference to getModifiedHistory in that stack? Did you paste the wrong crash report? The crash you linked appears to be in: private func getConcernedIDs(colNames: [String]) -> ((SDRow) -> [String]) { return { (row: SDRow) in colNames.flatMap({ row[$0] as? String}) } } and that's a dynamic cast error, which doesn't make any sense with that `as?` there.
fileprivate class func getPasswordOrigin(_ uriString: String, allowJS: Bool = false) -> String? { var realm: String? = nil if let uri = URL(string: uriString), let scheme = uri.scheme, !scheme.isEmpty { if allowJS && scheme == "javascript" { return "javascript:" } realm = "\(scheme)://\(uri.host!)" Probably an empty host. This is called from LoginsHelper.swift, so while the data might have arrived from Sync, this seems to be just a plain ol' incorrect-assumptions bug.
Hardware: Other → All
Whiteboard: [History][Crash][Sync] → [Crash]
Priority: -- → P2
Assignee: nobody → jdarcangelo
Iteration: --- → 1.29
Rank: 1
Priority: P2 → P1
Need info from Stefan on this one. As mentioned in Comment 2, the linked crash report doesn't match the bug description. The bug corresponding to the linked crash report has already been fixed in Bug 1384771: https://github.com/mozilla-mobile/firefox-ios/commit/976444c20f0f26d5ccee5f713b20651c100202db
Attached file GitHub Pull Request
Assuming these forced casts are the cause of the issue :st3fan was originally referencing, here's a patch.
Attachment #8903814 - Flags: review?(rnewman)
Whiteboard: [Crash] → [Crash][MobileCore]
Comment on attachment 8903814 [details] [review] GitHub Pull Request Carrying over R+ from GitHub
Attachment #8903814 - Flags: review?(rnewman) → review+
Flags: needinfo?(sarentz)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: