Last modified: 2014-07-31 15:57:27 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T70656, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 68656 - JSONException: Unterminated object
JSONException: Unterminated object
Status: RESOLVED FIXED
Product: Wikipedia App
Classification: Unclassified
Android App (Other open bugs)
Alpha
All All
: Unprioritized normal
: ---
Assigned To: Nobody - You can work on this!
:
: 68735 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-27 01:53 UTC by Alex Monk
Modified: 2014-07-31 15:57 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Alex Monk 2014-07-27 01:53:16 UTC
Seems to have begun with 2.0-r-2014-07-23
We're getting errors like these:
org.json.JSONException: Unterminated object at character 60 of
[some JSON]
at org.json.JSONTokener.syntaxError(JSONTokener.java:450)
at org.json.JSONTokener.readObject(JSONTokener.java:394)
at org.json.JSONTokener.nextValue(JSONTokener.java:100)
at org.json.JSONTokener.readObject(JSONTokener.java:385)
at org.json.JSONTokener.nextValue(JSONTokener.java:100)
at org.json.JSONObject.<init>(JSONObject.java:154)
at org.json.JSONObject.<init>(JSONObject.java:171)
at org.wikipedia.bridge.CommunicationBridge$CommunicatingChrome.onJsPrompt(CommunicationBridge.java
:117)
at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:617)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)

They all seem to be Japanese users of the app, and the text seems to be Japanese in every case I've seen so far.

https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=7688779
https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=7690999
https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=7691090
https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=7691772
https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=7693297
https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=7687247
https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=7691768
https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=7688124
https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=7692130
Comment 1 Dmitry Brant 2014-07-28 14:30:37 UTC
*** Bug 68735 has been marked as a duplicate of this bug. ***
Comment 2 Gerrit Notification Bot 2014-07-28 15:56:39 UTC
Change 149883 had a related patch set uploaded by Dbrant:
Fix possible crash related to JSON encoding in clicking references.

https://gerrit.wikimedia.org/r/149883
Comment 3 Bernd Sitzmann 2014-07-28 23:59:27 UTC
https://ticket.wikimedia.org/otrs/index.pl?Action=AgentZoom&TicketID=7695568

Unterminated object at
> character 55 of {"type":"referenceClicked","payload":{"ref":"<a rel=?"nofollow?"
> class=?"external text?"
> href=?"http://hubblesite.org/newscenter/archive/releases/1996/04/?">Hubble Space
> Telescope Captures First Direct Image of a Star</a> - ハッブル宇宙望遠鏡サイト"}}

Found that one Japanese wiki page that has this reference link:
https://ja.wikipedia.org/wiki/%E3%83%99%E3%83%86%E3%83%AB%E3%82%AE%E3%82%A6%E3%82%B9#cite_note-13
(Betelgeuse on Japanese wiki)

Created a link on [[:test:TestLink]] to that since I had a hard time entering the title in the Wikipedia app on Android. Still can't reproduce this bug. Tried both English and Japanese system language.
Comment 5 Dmitry Brant 2014-07-31 15:10:50 UTC
Aha, a few of the crash reports actually make sense, such as these:

https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=7695690
https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom;TicketID=7695568

So, in these cases, the json data is definitely not being 'stringify'ed correctly across the bridge. But why?
Comment 6 Dmitry Brant 2014-07-31 15:48:35 UTC
Reproduced!!! (on my 4.1.2 tablet, with system language set to Japanese)

The patch linked above does indeed fix it. Should be in production soon.
Comment 7 Gerrit Notification Bot 2014-07-31 15:51:09 UTC
Change 149883 merged by jenkins-bot:
Fix possible crash related to JSON transfer across the Bridge.

https://gerrit.wikimedia.org/r/149883

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links