Menu

#380 Crash: Adding a big file to shared project

None
closed-migrated
nobody
None
4
2018-03-27
2010-07-03
No

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)

Discussion

  • A. Haferburg

    A. Haferburg - 2010-07-03

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

     

    Last edit: tobous 2018-03-23
  • Karl Beecher

    Karl Beecher - 2011-07-05

    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.

     

    Last edit: tobous 2018-03-22
  • Stefan Rossbach

    Stefan Rossbach - 2012-11-15

    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.

     
  • tobous

    tobous - 2018-03-22

    Might be connected to #785.

     
  • tobous

    tobous - 2018-03-27
    • Status: open --> closed-migrated
     

Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.