Yes, I think there's a leak here. Try replacing IOIOImpl.sync() with the
code below. If it fixes the problem I'll push it.
@Override
public void sync() throws ConnectionLostException, InterruptedException {
boolean added = false;
SyncListener listener = new SyncListener();
try {
synchronized (this) {
checkState();
incomingState_.addSyncListener(listener);
addDisconnectListener(listener);
added = true;
try {
protocol_.sync();
} catch (IOException e) {
throw new ConnectionLostException(e);
}
}
listener.waitSync();
} finally {
if (added) {
removeDisconnectListener(listener);
}
}
}
On Sat, Feb 22, 2014 at 3:22 PM, Markus Kaczmarek <
[email protected]> wrote:
> I've had some more specific log entries this time while running the
> application in ADB mode. The app runs a lot longer now but eventually it
> crashes too and closes down all together:
>
> Out of memory on a 8388624-byte allocation.
> ...
> at java.util.HashMap.doubleCapacity(HashMap.java:575)
> at java.util.HashMap.put(HashMap.java:405)
> at java.util.HashSet.add(HashSet.java:95)
>
> at
> ioio.lib.impl.IOIOImpl.IncomingState.addDisconnectListener(IncomingState.java:217)
> at ioio.lib.impl.IOIOImpl.sync(IOIOImpl.java:675)
>
> Seems like something is growing in size here..
> How can I trace what might be causing this?
>
> --
> You received this message because you are subscribed to the Google Groups
> "ioio-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/ioio-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
You received this message because you are subscribed to the Google Groups
"ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/groups/opt_out.