Avatar
Please consider registering
guest
sp_LogInOut Log Insp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSSsp_TopicIcon
TcpConnection/Read: Uncaught ava.lang.NullPointerException
May 7, 2025
17:53, EEST
Avatar
Manfred Hausmann
Member
Members
Forum Posts: 19
Member Since:
September 21, 2018
sp_UserOfflineSmall Offline

Hi,
in our application we offer the possibility to scan the local network for available OPC servers.
While scanning we’ve caught the following exception:
null thread: TcpConnection/Read
java.lang.NullPointerException
at com.prosysopc.ua.stack.utils.TimerUtil.schedule(SourceFile:112)
at com.prosysopc.ua.stack.transport.tcp.io.SecureChannelTcp.d(SourceFile:1304)
at com.prosysopc.ua.stack.transport.tcp.io.SecureChannelTcp.onClosed(SourceFile:674)
at com.prosysopc.ua.stack.transport.tcp.io.TcpConnection.a(SourceFile:1835)
at com.prosysopc.ua.stack.transport.tcp.io.TcpConnection.a(SourceFile:139)
at com.prosysopc.ua.stack.transport.tcp.io.TcpConnection$b.run(SourceFile:855)

The follwing is logged by prosys:
com.prosysopc.ua.stack.utils.StackUtils: Uncaught Exception in Thread: Thread[OPC-UA-Stack-Blocking-Work-Executor-54,6,main] java.lang.NullPointerException

When closing the Tcp connection, a problem seems to occur at another protocol level (SecureConnection). It seems that an attempt is made to start a TimerTask on a non-existent timer.

Questions
– Is this a known problem?
– Why is neither an UncaughtExceptionHandler installed nor are all RuntimeExceptions and Errors caught in the TcpConnection.ReadThread?
– Is there a workaround?

Best regards,
Manfred

May 8, 2025
11:48, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1045
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

We are aware of a cosmetic-only-NPE scenario due to a potential race-condition when the connection closes. This could be the same as https://forum.prosysopc.com/fo…..mx-is-null or the root cause could be the same.

Did your case result in something else than a cosmetic problem?

Forum Timezone: Europe/Helsinki
Most Users Ever Online: 1919
Currently Online:
Guest(s) 14
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 90
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 733
Moderators: 8
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1545
Posts: 6516
Newest Members:
ptdenriqueta, basilpullman, Richardmip, mood edibles, LouieWreve, daniellabdx, janessan21, sammiebeak359, gena7127517, thorstenbouldin
Moderators: Jouni Aro: 1029, Pyry: 1, Petri: 1, Bjarne Boström: 1045, Jimmy Ni: 26, Matti Siponen: 353, Lusetti: 0, Elias: 0
Administrators: admin: 1