Closed Bug 1138943 Opened 6 years ago Closed 4 years ago

crash in Unexpected exception at position -1: null at org.mozilla.gecko.sync.ExtendedJSONObject.parseRaw(ExtendedJSONObject.java)

Categories

(Firefox for Android :: Android Sync, defect)

Firefox 39
All
Android
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Tracking Status
firefox37 --- unaffected
firefox38 --- affected
firefox39 --- affected

People

(Reporter: aaronmt, Unassigned)

References

(Depends on 1 open bug)

Details

(Keywords: crash)

Crash Data

This bug was filed from the Socorro interface and is 
report bp-df16bccf-b17d-4db8-872c-3ee102150302.
=============================================================

Unexpected exception at position -1: null
	at org.mozilla.gecko.sync.ExtendedJSONObject.parseRaw(ExtendedJSONObject.java:57)
	at org.mozilla.gecko.sync.ExtendedJSONObject.<init>(ExtendedJSONObject.java:182)
	at org.mozilla.gecko.sync.ExtendedJSONObject.<init>(ExtendedJSONObject.java:191)
	at org.mozilla.gecko.fxa.authenticator.AndroidFxAccount.getState(AndroidFxAccount.java:548)
	at org.mozilla.gecko.fxa.sync.FxAccountSyncDelegate.handleError(FxAccountSyncDelegate.java:72)
	at org.mozilla.gecko.fxa.sync.FxAccountSyncAdapter$SyncDelegate.handleError(FxAccountSyncAdapter.java:99)
	at org.mozilla.gecko.fxa.sync.FxAccountSyncAdapter$SessionCallback.handleError$4e4f9a31(FxAccountSyncAdapter.java:199)
	at org.mozilla.gecko.fxa.sync.FxAccountSyncAdapter$1.handleError(FxAccountSyncAdapter.java:338)
	at org.mozilla.gecko.fxa.sync.FxAccountSyncAdapter$1.handleFailure(FxAccountSyncAdapter.java:332)
	at org.mozilla.gecko.tokenserver.TokenServerClient$2.run(TokenServerClient.java:92)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
	at java.lang.Thread.run(Thread.java:848)
Component: General → Android Sync
Product: Firefox for Android → Android Background Services
Version: Trunk → Firefox 39
I still can't explain these failures with getUserData, but this is basically a dupe of Bug 964854.
yes, a user in the sumo forum affected by bug 964854 confirmed that the was getting this new crash signature instead after he tried updating to 38 for testing purposes: https://support.mozilla.org/en-US/questions/1052164
This user still is around and somewhat technical. Anything useful we could ask for?
Flags: needinfo?(nalexander)
We also have a user reporting an invariable crash when trying to sync data, on French support forums: http://forums.mozfr.org/viewtopic.php?f=32&t=124129

Same crash signature, kingzone Z1 device. Is there anything we can ask to user to help investigating the issue?
I have the same problem with a ZOPO ZP720, I am unable to sync my account. I already uninstalled and reinstall Firefox.

Is it related to 64bit processor architecture ? 
http://www.mediatek.com/en/products/mobile-communications/smartphone1/mt67321/
(In reply to Nicolas Croiset from comment #5)
> I have the same problem with a ZOPO ZP720, I am unable to sync my account. I
> already uninstalled and reinstall Firefox.

I'm sorry about this :(

> Is it related to 64bit processor architecture ? 
> http://www.mediatek.com/en/products/mobile-communications/smartphone1/
> mt67321/

I suppose it's possible, but I can't imagine how.

kbrosnan: certain devices seem to be impacted by this.  (I have always suspected an OEM-customized Android issue; there are known platform bugs in the relevant code paths.)  Could you trawl the crash signatures and see if there's a device we have that might reproduce?  It's really hard to instrument remotely so perhaps shipping me a device is a reasonable approach.
Flags: needinfo?(nalexander) → needinfo?(kbrosnan)
As I know the ZP720 is not an android customized. But compatibilities between 64bits and 32 bits could be an issue at vars initialisation.
(In reply to Nicolas Croiset from comment #7)
> As I know the ZP720 is not an android customized. But compatibilities
> between 64bits and 32 bits could be an issue at vars initialisation.

It's possible, but unlikely.  The crash is during JSON parsing, but we think that the real issue is that the JSON read is not actually the JSON written.  :(

Would you be willing to run a test package (a custom Fennec build) with lots of logging turned on?  We might get to the bottom of this.  Could we set a time to talk on irc.mozilla.org/#mobile?
Flags: needinfo?(nicolas.croiset)
Yes no problem to make tests !
It is possible for me 26/05/2015 at 9pm french time for example.
Flags: needinfo?(nicolas.croiset)
There are 100s of devices that show up. From the names I suspect that they all ship without Google Play. The most common device is the Xiaomi Redmi Note, http://www.amazon.ca/s/?field-keywords=Xiaomi%20Redmi%20Note
Flags: needinfo?(kbrosnan)
(In reply to Kevin Brosnan [:kbrosnan] from comment #10)
> There are 100s of devices that show up. From the names I suspect that they
> all ship without Google Play. The most common device is the Xiaomi Redmi
> Note, http://www.amazon.ca/s/?field-keywords=Xiaomi%20Redmi%20Note

Thanks for the investigation :(  Luckily Nicolas provided me some logs that suggest a possible problem.  I'll investigate and update with my results.  Thanks, Nicolas!
(In reply to Kevin Brosnan [:kbrosnan] from comment #10)
> There are 100s of devices that show up. From the names I suspect that they
> all ship without Google Play. The most common device is the Xiaomi Redmi
> Note, http://www.amazon.ca/s/?field-keywords=Xiaomi%20Redmi%20Note

In my side, I have google play ;-)

On the second place you have Lenovo P70-A which have a processor : MT6752 4G LTE 1.7GHz 64-bit True8Core
I also have an Android device with Google Play (Umi Emax) with a MT6752 processor. Firefox mobile consistently crashes when I enable sync.
(In reply to Tom Levels from comment #13)
> I also have an Android device with Google Play (Umi Emax) with a MT6752
> processor. Firefox mobile consistently crashes when I enable sync.

Hi Tom, I'm sorry to hear this.  I still don't know why this is, but I do have a ticket tracking replacing the offending code Bug 1182193, which I hope will see progress soon.

Would you be willing to run a few special Nightly builds to test this, and to provide detailed logs?  It would be good to confirm my diagnosis.
Depends on: 1182193
Flags: needinfo?(TomLevels)
Yes, I could test some special builds and provide you logs. Just let me know what to do.
Flags: needinfo?(TomLevels)
Depends on: 1204559
Duplicate of this bug: 1211254
Crash Signature: [@ Unexpected exception at position -1: null at org.mozilla.gecko.sync.ExtendedJSONObject.parseRaw(ExtendedJSONObject.java)] → [@ Unexpected exception at position -1: null at org.mozilla.gecko.sync.ExtendedJSONObject.parseRaw(ExtendedJSONObject.java)] [@ Unexpected exception at position -1: null at org.mozilla.gecko.sync.ExtendedJSONObject.parseRaw]
Sony E4G here so can test:
latest firefox (just reinstalled) still crashes,
latest firefox beta doesn't crash but doesn't sync.
Let me know and can test,
Regards,
Matthew
Just installed Firefox on a brand new Lenovo P70 with latest official rom available (kitkat 4.4.4) and I am unable to get the sync to work as well :(
Looking at the crash signatures, I don't see any reports past 41. Fingers crossed, perhaps this got fixed somehow. Closing this for now.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Product: Android Background Services → Firefox for Android
You need to log in before you can comment on or make changes to this bug.