This is a concurrency issue that may occur when switching network or shutting down your peer.
A way to reproduce the error for sure :
- run YaCy in debug mode from your favourite IDE
- set a breakpoint in net.yacy.peers.Dispatcher at line 281 (https://github.com/yacy/yacy_search_server/blob/Release_1.90/source/net/yacy/peers/Dispatcher.java#L281 [^])
- wait for a Thread (dhtTransferJob) to stop at the breakpoint
- while the thread is blocked, launch switch network or shutdown YaCy from the web UI : this will execute Dispatcher.close() method and will set transmissionBuffer to null
- Resume execution from the blocked Thread : you should see the NullPointerException stack trace in your console and logs