You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Dieter Vrancken (JIRA)" <ji...@apache.org> on 2008/02/06 12:16:35 UTC
[jira] Created: (AMQ-1580) ArrayOutOfBoundsException in
ActiveMQInputStream
ArrayOutOfBoundsException in ActiveMQInputStream
------------------------------------------------
Key: AMQ-1580
URL: https://issues.apache.org/activemq/browse/AMQ-1580
Project: ActiveMQ
Issue Type: Bug
Affects Versions: 5.0.0
Environment: Ubuntu 7.10 / i686
Sun Java 1.6.0_03
Reporter: Dieter Vrancken
Priority: Critical
Attachments: Crash.java
When using JMS streaming, an ArrayOutOfBoundsException occurs in ActiveMQInputStream if the length of the streamed content is exactly a multiple of the chunk size sent by ActiveMQOutputStream (64KB at the moment).
The last message received by fillBuffer in such a case has a bodyLength of 0, so
buffer = new byte[0]; // line 225
pos = 0; // line 227
and in the next invocation of read()
return buffer[pos]; // line 180
fails with:
java.lang.ArrayIndexOutOfBoundsException: 0
at org.apache.activemq.ActiveMQInputStream.read(ActiveMQInputStream.java:180)
at Crash.main(Crash.java:54)
Attached is Crash.java which produces the exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (AMQ-1580) ArrayOutOfBoundsException in
ActiveMQInputStream
Posted by "Adrian Co (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQ-1580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adrian Co resolved AMQ-1580.
----------------------------
Assignee: Adrian Co
Fix Version/s: 5.1.0
Resolution: Fixed
Fix added in 628988.
Thanks for the test case! :)
> ArrayOutOfBoundsException in ActiveMQInputStream
> ------------------------------------------------
>
> Key: AMQ-1580
> URL: https://issues.apache.org/activemq/browse/AMQ-1580
> Project: ActiveMQ
> Issue Type: Bug
> Affects Versions: 5.0.0
> Environment: Ubuntu 7.10 / i686
> Sun Java 1.6.0_03
> Reporter: Dieter Vrancken
> Assignee: Adrian Co
> Priority: Critical
> Fix For: 5.1.0
>
> Attachments: Crash.java
>
>
> When using JMS streaming, an ArrayOutOfBoundsException occurs in ActiveMQInputStream if the length of the streamed content is exactly a multiple of the chunk size sent by ActiveMQOutputStream (64KB at the moment).
> The last message received by fillBuffer in such a case has a bodyLength of 0, so
> buffer = new byte[0]; // line 225
> pos = 0; // line 227
> and in the next invocation of read()
> return buffer[pos]; // line 180
> fails with:
> java.lang.ArrayIndexOutOfBoundsException: 0
> at org.apache.activemq.ActiveMQInputStream.read(ActiveMQInputStream.java:180)
> at Crash.main(Crash.java:54)
> Attached is Crash.java which produces the exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.