Yuescript icon indicating copy to clipboard operation
Yuescript copied to clipboard

YueScript tool with no options crashed

Open m3makefile opened this issue 8 months ago • 4 comments

yue test.yue

Report by Dr. Mingw:

yue.exe caused an Access Violation at location 00007FF883ED3008 in module MSVCP140.dll Reading from location 0000000000000000.

AddrPC           Params
00007FF883ED3008 0000000000000000 0000000000000000 00000048F60B86C8  MSVCP140.dll!mtx_do_lock+0x9c  [D:\a\_work\1\s\src\vctools\crt\github\stl\src\mutex.cpp @ 100]
00007FF6796F96F7 07FFFFFFFFFFFFFF 00000048F60B8640 00000048F60AD6B0  yue.exe!0x396f7
00007FF6796F9DBD 00000048F60B8640 00000048F60B86C8 00000048F60AE030  yue.exe!0x39dbd
00007FF679715669 00000048F601F880 00000048F60ADE20 00000048F60B8300  yue.exe!0x55669
00007FF6797082D3 00000048F60AE2A0 0000000000000000 00007FF6787FF000  yue.exe!0x482d3
00007FF6797F2278 00007FF6797F22E8 00007FF6787FF000 0000000000000000  yue.exe!0x132278
00007FF889AC13D2 00007FF889AC13B0 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk+0x22
00007FF88A2E03C4 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart+0x34


I know that I should use yue -e test.yue. But I don't expect YueScript tool with no options to crash this way.

m3makefile avatar Mar 09 '25 11:03 m3makefile

Thank you for reporting this issue. I haven't specifically tested YueScript with MinGW, but the MSVC builds seem to work correctly with the provided sample codes. Additionally, the command yue test.yue is indeed valid and should generate a Lua file instead of causing a crash. Could you try using the MSVC version instead? You can download the prebuilt binaries from the GitHub Releases section, which are built using GitHub Actions. Let me know if the issue persists with the MSVC version!

pigpigyyy avatar Mar 10 '25 02:03 pigpigyyy

I always use the prebuilt binary provided by you (and it's MSVC as you said). Dr. Mingw is a debugging tool I installed on my PC. Despite its name it will also work with MSVC compiled binary.

https://github.com/jrfonseca/drmingw

(I decided to use it because it gives more information than the built-in debugging tool of Windows, and it's very lightweight as I don't want to install the full Visual Studio to debug a program nor I have the expertise to do so. I think Dr. Mingw's output is enough for bug report).

m3makefile avatar Mar 10 '25 05:03 m3makefile

Can you provide the code in the test.yue file? I still can not reproduce this crash on my machine. Have you installed the vcredist_x64 patch as the MSVC runtime for yue.exe to run?

pigpigyyy avatar Mar 10 '25 09:03 pigpigyyy

The code in #190.

m3makefile avatar Mar 10 '25 09:03 m3makefile