Aransentin / ZWL

Zig Windowing Library
European Union Public License 1.2
99 stars 12 forks source link

Process not terminated when closing window #16

Open Gaulm opened 3 years ago

Gaulm commented 3 years ago

I'm on Linux, the platform initialized is X11 with software backend. I tried with a simple raytracer and with the example adapted to run on Zig 0.7.1 (changed std.crypto.random.bytes to try std.crypto.randomBytes), happens with Zig master too. When I close the window the process hangs forever and it never stops unless I kill it.

Sometimes (randomly, from what I noticed) an error is thrown saying:

The following command terminated unexpectedly:
cd /home/USERNAME/dev/zig/zRaytracer/lib/zwl && /home/USERNAME/dev/zig/zRaytracer/lib/zwl/zig-cache/o/4566a58efd046f154e6599f8ecffa89f/softlogo
error: the following build command failed with exit code 1:
/home/USERNAME/dev/zig/zRaytracer/lib/zwl/zig-cache/o/677baea8ee1fb01d9ec6e9759a19e8b2/build /home/USERNAME/zig-linux-x86_64/zig /home/USERNAME/dev/zig/zRaytracer/lib/zwl /home/USERNAME/dev/zig/zRaytracer/lib/zwl/zig-cache /home/USERNAME/.cache/zig run-softlogo

Additional perhaps related, if I don't kill the process the fans of my laptop start rotating at max speed

Hejsil commented 3 years ago

Also hitting this. Seems that waitForEvent is stuck in this loop because file.read always returns 0 once the window have been closed