Description
Describe the bug
Getting a V panic when compiling the split-panel.v
in the branch repository of https://github.com/mike-ward/gui/tree/type-panic. Tried undoing my changes to get to the exact spot where it happened, but could not get it to not panic once it started.
Reproduction Steps
- clone https://github.com/mike-ward/gui/tree/type-panic
- cd gui/examples
- v run split-panel.v
Expected Behavior
Should not panic.
Current Behavior
V panic: new_type: idx must be between 1 & 65535
v hash: 171df75
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:19799: at _v_panic: Backtrace
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:40690: by v__ast__new_type
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:55084: by v__checker__Checker_resolve_var_fn
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:55372: by v__checker__Checker_ident
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:53922: by v__checker__Checker_expr
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:70692: by v__checker__Checker_struct_init
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:54383: by v__checker__Checker_expr
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:63415: by v__checker__Checker_method_call
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:61506: by v__checker__Checker_call_expr
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:53743: by v__checker__Checker_expr
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:52845: by v__checker__Checker_stmt
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:53497: by v__checker__Checker_stmts_ending_with_expression
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:53474: by v__checker__Checker_stmts
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:61294: by v__checker__Checker_fn_decl
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:52927: by v__checker__Checker_stmt
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:50816: by v__checker__Checker_check
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:50879: by v__checker__Checker_check_files
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:116112: by v__builder__Builder_middle_stages
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:116150: by v__builder__Builder_front_and_middle_stages
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:118750: by v__builder__cbuilder__gen_c
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:118722: by v__builder__cbuilder__build_c
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:118713: by v__builder__cbuilder__compile_c
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:118630: by v__builder__Builder_rebuild
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:117783: by v__builder__compile
v2.01JVM8S1T644M4X4XE4XTGQZAZ.tmp.c:119148: by main__rebuild
Possible Solution
Could not find one.
Additional Information/Context
Tried to remove a bunch of code, but could not find the spot in split-panel.v
where the panic occurred.
V version
V 0.4.10 171df75
Environment details (OS name and version, etc.)
V full version | V 0.4.10 da3112e.171df75 |
---|---|
OS | macos, macOS, 15.4.1, 24E263 |
Processor | 8 cpus, 64bit, little endian, Apple M2 |
Memory | 0.17GB/8GB |
V executable | /Users/mike/Documents/github/v/v |
V last modified time | 2025-05-19 12:37:27 |
V home dir | OK, value: /Users/mike/Documents/github/v |
VMODULES | OK, value: /Users/mike/.vmodules |
VTMP | OK, value: /tmp/v_501 |
Current working dir | OK, value: /Users/mike/Documents/github/gui/examples |
Git version | git version 2.49.0 |
V git status | weekly.2025.17-124-g171df75c |
.git/config present | true |
cc version | Apple clang version 17.0.0 (clang-1700.0.13.3) |
gcc version | Apple clang version 17.0.0 (clang-1700.0.13.3) |
clang version | Apple clang version 17.0.0 (clang-1700.0.13.3) |
tcc version | tcc version 0.9.28rc 2024-02-05 HEAD@105d70f7 (AArch64 Darwin) |
tcc git status | thirdparty-macos-arm64 c8df4e27 |
emcc version | N/A |
glibc version | N/A |
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.