You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sep 17 11:08:19 raspberrypi java[537]: Exception in thread "Thread-1" java.lang.NullPointerException
sep 17 11:08:19 raspberrypi java[537]: at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
sep 17 11:08:19 raspberrypi java[537]: at java.util.regex.Matcher.reset(Matcher.java:309)
sep 17 11:08:19 raspberrypi java[537]: at java.util.regex.Matcher.<init>(Matcher.java:229)
sep 17 11:08:19 raspberrypi java[537]: at java.util.regex.Pattern.matcher(Pattern.java:1093)
sep 17 11:08:19 raspberrypi java[537]: at org.boncey.lcdjava.LCDSocketPoller.run(LCDSocketPoller.java:90)
sep 17 11:08:19 raspberrypi java[537]: [main] INFO org.boncey.lcdjava.LCD - Connected
Looking inside LCDSocketPoller, it's clear that access to _lastline is not concurrency correct. A different thread (inside LCD) can call getLastLine, setting it to null, while the LCDSocketPoller thread is reading _lastline inside the run() loop. This can cause it to be equal to null on line 90, even though there is a not-null-check on line 87.
Using org.boncey.lcdjava 0.5.0
The text was updated successfully, but these errors were encountered:
I've observed crashes like the following:
Looking inside LCDSocketPoller, it's clear that access to _lastline is not concurrency correct. A different thread (inside LCD) can call getLastLine, setting it to null, while the LCDSocketPoller thread is reading _lastline inside the run() loop. This can cause it to be equal to null on line 90, even though there is a not-null-check on line 87.
Using org.boncey.lcdjava 0.5.0
The text was updated successfully, but these errors were encountered: