Page MenuHomePhabricator

Opening a saved page crashes the app
Closed, ResolvedPublic

Description

Currently, saving a page makes the app crash.

Debugging points me to a segfault when we use jQuery AJAX on a file:/// url.


Version: 1.0.0 (Android)
Severity: normal

Details

Reference
bz34207

Related Objects

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:11 AM
bzimport set Reference to bz34207.

Upgrading to PhoneGap 1.4.1 does not fix the issue. Need to bisect and figure out which exactly caused this issue.

Git bisected my way to find the offending commit: 237b09ca31d7e71771af1c60f5f7d3fb8cef3440

It was when we moved off zepto into jQuery, so the issue *is* with jQuery. Sigh.

Also there was this very helpful comment in the commit message:

Note: SavedPages no longer work. Yay!

So if I had remembered the commit messages I wrote, I wouldn't have had to spend the hour using git bisect. #facepalm

Fixed in b0296f6b4c35c84aea1ff552e531042f473640fa by using Zepto.js just for the Ajax.

Highly hacky solution, but best I could do for now. Two days of trying to debug jQuery seem to have failed (it seems to crash a while after the .send XHR call has been called). Either need to figure out why this is a problem with jQuery and fix that, or use raw XHR ourselves.

Closing for now, since this 'works'. Need to re-open bug about moving off zepto.js.