vlang / v

Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
MIT License
35.76k stars 2.16k forks source link

autofree breaks (some) demo programs #22457

Open ufm opened 1 week ago

ufm commented 1 week ago

Describe the bug

Compiling (at least) 2048 and clock demo programms with -autofree causes errors in programs.

Reproduction Steps

v clock.v -autofree $ ./clock Press 'q' to quit. failed to load font "S0������{/truetype/dejavu/DejaVuSans.ttf" V panic: none v hash: e1480b6 /tmp/v_1000/clock.01J9QTNN72BNNND983FVCSW6P1.tmp.c:10843: at _v_panic: Backtrace /tmp/v_1000/clock.01J9QTNN72BNNND983FVCSW6P1.tmp.c:30893: by gggg_init_sokol_window /home/ufm/src/v/thirdparty/sokol/sokol_app.h:3046: by _sapp_call_init /home/ufm/src/v/thirdparty/sokol/sokol_app.h:3278: by _sapp_frame /home/ufm/src/v/thirdparty/sokol/sokol_app.h:11598: by _sapp_linux_run /home/ufm/src/v/thirdparty/sokol/sokol_app.h:11655: by sapp_run /tmp/v_1000/clock.01J9QTNN72BNNND983FVCSW6P1.tmp.c:29671: by sokolsapprun /tmp/v_1000/clock.01J9QTNN72BNNND983FVCSW6P1.tmp.c:31198: by ggContext_run /tmp/v_1000/clock.01J9QTNN72BNNND983FVCSW6P1.tmp.c:32301: by main__main /tmp/v_1000/clock.01J9QTNN72BNNND983FVCSW6P1.tmp.c:32713: by main

Expected Behavior

Start without panic.

Current Behavior

panic

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.4.8 e1480b6

Environment details (OS name and version, etc.)

V full version: V 0.4.8 184a863.e1480b6 OS: linux, Linux Mint 21.3 Processor: 20 cpus, 64bit, little endian, 12th Gen Intel(R) Core(TM) i7-12700KF

getwd: /home/ufm/src/v/examples/clock vexe: /home/ufm/src/v/v vexe mtime: 2024-10-09 04:54:54

vroot: OK, value: /home/ufm/src/v VMODULES: OK, value: /home/ufm/.vmodules VTMP: OK, value: /tmp/v_1000

Git version: git version 2.34.1 Git vroot status: 0.4.8-68-ge1480b61 .git/config present: true

CC version: cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 thirdparty/tcc status: thirdparty-linux-amd64 0134e9b9

[!NOTE] You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote. Other reactions and those to comments will not be taken into account.

JalonSolov commented 1 week ago

Not unexpected, as autofree is still a work in progress - use at your own risk. This is something that will need to be checked when it is further along.

medvednikov commented 1 week ago

The issue should be closed once those apps work with autofree.