java.lang.StackOverflowError

QuickFIX/J JIRA | JamesM | 8 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    This issue is probably related to QFJ-379: http://www.quickfixj.org/jira/browse/QFJ-379 We noticed that a stack overflow can occur when QuickFIX is processing a very large number of queued messages. From the event log file (edited to make the situation clearer): MsgSeqNum too high, expecting 1430 but received 4937 MsgSeqNum too high, expecting 1430 but received 4938 Received SequenceReset FROM: 1430 TO: 1939 [...] Processing queued message: 4030, pending: [1432, 1433, 1434, ..., 1939, 4031, 4032, ..., 4937, 4938] null java.lang.StackOverflowError at java.nio.Buffer.<init>(Buffer.java:176) at java.nio.ByteBuffer.<init>(ByteBuffer.java:259) at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:52) at java.nio.ByteBuffer.wrap(ByteBuffer.java:350) at java.nio.ByteBuffer.wrap(ByteBuffer.java:373) at java.lang.StringCoding$CharsetSE.encode(StringCoding.java:339) at java.lang.StringCoding.encode(StringCoding.java:378) at java.lang.String.getBytes(String.java:812) [... application code ...] at XXX.YYY.ZZZ.QF_FIXConnectionImpl.fromApp(QF_FIXConnectionImpl.java:219) at quickfix.Session.fromCallback(Session.java:1314) at quickfix.Session.verify(Session.java:1272) at quickfix.Session.verify(Session.java:1343) at quickfix.Session.next(Session.java:742) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) [....] at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) Is anyone able to offer any suggestions? I think the next/nextQueued functions may be excessively recursive, which will cause a stack overflow error if the queue of messages to be processed is extremely large. I also tried with a thread stack size of 128K, 256K, 512K (-Xss VM option) but see the same problem.

    QuickFIX/J JIRA | 8 years ago | JamesM
    java.lang.StackOverflowError
  2. 0

    This issue is probably related to QFJ-379: http://www.quickfixj.org/jira/browse/QFJ-379 We noticed that a stack overflow can occur when QuickFIX is processing a very large number of queued messages. From the event log file (edited to make the situation clearer): MsgSeqNum too high, expecting 1430 but received 4937 MsgSeqNum too high, expecting 1430 but received 4938 Received SequenceReset FROM: 1430 TO: 1939 [...] Processing queued message: 4030, pending: [1432, 1433, 1434, ..., 1939, 4031, 4032, ..., 4937, 4938] null java.lang.StackOverflowError at java.nio.Buffer.<init>(Buffer.java:176) at java.nio.ByteBuffer.<init>(ByteBuffer.java:259) at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:52) at java.nio.ByteBuffer.wrap(ByteBuffer.java:350) at java.nio.ByteBuffer.wrap(ByteBuffer.java:373) at java.lang.StringCoding$CharsetSE.encode(StringCoding.java:339) at java.lang.StringCoding.encode(StringCoding.java:378) at java.lang.String.getBytes(String.java:812) [... application code ...] at XXX.YYY.ZZZ.QF_FIXConnectionImpl.fromApp(QF_FIXConnectionImpl.java:219) at quickfix.Session.fromCallback(Session.java:1314) at quickfix.Session.verify(Session.java:1272) at quickfix.Session.verify(Session.java:1343) at quickfix.Session.next(Session.java:742) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) at quickfix.Session.next(Session.java:1599) at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) at quickfix.Session.next(Session.java:796) [....] at quickfix.Session.nextQueued(Session.java:1589) at quickfix.Session.nextQueued(Session.java:1570) Is anyone able to offer any suggestions? I think the next/nextQueued functions may be excessively recursive, which will cause a stack overflow error if the queue of messages to be processed is extremely large. I also tried with a thread stack size of 128K, 256K, 512K (-Xss VM option) but see the same problem.

    QuickFIX/J JIRA | 8 years ago | JamesM
    java.lang.StackOverflowError
  3. 0

    QuickFIX/J Jira

    quickfixj.org | 9 months ago
    java.lang.StackOverflowError
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    QuickFIX/J Jira

    quickfixj.org | 7 months ago
    java.lang.StackOverflowError
  6. 0

    GitHub comment 804#144745230

    GitHub | 1 year ago | jediwhale
    java.lang.StackOverflowError

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.StackOverflowError

      No message provided

      at java.nio.Buffer.<init>()
    2. Java RT
      String.getBytes
      1. java.nio.Buffer.<init>(Buffer.java:176)
      2. java.nio.ByteBuffer.<init>(ByteBuffer.java:259)
      3. java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:52)
      4. java.nio.ByteBuffer.wrap(ByteBuffer.java:350)
      5. java.nio.ByteBuffer.wrap(ByteBuffer.java:373)
      6. java.lang.StringCoding$CharsetSE.encode(StringCoding.java:339)
      7. java.lang.StringCoding.encode(StringCoding.java:378)
      8. java.lang.String.getBytes(String.java:812)[... application code ...]
      8 frames
    3. XXX.YYY.ZZZ
      QF_FIXConnectionImpl.fromApp
      1. XXX.YYY.ZZZ.QF_FIXConnectionImpl.fromApp(QF_FIXConnectionImpl.java:219)
      1 frame
    4. Apache ServiceMix :: Bundles :: ${pkgArtifactId}
      Session.next
      1. quickfix.Session.fromCallback(Session.java:1314)
      2. quickfix.Session.verify(Session.java:1272)
      3. quickfix.Session.verify(Session.java:1343)
      4. quickfix.Session.next(Session.java:742)
      5. quickfix.Session.next(Session.java:1599)
      6. quickfix.Session.nextQueued(Session.java:1589)
      7. quickfix.Session.nextQueued(Session.java:1570)
      8. quickfix.Session.next(Session.java:796)
      9. quickfix.Session.next(Session.java:1599)
      10. quickfix.Session.nextQueued(Session.java:1589)
      11. quickfix.Session.nextQueued(Session.java:1570)
      12. quickfix.Session.next(Session.java:796)
      13. quickfix.Session.next(Session.java:1599)
      14. quickfix.Session.nextQueued(Session.java:1589)
      15. quickfix.Session.nextQueued(Session.java:1570)
      16. quickfix.Session.next(Session.java:796)
      17. quickfix.Session.next(Session.java:1599)
      18. quickfix.Session.nextQueued(Session.java:1589)
      19. quickfix.Session.nextQueued(Session.java:1570)
      20. quickfix.Session.next(Session.java:796)
      21. quickfix.Session.next(Session.java:1599)
      22. quickfix.Session.nextQueued(Session.java:1589)
      23. quickfix.Session.nextQueued(Session.java:1570)
      24. quickfix.Session.next(Session.java:796)
      24 frames