Hi Chris,

just wanted to be sure that its really bug and not me "holding it wrong".

I'm about to prepare a patch (already teaches me something about netty).


Best

Julian

________________________________
Von: Christofer Dutz <christofer.d...@c-ware.de>
Gesendet: Mittwoch, 1. August 2018 17:18:22
An: dev@plc4x.apache.org
Betreff: Re: Exception on closing S7PlcConnection

Hi Julian,



I guess this is a simple timing issue and we shouldn't worry about it. Of 
course, throwing NPEs is a no-no and we should handle that.



Having a more detailed look at the problem. I bet it's related to "channel" 
being reset in the AbstractPlcConnection.close method.

We should investigate, if setting this to null is the right way to do it.



If you have the time to investigate this, this would be super awesome.



I hope I'll be able to push a larger commit today as I am adding a new security 
tool to the build and this is reporting some things I have to fix first.



Chris









Am 01.08.18, 17:07 schrieb "Julian Feinauer" <j.feina...@pragmaticminds.de>:



    Hi all,



    I finally organized an S7 to play around a bit more with Plc4J and observed 
the following exception that is always thrown when calling close on the 
S7PlcConnection:



    17:04:54.438 [nioEventLoopGroup-2-1] WARN  
i.n.util.concurrent.DefaultPromise - An exception was thrown by 
org.apache.plc4x.java.s7.connection.S7PlcConnection$$Lambda$8/1293618474.operationComplete()

    java.lang.NullPointerException: null

                at 
org.apache.plc4x.java.s7.connection.S7PlcConnection.lambda$close$5(S7PlcConnection.java:188)

                at 
io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:511)

                at 
io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:485)

                at 
io.netty.util.concurrent.DefaultPromise.access$000(DefaultPromise.java:33)

                at 
io.netty.util.concurrent.DefaultPromise$1.run(DefaultPromise.java:435)

                at 
io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)

                at 
io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)

                at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)

                at 
io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)

                at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)

                at java.lang.Thread.run(Thread.java:745)



    Is this due to some problems on my side or my S7 or is this a hint to a bug?



    Best

    Julian




Reply via email to