Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9247945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:51:47+00:00 2026-06-18T09:51:47+00:00

I am developing an app for android which downloads points of interest from a

  • 0

I am developing an app for android which downloads points of interest from a server using JSON strings. Everything was working fine but since I have started testing on 4.2.1, I have been getting the following error:

01-28 15:32:14.167: E/AndroidRuntime(31174): FATAL EXCEPTION: AsyncTask #1
01-28 15:32:14.167: E/AndroidRuntime(31174): java.lang.RuntimeException: An error occured while executing doInBackground()
01-28 15:32:14.167: E/AndroidRuntime(31174):    at android.os.AsyncTask$3.done(AsyncTask.java:299)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at java.util.concurrent.FutureTask.run(FutureTask.java:239)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at java.lang.Thread.run(Thread.java:856)
01-28 15:32:14.167: E/AndroidRuntime(31174): Caused by: java.lang.StackOverflowError
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:371)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:375)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:380)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:375)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:380)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:375)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:380)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:375)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:380)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:375)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:380)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:375)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:380)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:375)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:380)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:375)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:380)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:375)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:380)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:375)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:380)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:375)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:380)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:375)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:380)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:375)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:380)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.$Gson$Types.resolve($Gson$Types.java:355)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:117)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:72)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.Gson.getAdapter(Gson.java:353)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.<init>(ReflectiveTypeAdapterFactory.java:82)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:81)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:118)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:72)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.Gson.getAdapter(Gson.java:353)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.<init>(ReflectiveTypeAdapterFactory.java:82)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:81)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:118)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:72)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.Gson.getAdapter(Gson.java:353)
01-28 15:32:14.167: E/AndroidRuntime(31174):    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.<init>(ReflectiveTypeAdapterFactory.java:

The weird thing is, it works fine on every other version I have tried…

Here is the line I think it is crashing at:

    Gson g = new Gson();
    JSONResponse jsonResponse = g.fromJson(serverReply, JSONResponse.class); <---

and the class I am trying to create:

/**
 * The JSONResponse from the server
 * @author Tom
 *
 */
public class JSONResponse {
    private String          status;
    private PointOfInterest result;

    /**
     * Creates a JSONResponse object 
     * @param json
     * @return
     */
    static JSONResponse convertJSONToResponse(String json){
        Gson gson = new Gson();
        JSONResponse jsonResponse = gson.fromJson(json, JSONResponse.class);
        return jsonResponse;
    }

    /**
     * Get Point of Interest
     */

    public PointOfInterest getPointofInterest(){
        return result;
    }

    public String getStatus(){
        return status;
    }

    /**
     * Get PrivateSection, area we can put our own data
     */
    /*
    public String getPrivateSection(){
        return privateSection;
    }
    */
    /**
     * Creates a JSONResponse object 
     * @param json
     * @return
     */
    String convertJSONResponseToJSON(){
        Gson gson = new Gson();
        return gson.toJson(this);
    }
}

Please note I am aware of the terrible design pattern I have employed here, this application is for a mobile apps class I am taking in college so take it easy on me !

Edit
Turns out downgrading gson to 1.7.1 works for me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:51:47+00:00Added an answer on June 18, 2026 at 9:51 am

    So it turns out this is a bug as Erik Nedwidek pointed out. I took the easy route and downgraded gson from 2.2.2 to 1.7.1, everything works a treat now !

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am into developing an android app which fetches images from server. A single
We are developing a mobile app in Android and iPhone which has a server-side
I'm thinking about developing an iPhone/Android app which will include a server side. For
I am developing an app using android OS for which I need to know
I am developing an Android App which gives users an option 'Browse Alphanumerically'. Using
I'm developing an Android app which based on a web-server. Users, who installed the
I am developing an android app which fetches/uploads data from/to the web service every
I am developing an android app which needs to activate the GPS. I read
I am developing an Android app which gets an image encoded in base 64
I'm developing an Android app which is a quiz. On the other hand, I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.