DMD crash, LDC crash, out of memory, no error display, etc
Nierjerson via Digitalmars-d
digitalmars-d at puremagic.com
Sat Apr 8 13:33:19 PDT 2017
The project I am working on, which is near completion:
https://github.com/IllusionSoftware/COM2D
Automates COM wrapping almost completely. That is, it takes a
converted COM idl file and generates a D wrapper which handles
all the marshaling, invoking, creation, etc.
The problem is that DMD has started crashing when trying to
compile the complete set of interfaces. No error, warnings, etc.
Just crashes.
Before I'd get out of memory errors, which I changed everything
to use string instead of wstring, which seemed to help quite a
bit.
LDC crashes when running the test app, which may or may not be
related. It too would give an out of memory error though for the
large set before.
The test app works in 2 ways. First, if version != gen, it will
generate the D wrappers, output them to the console via pragma,
and on execution of the program, write it to gen.d. If version =
gen, it uses the gen'ed version. This allows to debug the
generated code, for testing, and quicker compilation.
I've also gotten failed compilations without any indication why.
While the code uses photoshop, it is not required to get the
errors or memory issues. simply set version != go and it will
disable all the photoshop call functions.
The only thing that really changes the behavior(from working to
out of memory to crashing) is using different "Interface" sets in
main.d. Using a smaller set avoids the crash or memory issue but
cannot be used properly because only that interface will generate
a D wrapper which limits it's usability.
Anyone willing to work on this a bit to see if they can figure
out the issues?
The main goal is to get ALL:
//ALL
enum Interfaces = ...
to compile completely(there may be code generation errors, since
I haven't been able to debug that setting yet because of the
crashing). Once this is fixed I can then work on making the code
more robust and clean it up.
More information about the Digitalmars-d
mailing list