digitalmars.D.learn - ldc2 failed with exit code -1073741819.
- Anonymouse (18/18) Jan 18 2022 I did a big sweep through my project and changed all `writefln`s
- H. S. Teoh (8/16) Jan 18 2022 [...]
- Anonymouse (20/25) Jan 18 2022 Yes, but the only thing I have to go on is dub reporting
- H. S. Teoh (7/24) Jan 18 2022 [...]
- Anonymouse (2/7) Jan 18 2022 It exits with 5. I could look for that, certainly.
- H. S. Teoh (6/13) Jan 18 2022 Yeah, that's probably the more reliable way to reduce this case.
- russhy (3/3) Jan 18 2022 Compiling the project without: version "Colours" works
- kinke (11/14) Jan 18 2022 [-1073741819 == 0xc0000005 => access violation]
I did a big sweep through my project and changed all `writefln`s and `format`s and the such to take their format patterns as compile-time parameters, and now ldc can no longer build it on Windows. It works on linux, and dmd has no problems with it. There is no error message beyond "failed with exit code -1073741819", which is not unique enough to be able to dustmite on. (It reduced it to a practically empty set with a different error.) Manually running the command listed by `dub build -v` fails with no output at all and simply returns a shell exit code of 5. ``` git clone https://github.com/zorael/kameloso.git -b ctpatterns cd kameloso dub build --compiler=ldc2 ``` What can I *reasonably* do here? Do I *have* to compile LDC from source, to get debug symbols? How else can I reduce it when it doesn't say what goes wrong?
Jan 18 2022
On Tue, Jan 18, 2022 at 04:25:45PM +0000, Anonymouse via Digitalmars-d-learn wrote:I did a big sweep through my project and changed all `writefln`s and `format`s and the such to take their format patterns as compile-time parameters, and now ldc can no longer build it on Windows. It works on linux, and dmd has no problems with it. There is no error message beyond "failed with exit code -1073741819", which is not unique enough to be able to dustmite on. (It reduced it to a practically empty set with a different error.)[...] What's the dustmite command you used? In such cases, it's useful to check for this specific error message in your dustmite command, so that it doesn't reduce it past the actual problem case. T -- An elephant: A mouse built to government specifications. -- Robert Heinlein
Jan 18 2022
On Tuesday, 18 January 2022 at 16:43:52 UTC, H. S. Teoh wrote:What's the dustmite command you used? In such cases, it's useful to check for this specific error message in your dustmite command, so that it doesn't reduce it past the actual problem case. TYes, but the only thing I have to go on is dub reporting `-1073741819`, so I just made a script that grepped for that. ``` dub.exe build --compiler=ldc2 2>&1 | grep "ldc2 failed with exit code -1073741819" ``` It was not unique enough an error and I ended up with some empty files that didn't import each other correctly. ``` source\kameloso\plugins\twitchbot\keygen.d(1,8): Error: module `kameloso.plugins.twitchbot` from file source\kameloso\plugins\twitchbot\base.d must be imported with 'import kameloso.plugins.twitchbot;' [...] ldc2 failed with exit code -1073741819. ``` Bypassing dub and calling the raw ldc command gives no output. What else can I do?
Jan 18 2022
On Tue, Jan 18, 2022 at 05:20:04PM +0000, Anonymouse via Digitalmars-d-learn wrote:On Tuesday, 18 January 2022 at 16:43:52 UTC, H. S. Teoh wrote:[...]What's the dustmite command you used? In such cases, it's useful to check for this specific error message in your dustmite command, so that it doesn't reduce it past the actual problem case.Yes, but the only thing I have to go on is dub reporting `-1073741819`, so I just made a script that grepped for that. ``` dub.exe build --compiler=ldc2 2>&1 | grep "ldc2 failed with exit code -1073741819" ``` It was not unique enough an error and I ended up with some empty files that didn't import each other correctly.[...]Bypassing dub and calling the raw ldc command gives no output. What else can I do?What does `echo $?` print immediately after you run the raw ldc command? T -- INTEL = Only half of "intelligence".
Jan 18 2022
On Tuesday, 18 January 2022 at 17:37:27 UTC, H. S. Teoh wrote:It exits with 5. I could look for that, certainly.Bypassing dub and calling the raw ldc command gives no output. What else can I do?What does `echo $?` print immediately after you run the raw ldc command? T
Jan 18 2022
On Tue, Jan 18, 2022 at 05:41:34PM +0000, Anonymouse via Digitalmars-d-learn wrote:On Tuesday, 18 January 2022 at 17:37:27 UTC, H. S. Teoh wrote:[...]Bypassing dub and calling the raw ldc command gives no output. What else can I do?What does `echo $?` print immediately after you run the raw ldc command?It exits with 5. I could look for that, certainly.Yeah, that's probably the more reliable way to reduce this case. T -- Help a man when he is in trouble and he will remember you when he is in trouble again.
Jan 18 2022
Compiling the project without: version "Colours" works So the problem lies here in this struct: https://github.com/zorael/kameloso/blob/9ccff29ead6ca2e80e2db0f06085c751326ed578/source/kameloso/constants.d#L320
Jan 18 2022
On Tuesday, 18 January 2022 at 16:25:45 UTC, Anonymouse wrote:What can I *reasonably* do here? Do I *have* to compile LDC from source, to get debug symbols? How else can I reduce it when it doesn't say what goes wrong?[-1073741819 == 0xc0000005 => access violation] Some options: 1. This might be 'caught' by an existing assertion. You can use a CI build (https://github.com/ldc-developers/ldc/releases/tag/CI) with enabled assertions to check. 2. In case the segfault does NOT happen in the frontend, enabling verbose codegen via `-vv` can be of great help to see what the glue layer was doing right before the crash (at the end of the potentially huge log). My manual reductions usually start there for glue layer crashes.
Jan 18 2022