Re: ldc2 failed with exit code -1073741819.

2022-01-18 Thread kinke via Digitalmars-d-learn

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 == 0xc005 => 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.




Re: ldc2 failed with exit code -1073741819.

2022-01-18 Thread russhy via Digitalmars-d-learn

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


Re: ldc2 failed with exit code -1073741819.

2022-01-18 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Jan 18, 2022 at 05:41:34PM +, 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.


Re: ldc2 failed with exit code -1073741819.

2022-01-18 Thread Anonymouse via Digitalmars-d-learn

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?



T


It exits with 5. I could look for that, certainly.


Re: ldc2 failed with exit code -1073741819.

2022-01-18 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Jan 18, 2022 at 05:20:04PM +, 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.
> 
> ```
> #!/bin/sh
> 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".


Re: ldc2 failed with exit code -1073741819.

2022-01-18 Thread Anonymouse via Digitalmars-d-learn

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.



T


Yes, but the only thing I have to go on is dub reporting 
`-1073741819`, so I just made a script that grepped for that.


```
#!/bin/sh
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?


Re: ldc2 failed with exit code -1073741819.

2022-01-18 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Jan 18, 2022 at 04:25:45PM +, 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


ldc2 failed with exit code -1073741819.

2022-01-18 Thread Anonymouse via Digitalmars-d-learn
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?