On 28-10-17 01:24, Gerald Nunn wrote:

On Fri, 27 Oct 2017 22:06:12 GMT, Gerald Nunn wrote:

On Fri, 27 Oct 2017 23:21:23 +0200, Mike Wey wrote:

I've spend some time tracking this one down.

The second time gio.ApplicationCommandline is cast to void the invariant
of the class fails. This is related to the call to destroy in
source/gx/tilix/application.d line: 386. I still have to investigate why.

I can't reproduce the issue with ldc (1.4.0), only with dmd.

Thanks for the pointer, I changed that line to use the `Scoped!ApplicationCommandLine` version and now it works fine, I'm not sure what the issue with the destroy was either.

I also upgraded my ldc2 version as well, I should have realized that.

One more data point, opening the preferences dialog when compiled with DMD crashes, on LDC it works fine.

this line:

ProfilePreferenceRow row = 
cast(ProfilePreferenceRow)lbSide.getSelectedRow();

fails with dmd since getSelectedRow returns null and that then triggers
an assert when calling a member function.

With ldc it just calls the function while this == null and ends up
executing return cast(ProfilePreferenceRow)super, and returning null.

Since you can't define the opCast as a ufcs function and a static
doesn't have access to this the ldc behavior seens the desired behavior.