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

Hot reload failure when use time.now() in it #19456

Open
Air-EL opened this issue Sep 27, 2023 · 2 comments
Open

Hot reload failure when use time.now() in it #19456

Air-EL opened this issue Sep 27, 2023 · 2 comments
Labels
Bug This tag is applied to issues which reports bugs. OS: Windows Bugs/feature requests, that are specific to Windows OS.

Comments

@Air-EL
Copy link

Air-EL commented Sep 27, 2023

Describe the bug

When use println('Time: ${time.now()}') in hot reload function, error will be caused.
But if just don't output time string, there is not error.

Reproduction Steps

src code

module main

import time

[live]
fn print_message() {
	println('Hello! Modify this message while the program is running. 1')
}

[live]
fn print_message2() {
	t := time.now()
	println('Time: ${t}')
	println('Hello! Modify this message while the program is running. 2')
}

fn main() {
	for {
		print_message()
		print_message2()
		time.sleep(500 * time.millisecond)
	}
}

execute cmd
v -live run main.v

Expected Behavior

Hello! Modify this message while the program is running. 1
Time: [time]
Hello! Modify this message while the program is running. 2

Current Behavior

output

Hello! Modify this message while the program is running. 1
Unhandled Exception 0xC0000005
print_backtrace_skipping_top_frames is not implemented
signal 11: segmentation fault
print_backtrace_skipping_top_frames is not implemented

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.4.1 981f76c

Environment details (OS name and version, etc.)

V full version: V 0.4.1 981f76c
OS: windows, Microsoft Windows 10 רҵ v19043 64 λ
Processor: 16 cpus, 64bit, little endian,

vexe mtime: 2023-09-27 15:26:57

Git version: git version 2.39.2.windows.1
Git vroot status: weekly.2023.39-5-g981f76cd-dirty

Note

You can vote for this issue using the 👍 reaction. More votes increase the issue's priority for developers.

Take into account that only the 👍 reaction counts as a vote.
Only reactions to the issue itself will be counted as votes, not comments.

@Air-EL Air-EL added the Bug This tag is applied to issues which reports bugs. label Sep 27, 2023
@ArtemkaKun ArtemkaKun added Unit: Compiler Bugs/feature requests, that are related to the V compiler in general. Unit: cgen Bugs/feature requests, that are related to the default C generating backend. labels Sep 27, 2023
@spytheman
Copy link
Member

I can not reproduce it on linux and macos.

@spytheman spytheman added OS: Windows Bugs/feature requests, that are specific to Windows OS. and removed Unit: cgen Bugs/feature requests, that are related to the default C generating backend. Unit: Compiler Bugs/feature requests, that are related to the V compiler in general. labels Oct 19, 2023
@xenoken
Copy link
Contributor

xenoken commented May 7, 2024

I can't reproduce the issue on Windows either. ( tested on V 0.4.5 a924737 )

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. OS: Windows Bugs/feature requests, that are specific to Windows OS.
Projects
None yet
Development

No branches or pull requests

4 participants