I am trying to use google firebase realtime database. My users can create events which I want to have on the database as a separate table as well as in the user class as a list. This is what I use to write the events to the database and where the exception occurs:
mDatabase.child("users").child(ResourceManager.getUser().getId()).child("events").setValue(event);
mDatabase.child("events").setValue(ResourceManager.getAllEvents());
The problem is that when I try to save the created event I start getting messages that the garbage collection is working few times and after that the same exception printed 100 times at the end of it the app restarts.
06-30 18:38:19.555 15005-15005/tvfriends.kolio.com.tvproba E/AndroidRuntime: at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaD(Unknown Source)
at com.google.android.gms.internal.zzaix$zza.zzaE(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaD(Unknown Source)
at com.google.android.gms.internal.zzaix$zza.zzaE(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaD(Unknown Source)
at com.google.android.gms.internal.zzaix$zza.zzaE(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaD(Unknown Source)
at com.google.android.gms.internal.zzaix$zza.zzaE(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaD(Unknown Source)
at com.google.android.gms.internal.zzaix$zza.zzaE(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaD(Unknown Source)
at com.google.android.gms.internal.zzaix$zza.zzaE(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaD(Unknown Source)
at com.google.android.gms.internal.zzaix$zza.zzaE(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaD(Unknown Source)
at com.google.android.gms.internal.zzaix$zza.zzaE(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaD(Unknown Source)
at com.google.android.gms.internal.zzaix$zza.zzaE(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaD(Unknown Source)
at com.google.android.gms.internal.zzaix$zza.zzaE(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaD(Unknown Source)
at com.google.android.gms.internal.zzaix$zza.zzaE(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzav(Unknown Source)
at com.google.firebase.database.DatabaseReference.zza(Unknown Source)
at com.google.firebase.database.DatabaseReference.setValue(Unknown Source)
at tvfriends.kolio.com.tvproba.HostActivity.onClick(HostActivity.java:109)
at android.view.View.performClick(View.java:5609)
at android.view.View$PerformClick.run(View.java:22238)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6044)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Also at the end of the top Exception I get another one
06-30 18:38:21.478 15005-15005/tvfriends.kolio.com.tvproba D/Error: ERR: TOTAL BYTES WRITTEN: 13034964
06-30 18:38:21.484 15005-15005/tvfriends.kolio.com.tvproba E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 13035048)
06-30 18:38:21.485 15005-15005/tvfriends.kolio.com.tvproba E/AndroidRuntime: Error reporting crash
android.os.TransactionTooLargeException: data parcel size 13035048 bytes
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:615)
at android.app.ActivityManagerProxy.handleApplicationCrash(ActivityManagerNative.java:5100)
at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:97)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1068)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1063)
In my Event class I have this variables which I try to store:
private TVEvent tvEvent;
private User host;
private long date;
private String location;
private TVSet tvSet;
private List<User> attending;
private int eventStatus;
TVEvent, TVSet and User have one bitmap each in them and mostle primitive data. So what is the problem here? Any help is deeply appreciated.
EDIT
Here is the stackoverflow error:
D/Error: ERR: stack=java.lang.StackOverflowError: stack size 8MB
at java.lang.reflect.Method.invoke(Native Method)
at com.google.android.gms.internal.zzaix$zza.zzaE(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaD(Unknown Source)
at com.google.android.gms.internal.zzaix$zza.zzaE(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaD(Unknown Source)
at com.google.android.gms.internal.zzaix$zza.zzaE(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaD(Unknown Source)
at com.google.android.gms.internal.zzaix$zza.zzaE(Unknown Source)
at com.google.android.gms.internal.zzaix.zzaw(Unknown Source)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…