Skip to content

println(struct) prints "Unhandled Exception 0xC00000FD" #19178

@islonely

Description

@islonely

Describe the bug

Try to print a line and get the exception and the line does not get printed.

Expected Behavior

Expected to print circular struct

Current Behavior

Unhandles an exception? (0xC00000FD) In my 5000 line project, the exception is sometimes followed by a stack overflow. But I can't figure out how to replicate that in few lines.

Reproduction Steps

interface Person {
	name   string
	age    u64
}

struct Me {
mut:
	brothers []&Person
	name string
	age u64
}

struct MyBrother {
mut:
	brothers []&Person
	name string
	age u64
}

fn main() {
	mut me := &Me{name: 'Foo', age: 33}
	mut my_brother := &MyBrother{name: 'Bar', age: 32}
	me.brothers << my_brother
	my_brother.brothers << me
	println(me)
}

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.4.0 76b4c92.aef83ba

Environment details (OS name and version, etc.)

V full version: V 0.4.0 76b4c92.aef83ba
OS: windows, Microsoft Windows 11 Pro v22621 64-bit
Processor: 16 cpus, 64bit, little endian,

getwd: C:\Users\imado\Documents\cyberian_tiger
vexe: C:\Users\imado\v\v.exe
vexe mtime: 2023-08-18 21:06:54

vroot: OK, value: C:\Users\imado\v
VMODULES: OK, value: C:\Users\imado\.vmodules
VTMP: OK, value: C:\Users\imado\AppData\Local\Temp\v_0

Git version: git version 2.33.1.windows.1
Git vroot status: weekly.2023.33-13-gaef83bae
.git/config present: true

CC version: Error: 'cc' is not recognized as an internal or external command,
operable program or batch file.

thirdparty/tcc status: thirdparty-windows-amd64 e90c2620

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugThis tag is applied to issues which reports bugs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions