Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on HTML parse #2

Closed
GrahamBlanshard opened this issue Nov 7, 2014 · 1 comment
Closed

Crash on HTML parse #2

GrahamBlanshard opened this issue Nov 7, 2014 · 1 comment

Comments

@GrahamBlanshard
Copy link
Owner

java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
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:841)
Caused by: java.lang.StringIndexOutOfBoundsException: length=31; regionStart=0; regionLength=-1
at java.lang.String.startEndAndLength(String.java:588)
at java.lang.String.substring(String.java:1475)
at wiseguys.radar.helpers.RadarHelper.parseRadarImages(RadarHelper.java:90)
at wiseguys.radar.ImageFetcher.getRadarImages(ImageFetcher.java:110)
at wiseguys.radar.RadarLoader.loadRadar(RadarLoader.java:65)
at wiseguys.radar.RadarLoader.doInBackground(RadarLoader.java:47)
at wiseguys.radar.RadarLoader.doInBackground(RadarLoader.java:19)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
... 4 more

Haven't really looked into it much yet. Deals with string parsing the prefix to the site from the downloaded gif image links.

Ideally we do away with the scrappy HTML parsing and manage to find out how we can straight request the JSON object that they use internally on the site.

@GrahamBlanshard
Copy link
Owner Author

Fixed with use of new parsing rules and JSoup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant