86

I'm making an android app in Android Studio, integrating ParseCloud and when I try to retrieve some JSONObject from the cloud, I get this error message after step-debugging:

12-13 13:32:34.857 25631-25638/com.parse.starter A/art: art/runtime/barrier.cc:90] Check failed: count_ == 0 (count_=-1, 0=0) Attempted to destroy barrier with non zero count
12-13 13:32:34.858 25631-25638/com.parse.starter A/art: art/runtime/runtime.cc:366] Runtime aborting --- recursively, so no thread-specific detail!
12-13 13:32:34.863 25631-25638/com.parse.starter A/art: art/runtime/runtime.cc:366]
12-13 13:32:34.882 25631-25638/com.parse.starter A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 25638 (JDWP)

Problem arises in this piece of code in ParseDecoder.java, precisely on the while line:

Map<String, Object> convertJSONObjectToMap(JSONObject object) {
    Map<String, Object> outputMap = new HashMap<>();
    Iterator<String> it = object.keys();
    while (it.hasNext()) {
      String key = it.next();
      Object value = object.opt(key);
      outputMap.put(key, decode(value));
    }
    return outputMap;
}

As I've seen while debugging, the object I wait for is created and is filled with one entry, but then this happens and I'm little bit lost... Any guidance will be great, thank you very much!

ArtanisAce
  • 957
  • 7
  • 14
  • 2
    Hey! Error was on the call I made to the function; I had to write the call like it was an the returned object. It was working that way. ParseCloud.callFunctionInBackground("usersInDistanceOfGeoPoint", params, new FunctionCallback() { @Override public void done(Object object, com.parse.ParseException e) { ..... – ArtanisAce Jan 18 '16 at 16:53
  • Are you using android:sharedUserId="android.uid.system"? – Jaydev Mar 02 '17 at 15:42
  • can you also post the contents of `decode`? – Greg Giacovelli Feb 14 '22 at 18:39

1 Answers1

1

I've solved the problem. I was using an old version of Parse library and it was interfering with the new one. I've just changed the Parse.initialize() lines to:

Parse.initialize(new Parse.Configuration.Builder(this)
        .applicationId("MY_APP_ID")
        .clientKey("MY_CLIENT_KEY")
        .server("MY_SERVER_URL")
        .build()
);

and it worked!

JnBrymn
  • 24,245
  • 28
  • 105
  • 147