Hi Pierre,

You can avoid this exception if you cancel all pending requests before you close
the Snmp session.

I agree, that the Snmp.close() should do this for you. I will provide a fix
for it in version 2.2.3.

Best regards,
Frank

Am 11.10.2013 10:45, schrieb [email protected]:
Hi,

I'm using SNMP4J and I'm sometime getting an NPE in pduHandleAssigned :

java.lang.NullPointerException
at org.snmp4j.Snmp$PendingRequest.pduHandleAssigned(Snmp.java:1624)
at org.snmp4j.Snmp$PendingRequest.pduHandleAssigned(Snmp.java:1485)
at org.snmp4j.MessageDispatcherImpl.sendPdu(MessageDispatcherImpl.java:495)
at org.snmp4j.Snmp.sendMessage(Snmp.java:1005)
at org.snmp4j.Snmp$PendingRequest.run(Snmp.java:1666)
at java.util.Timer$TimerImpl.run(Timer.java:284)

Given that the line 1624 is :  "timer.schedule(this, delay);" , I assume the 
timer is null.

It might be that this happens when closing SNMP4J with an ongoing PendingRequest  (in 
close(),  line 509, timer is set to null) but I'm unfortunately not able to confirm this 
assumption : the problem only happens "on the field" and I never reproduce it 
in debug.

In can upgrade to 2.2.2, but I don't see any relevant difference in the 
(potentially offending) code.

Do you have any idea of what I could do investigate this issue ?


thanks a lot for the good work,

Pierre Rust




_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations 
confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce 
message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou 
falsifie. Merci.

This message and its attachments may contain confidential or privileged 
information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete 
this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been 
modified, changed or falsified.
Thank you.

_______________________________________________
SNMP4J mailing list
[email protected]
http://lists.agentpp.org/mailman/listinfo/snmp4j

--
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax:   +49 7024 8688231

_______________________________________________
SNMP4J mailing list
[email protected]
http://lists.agentpp.org/mailman/listinfo/snmp4j

Reply via email to