Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

termux: hot reload example segmentation fault #18135

Open
7underlines opened this issue May 8, 2023 · 5 comments
Open

termux: hot reload example segmentation fault #18135

7underlines opened this issue May 8, 2023 · 5 comments
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@7underlines
Copy link
Contributor

Describe the bug

Execution of the command v -live run examples/hot_reload/message.v prints segmentation fault.

Expected Behavior

The example works.

Current Behavior

v -live run examples/hot_reload/message.v
OK reloads:    0 | Total reloads:    0 | Hello! Modify this message while the program is running.
signal 11: segmentation fault

Reproduction Steps

v -live run examples/hot_reload/message.v

Possible Solution

I found that it works with the -cg parameter.

v -cg -live run examples/hot_reload/message.v
OK reloads:    1 | Total reloads:    1 | Hello! Modify this message while the program is running.
OK reloads:    1 | Total reloads:    1 | Hello! Modify this message while the program is running.
OK2 reloads:    2 | Total reloads:    2 | Hello! Modify this message while the program is running.
OK2 reloads:    2 | Total reloads:    2 | Hello! Modify this message while the program is running.
OK reloads:    3 | Total reloads:    3 | Hello! Modify this message while the program is running.

Additional Information/Context

No response

V version

V 0.3.4 5454562.b50dac5

Environment details (OS name and version, etc.)

V full version: V 0.3.4 5454562.b50dac5
OS: termux, 4.14.190-perf , #1 SMP PREEMPT Fri Mar 24 23:36:11 CST 2023
Processor: 8 cpus, 64bit, little endian

getwd: /data/data/com.termux/files/home/v
vexe: /data/data/com.termux/files/home/v/v
vexe mtime: 2023-05-07 19:39:38

vroot: OK, value: /data/data/com.termux/files/home/v
VMODULES: OK, value: /data/data/com.termux/files/home/.vmodules
VTMP: OK, value: /data/data/com.termux/files/usr/tmp/v_10214

Git version: git version 2.40.1
Git vroot status: weekly.2022.47-899-gb50dac5e (1 commit(s) behind V master)
.git/config present: true

CC version: clang version 16.0.2
thirdparty/tcc status: thirdparty-unknown-unknown de82a13

@7underlines 7underlines added the Bug This tag is applied to issues which reports bugs. label May 8, 2023
@andorxornot
Copy link

It's been two years and hot reboot still doesn't work on windows

@7underlines
Copy link
Contributor Author

@andorxornot I'm sorry to hear this because I think hot reload is one of V's best features.
Have you tried the -cg parameter? Because with this workaround it works under Termux.

@andorxornot
Copy link

@thomaspeissl just tested on the latest master, the problem remains, with or without cg parameter v output:

C:/Users/User/AppData/Local/Temp/v_0/message.17609892509590806748.tmp.c:8368: at print_backtrace_skipping_top_frames_tcc: Backtrace
C:/Users/User/AppData/Local/Temp/v_0/message.17609892509590806748.tmp.c:8335: by print_backtrace_skipping_top_frames
C:/Users/User/AppData/Local/Temp/v_0/message.17609892509590806748.tmp.c:9145: by unhandled_exception_handler
7ffcffdc8b1c : by ???
RUNTIME ERROR: invalid memory access```

@andorxornot
Copy link

andorxornot commented Nov 30, 2023

could you also check the graphical examples of hot-reload?
for example v -live run examples/hot_reload/bounce.v

@7underlines
Copy link
Contributor Author

@andorxornot I recommend you create a separate issue for Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

No branches or pull requests

2 participants