outofmemory exception while xml.parse(new InputStreamReader(inputUserInfo,"UTF-8"));

15 views
Skip to first unread message

CODENAME1

unread,
Feb 10, 2016, 6:42:52 AM2/10/16
to CodenameOne Discussions
In the stack trace, the statemachine refers to  h = xml.parse(new InputStreamReader(inputUserInfo,"UTF-8")); line . Any thing i am doing wrong?

java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(Unknown Source)
at java.lang.AbstractStringBuilder.append(Unknown Source)
at java.lang.StringBuilder.append(Unknown Source)
at com.codename1.xml.XMLParser.parseTag(XMLParser.java:696)
at com.codename1.xml.XMLParser.parseTagContent(XMLParser.java:438)
at com.codename1.xml.XMLParser.parse(XMLParser.java:268)
at userclasses.StateMachine$64.readResponse(StateMachine.java:4450)
at com.codename1.io.ConnectionRequest.performOperation(ConnectionRequest.java:440)
at com.codename1.io.NetworkManager$NetworkThread.run(NetworkManager.java:263)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
[Network Thread] 0:0:0,0 - java.lang.OutOfMemoryError: Java heap space
[Network Thread] 0:0:0,117 - java.lang.OutOfMemoryError: Java heap space

Shai Almog

unread,
Feb 11, 2016, 12:15:48 AM2/11/16
to CodenameOne Discussions
It seems that either the XML file is too large or that it triggered a recursion that pushed to the OOM. Is it well formed?

CODENAME1

unread,
Feb 12, 2016, 5:57:48 AM2/12/16
to CodenameOne Discussions
the xml is isnt big and is well formed.

Shai Almog

unread,
Feb 13, 2016, 12:24:27 AM2/13/16
to CodenameOne Discussions
We'll need a test case to reproduce that.
Reply all
Reply to author
Forward
0 new messages