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

Multithreaded Synchronization Crash #2

Open
jonruiz opened this issue Feb 14, 2013 · 0 comments
Open

Multithreaded Synchronization Crash #2

jonruiz opened this issue Feb 14, 2013 · 0 comments

Comments

@jonruiz
Copy link

jonruiz commented Feb 14, 2013

I posted this in the forum, then realized I should open an issue:

I've been seeing the following crash in the field with the CyberLink for Java code:

java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
at java.util.Vector.arrayIndexOutOfBoundsException(Vector.java:907)
at java.util.Vector.elementAt(Vector.java:328)
at java.util.Vector.get(Vector.java:442)
at org.cybergarage.xml.NodeList.getNode(GraceRemote:28)
at org.cybergarage.upnp.ControlPoint.getDeviceList(GraceRemote:313)
at org.cybergarage.upnp.ControlPoint.renewSubscriberService$1349ef(GraceRemote:860)
at org.cybergarage.upnp.ControlPoint.renewSubscriberService(GraceRemote:871)
at org.cybergarage.upnp.control.RenewSubscriber.run(GraceRemote:69)
at java.lang.Thread.run(Thread.java:856)

This is occurring on the renewsubscriber thread. There's another thread for removing expired devices. The renew iterates through the devNodeList, the remove deletes entries from the devNodeList and there's no synchronization between the two. Has anyone else seen this problem? Is it as simple as synchronizing the getDevice() and removeDevice() calls? I'm only seeing this in anonymous crash reports, and it's not common, so reproducing and testing isn't an option.

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

1 participant