Skip to content

encoding module gets unhandled exception crashing the program #26164

@quaesitor-scientiam

Description

@quaesitor-scientiam

Describe the bug

Reading large XML files

"S:\Business Projects\vPartsUnlimited\vPartsUnlimited.exe"
Unhandled Exception 0xfcd75fd3f0
 : _NLG_Return2               ?? : address = 0x7ffe50a809a7
 : builtin__vmemcpy           S:\repo\vlang2\vlib\builtin\cfns_wrapper.c.v:36
 : builtin__array_push_many   S:\repo\vlang2\vlib\builtin\array.v:795
 : strings__Builder_write_string  S:\repo\vlang2\vlib\strings\builder.c.v:138
 : encoding__xml__XMLDocument_pretty_str  S:\repo\vlang2\vlib\encoding\xml\encoding.v:141
 : encoding__xml__XMLDocument_str  S:\repo\vlang2\vlib\encoding\xml\encoding.v:174
SymFromAddr failure: 126 (see https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes)
Unhandled Exception 0xfcd75fd3f0
 : _NLG_Return2               ?? : address = 0x7ffe50a809a7
 : builtin__vmemcpy           S:\repo\vlang2\vlib\builtin\cfns_wrapper.c.v:36
 : builtin__array_push_many   S:\repo\vlang2\vlib\builtin\array.v:795
 : strings__Builder_write_string  S:\repo\vlang2\vlib\strings\builder.c.v:138
 : encoding__xml__XMLDocument_pretty_str  S:\repo\vlang2\vlib\encoding\xml\encoding.v:141
 : encoding__xml__XMLDocument_str  S:\repo\vlang2\vlib\encoding\xml\encoding.v:174
SymFromAddr failure: 126 (see https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes)
Unhandled Exception 0xfcd75fd3f0
 : _NLG_Return2               ?? : address = 0x7ffe50a809a7
 : builtin__vmemcpy           S:\repo\vlang2\vlib\builtin\cfns_wrapper.c.v:36
 : builtin__array_push_many   S:\repo\vlang2\vlib\builtin\array.v:795
 : strings__Builder_write_string  S:\repo\vlang2\vlib\strings\builder.c.v:138
 : encoding__xml__XMLDocument_pretty_str  S:\repo\vlang2\vlib\encoding\xml\encoding.v:141
 : encoding__xml__XMLDocument_str  S:\repo\vlang2\vlib\encoding\xml\encoding.v:174
SymFromAddr failure: 126 (see https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes)
Unhandled Exception 0xfcd75fd3f0
 : _NLG_Return2               ?? : address = 0x7ffe50a809a7
 : builtin__vmemcpy           S:\repo\vlang2\vlib\builtin\cfns_wrapper.c.v:36
 : builtin__array_push_many   S:\repo\vlang2\vlib\builtin\array.v:795
 : strings__Builder_write_string  S:\repo\vlang2\vlib\strings\builder.c.v:138
 : encoding__xml__XMLDocument_pretty_str  S:\repo\vlang2\vlib\encoding\xml\encoding.v:141
 : encoding__xml__XMLDocument_str  S:\repo\vlang2\vlib\encoding\xml\encoding.v:174
SymFromAddr failure: 126 (see https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes)
Unhandled Exception 0xfcd75fd3f0
 : _NLG_Return2               ?? : address = 0x7ffe50a809a7
 : builtin__vmemcpy           S:\repo\vlang2\vlib\builtin\cfns_wrapper.c.v:36
 : builtin__array_push_many   S:\repo\vlang2\vlib\builtin\array.v:795
 : strings__Builder_write_string  S:\repo\vlang2\vlib\strings\builder.c.v:138
 : encoding__xml__XMLDocument_pretty_str  S:\repo\vlang2\vlib\encoding\xml\encoding.v:141
 : encoding__xml__XMLDocument_str  S:\repo\vlang2\vlib\encoding\xml\encoding.v:174
SymFromAddr failure: 126 (see https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes)
Unhandled Exception 0xfcd75fd3f0
 : _NLG_Return2               ?? : address = 0x7ffe50a809a7
 : builtin__vmemcpy           S:\repo\vlang2\vlib\builtin\cfns_wrapper.c.v:36
 : builtin__array_push_many   S:\repo\vlang2\vlib\builtin\array.v:795
 : strings__Builder_write_string  S:\repo\vlang2\vlib\strings\builder.c.v:138
 : encoding__xml__XMLDocument_pretty_str  S:\repo\vlang2\vlib\encoding\xml\encoding.v:141
 : encoding__xml__XMLDocument_str  S:\repo\vlang2\vlib\encoding\xml\encoding.v:174
SymFromAddr failure: 126 (see https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes)
Unhandled Exception 0xfcd75fd3f0
 : _NLG_Return2               ?? : address = 0x7ffe50a809a7
 : builtin__vmemcpy           S:\repo\vlang2\vlib\builtin\cfns_wrapper.c.v:36
 : builtin__array_push_many   S:\repo\vlang2\vlib\builtin\array.v:795
 : strings__Builder_write_string  S:\repo\vlang2\vlib\strings\builder.c.v:138
 : encoding__xml__XMLDocument_pretty_str  S:\repo\vlang2\vlib\encoding\xml\encoding.v:141
 : encoding__xml__XMLDocument_str  S:\repo\vlang2\vlib\encoding\xml\encoding.v:174
SymFromAddr failure: 126 (see https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes)

Reproduction Steps

Read xml large xml files

Expected Behavior

No exception

Current Behavior

unhandled exceptions

Possible Solution

No idea

Additional Information/Context

No response

V version

V 0.4.12 ae95cb6

Environment details (OS name and version, etc.)

|V full version      |V 0.4.12 fe6162e94dcb8669f7512edd5d39da10a3cc6c5b.ae95cb6
|:-------------------|:-------------------
|OS                  |windows, Microsoft Windows 11 Pro 26200 64-bit
|Processor           |24 cpus, 64bit, little endian, AMD Ryzen 9 5900X 12-Core Processor
|Memory              |72.48GB/127.92GB
|                    |
|V executable        |S:\repo\vlang2\v.exe
|V last modified time|2025-12-27 01:31:15
|                    |
|V home dir          |OK, value: S:\repo\vlang2
|VMODULES            |OK, value: C:\Users\john3\.vmodules
|VTMP                |OK, value: S:\temp\v_0
|Current working dir |contains spaces, value: S:\Business Projects\vPartsUnlimited
|                    |
|env VFLAGS          |"-g"
|Git version         |git version 2.52.0.windows.1
|V git status        |weekly.2025.51-125-gae95cb6f
|.git/config present |true
|                    |
|cc version          |N/A
|gcc version         |gcc (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders, r8) 13.2.0
|clang version       |clang version 20.1.8
|msvc version        |Microsoft (R) C/C++ Optimizing Compiler Version 19.50.35720 for x64
|tcc version         |tcc version 0.9.27 (x86_64 Windows)
|tcc git status      |thirdparty-windows-amd64 b425ac82
|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.

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