The problem is actually caused by a bug with the webview component. If a webview is created within a coroutine it crashes the engine when the callback from webview.create() is invoked if the coroutine has finished. Now, you might not think that you did run the webview from within a coroutine but you actually did since the call to webview.create() was wrapped in a pcall which in turn was monkey patched using coxpcall.lua to work when you yield inside a pcall. Minimal example to reproduce crash:
local id = webview.create(function()
I've created a ticket DEF-2632 to fix this.
I have run tests on the modules provided by DefNet and come to the conclusion that the use of pcall in DefNet doesn't pose a problem and I have thus removed coxpcall. Please try again with DefNet 3.1 as a dependency (or the latest from master if you feel adventurous).