FYI: I got this the other day running the 2004-02-15
build of the 1.4.0-BETA1 Notification Service:
[Pool thread #1] [ERROR] (orb.ldr#747212): Handle
runtime exception
java.lang.ArrayIndexOutOfBoundsException
at
org.openorb.notify.impl.EventChannelImpl.reportConsumer
AdminDestruction(EventChannelImpl.java:933)
at org.openorb.notify.impl.ConsumerAdminImpl.destroy
(ConsumerAdminImpl.java:847)
at
org.omg.CosNotifyChannelAdmin._ConsumerAdminStub.de
stroy(_ConsumerAdminStub.java:680)
at org.openorb.notify.impl.EventChannelImpl.destroy
(EventChannelImpl.java:715)
at
org.omg.CosNotifyChannelAdmin.EventChannelPOA._invok
e_destroy(EventChannelPOA.java:389)
at
org.omg.CosNotifyChannelAdmin.EventChannelPOA.access
00(EventChannelPOA.java:43)
at
org.omg.CosNotifyChannelAdmin.EventChannelPOA$Opera
tion_destroy.invoke(EventChannelPOA.java:580)
at
org.omg.CosNotifyChannelAdmin.EventChannelPOA._invok
e(EventChannelPOA.java:121)
at org.openorb.orb.adapter.poa.POA.dispatch
(POA.java:1470)
at org.openorb.orb.net.AbstractServerRequest.dispatch
(AbstractServerRequest.java:894)
at
org.openorb.orb.net.ServerManagerImpl.serve_request
(ServerManagerImpl.java:1617)
at
org.openorb.orb.net.ServerManagerImpl.thread_pool_main
(ServerManagerImpl.java:1542)
at
org.openorb.orb.net.ServerManagerImpl.access00
(ServerManagerImpl.java:48)
at
org.openorb.orb.net.ServerManagerImpl$PoolThread.run
(ServerManagerImpl.java:2905)
===================================
In examining the implementation of
org.openorb.notify.impl.EventChannelImpl.reportConsumer
AdminDestruction(), it looks like there will be a problem
on the line:
new_consumers[ j++ ] = consumers[ i ]; // around
line 933 in the 2004-02-15 build
if 'adminPid' is not found in the array of 'consumers'
(since 'new_consumers' is sized one smaller
than 'consumers').
I'm not sure what conditions have to occur for a
consumer admin to disappear out from under the list like
that, however...
EventChannelImpl.destroy-NullPointerException
Logged In: YES
user_id=842329
03/08/04 - Updated to attach a similar (and I think related)
problem where the EventChannelImpl gets a
NullPointerException in the destroy() when the admins have
been null'ed out underneath him.
Logged In: YES
user_id=21814
I don't want to mess with the NotificationService. I
assigned this bug to Lars, hoping that he has time to fix
this for the 1.4.0 FINAL.
Logged In: YES
user_id=21814
I don't want to mess with the NotificationService. I
assigned this bug to Lars, hoping that he has time to fix
this for the 1.4.0 FINAL.
Logged In: YES
user_id=401384
I was unable to reproduce the problem, but I have made the
implementation of reportConsumerAdminDestruction() more
robust. It now uses a list to collect the new consumers and
converts it to an array (and it also avoids creating String
objects for byte[] comparison).
As you say, it looks like something can confuse the internal
state and pass an invalid id, so my changes fix only the
symptoms and not the actual cause for the problem. Not sure
whether we should close this bug report... The NPE in the
attachment is not fixed.