Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash: Adding a big file to shared project #11

Closed
dpp-gerrit opened this issue Jul 3, 2010 · 5 comments
Closed

Crash: Adding a big file to shared project #11

dpp-gerrit opened this issue Jul 3, 2010 · 5 comments

Comments

@dpp-gerrit
Copy link

Invite one participant to a shared project session using SOCKS5. Host adds a big file (tested w/ 70MB) to the project (drag-and-drop from another project).

ERROR 12:13:10,859 (Util.java:425) Internal Fatal Error:
java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(Unknown Source)
    at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
    at java.lang.AbstractStringBuilder.append(Unknown Source)
    at java.lang.StringBuffer.append(Unknown Source)
    at com.thoughtworks.xstream.core.util.Base64Encoder.encode(Base64Encoder.java:64)
    at com.thoughtworks.xstream.converters.extended.EncodedByteArrayConverter.marshal(EncodedByteArrayConverter.java:41)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshallField(AbstractReflectionConverter.java:157)
    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.writeField(AbstractReflectionConverter.java:148)
    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.visit(AbstractReflectionConverter.java:118)
    at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:129)
    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:100)
    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:58)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshallField(AbstractReflectionConverter.java:157)
    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.writeField(AbstractReflectionConverter.java:148)
    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.visit(AbstractReflectionConverter.java:118)
    at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:129)
    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:100)
    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:58)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)
    at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
    at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:55)
    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)
    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.visit(AbstractReflectionConverter.java:115)
    at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:129)
ERROR 12:13:20,828 (Util.java:429) Original caller:
StackTrace:
    at de.fu_berlin.inf.dpp.util.Util.wrapSafe(Util.java:411)
    at de.fu_berlin.inf.dpp.util.Util.runSafeSync(Util.java:541)
    at de.fu_berlin.inf.dpp.net.internal.ActivitySequencer$1.run(ActivitySequencer.java:478)
    at java.util.TimerThread.mainLoop(Unknown Source)
    at java.util.TimerThread.run(Unknown Source)

Reported by: ahaferburg

Original Ticket: dpp/bugs/380

@dpp-gerrit
Copy link
Author

I suspect FileActivity#created() which calls FileUtils#readFileToByteArray(). Sending a new file should use streaming.

Original comment by: ahaferburg

@dpp-gerrit
Copy link
Author

Here's my stack trace:

ERROR 14:26:58,656 [Timer-1] (Utils.java:379) Internal Fatal Error:
java.lang.OutOfMemoryError: Java heap space
    at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:249)
    at java.lang.StringCoding.encode(StringCoding.java:289)
    at java.lang.String.getBytes(String.java:954)
    at de.fu_berlin.inf.dpp.net.internal.XMPPTransmitter.sendToProjectUser(XMPPTransmitter.java:725)
    at de.fu_berlin.inf.dpp.net.internal.XMPPTransmitter.sendToProjectUser(XMPPTransmitter.java:692)
    at de.fu_berlin.inf.dpp.net.internal.XMPPTransmitter.sendTimedActivities(XMPPTransmitter.java:633)
    at de.fu_berlin.inf.dpp.net.internal.ActivitySequencer$2.sendActivities(ActivitySequencer.java:675)
    at de.fu_berlin.inf.dpp.net.internal.ActivitySequencer$2.flushTask(ActivitySequencer.java:590)
    at de.fu_berlin.inf.dpp.net.internal.ActivitySequencer$2.access$0(ActivitySequencer.java:543)
    at de.fu_berlin.inf.dpp.net.internal.ActivitySequencer$2$1.run(ActivitySequencer.java:538)
    at de.fu_berlin.inf.dpp.util.Utils$6.run(Utils.java:372)
    at de.fu_berlin.inf.dpp.util.Utils.runSafeSync(Utils.java:547)
    at de.fu_berlin.inf.dpp.net.internal.ActivitySequencer$2.run(ActivitySequencer.java:536)
    at java.util.TimerThread.mainLoop(Timer.java:534)
    at java.util.TimerThread.run(Timer.java:484)

When XMPPTransmitter.sendToProjectUser(XMPPTransmitter.java:725) calls String.getBytes() that's when the OutOfMemory error occurs.

Original comment by: kbeecher

@dpp-gerrit
Copy link
Author

Lowered to prio 4 as this is not likely. You are normally working on the existing project files and do not add a XXX MB whatever file to the project.

Original comment by: kargor

@dpp-gerrit
Copy link
Author

dpp-gerrit commented Mar 22, 2018

Might be connected to #38 (SF #785).

Original comment by: tobous

@srossbach
Copy link
Contributor

Duplicate of #38

@srossbach srossbach marked this as a duplicate of #38 Aug 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants