Closed oeb25 closed 1 year ago
Thanks a lot for this very detailed and reproducible bug report! While I've just created a PR fixing this issue, you can use the following command as a workaround with your current ViperServer JAR:
curl --location --request POST "http://localhost:56644/verify" \
--header 'Content-Type: application/json' \
--data-raw "{\"arg\": \"silicon --disableCaching $TINY_FILE\"}"
This is great thanks! Just checked with the latest master, and it no longer produces an exception!
Thank you :)
When using the HTTP server I get
java.lang.NullPointerException: Cannot invoke "scala.Option.foreach(scala.Function1)" because the return value of "viper.server.core.ViperCache$._cacheFile()" is null
as the last event after calling/verify/0
using the Silicon backend.I tried to look into it and the
ViperCache.initialize
does not seem to be called at any point in the execution. It seems this should have been called byViperCoreServer.start
which maybe should have been called byViperHttpServer.start
. I've verified thatViperHttpServer.start
is called, and it callssuper.start
so I would have thought that this calledViperCoreServer.start
since it extends from it? I don't know Scala so this might all be incorrect :)Minimal reproduction
The following bash script triggers the issue. It assumes
z3
is in thePATH
andVIPERSERVER
should probably be changed to point to the correct JAR.The verification succeeds as expected:
But the final message returned is the
NullPointerException
:The issue is still there with
--cacheFile
set on the call toviperserver.jar
.