Asn1Editor.WPF icon indicating copy to clipboard operation
Asn1Editor.WPF copied to clipboard

Click on "About" or "License" crashes the app

Open AK47-2020 opened this issue 3 years ago • 4 comments

Hi, Using W10 and VS 2019 to generate Asn1Editor:

  • a click on Help->About or Help->License crashes the app

Is there a configuration issue on my side (missing/incorrect path)?

AK

AK47-2020 avatar May 24 '21 16:05 AK47-2020

what happens if you debug in VS? Do you get any exceptions? And there must be a log file in %AppData%\Sysadmins LV\Asn1Editor\Logs with unhandled exception details.

Crypt32 avatar May 24 '21 16:05 Crypt32

Works fine with the debugger. Any harcoded path to a resource? Nothing in log file on this.

AK47-2020 avatar May 25 '21 07:05 AK47-2020

Please provide logs from %AppData% folder when app crashes.

Crypt32 avatar May 25 '21 07:05 Crypt32

I get nothing with the debugger: no crash, things display correctly.

Here is the log file content:

******************************** Started ******************************** Process: Asn1Editor PID : 37816 Version: 1.4.2.0

AK47-2020 avatar May 25 '21 07:05 AK47-2020

image

I think I know what might be wrong. Related to the https://github.com/PKISolutions/Asn1Editor.WPF/pull/21

KohrAhr avatar Jul 26 '23 20:07 KohrAhr

Suggest you to try following code for the function setParent

void setParent(Boolean mainWindowAsParent = false) {
    WindowCollection windows = Application.Current.Windows;
    List<Window> lvw = windows.Cast<Window>().Where(x => x.Visibility == Visibility.Visible).ToList();
    Window parent = null;
    if (lvw.Count > 0)
    {
        parent = mainWindowAsParent 
            ? lvw.First() 
            : lvw.Last();
    }
    hwnd.Owner = parent;
}

KohrAhr avatar Jul 26 '23 20:07 KohrAhr

This is fixed in https://github.com/PKISolutions/Asn1Editor.WPF/releases/tag/v23.10.24

Crypt32 avatar Oct 24 '23 16:10 Crypt32