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

Software crashes

Open qq1176914912 opened this issue 4 years ago • 14 comments

When I click edit to create a new node when I am not debugging, it will crash directly, but there is nothing in the debugging state, and there are editing nodes, and it will also crash in the debugging state.

qq1176914912 avatar Sep 13 '21 08:09 qq1176914912

can you clarify this? Specifically:

  1. what version you are using
  2. under which conditions the application crashes?
  3. under which conditions the application doesn't crash?

Crypt32 avatar Sep 13 '21 08:09 Crypt32

can you clarify this? Specifically:

  1. what version you are using
  2. under which conditions the application crashes?
  3. under which conditions the application doesn't crash?

I downloaded your source code directly and started the Asn1Editor project. In the debugging state, an error is reported as shown in the figure. In both cases, an error will be reported and the software will eventually crash.

问题二 问题一 报错 If you start directly without debugging, it is the same as the above two pictures. Clicking on those two will cause the software to crash, and clicking to create a node will crash as shown in the figure. 情况er

Could it be because my page cannot be opened normally? 加载

qq1176914912 avatar Sep 14 '21 00:09 qq1176914912

It seems that you are missing some of resources, specifically images. Does it work when you compile it using Release configuration?

Crypt32 avatar Sep 14 '21 06:09 Crypt32

It seems that you are missing some of resources, specifically images. Does it work when you compile it using Release configuration?

It can work, but it can’t open the interface. It shows that the picture does not exist, but I can see that the picture is under that directory.

qq1176914912 avatar Sep 14 '21 06:09 qq1176914912

It seems that you are missing some of resources, specifically images. Does it work when you compile it using Release configuration?

Still clicking those functions will cause the software to crash

qq1176914912 avatar Sep 14 '21 06:09 qq1176914912

You should set a breakpoint on a failing code and debug it line by line. I suspect the problem is related to a number of available windows: https://github.com/PKISolutions/Asn1Editor.WPF/blob/3f7629ab68bced1b63b82e6a71b4ee5f67665890/Asn1Editor/API/Utils/WPF/WindowFactoryBase.cs#L14

Crypt32 avatar Sep 14 '21 06:09 Crypt32

您应该在失败的代码上设置断点并逐行调试。我怀疑这个问题与许多可用的窗口有关:

https://github.com/PKISolutions/Asn1Editor.WPF/blob/3f7629ab68bced1b63b82e6a71b4ee5f67665890/Asn1Editor/API/Utils/WPF/WindowFactoryBase.cs#L14

When I right-click on the node and select Edit, it can be used normally, but when I click the pencil icon in the toolbar to edit, he will report an error because the o in this method is null. 问题 问题2

qq1176914912 avatar Sep 14 '21 06:09 qq1176914912

You should set a breakpoint on a failing code and debug it line by line. I suspect the problem is related to a number of available windows:

https://github.com/PKISolutions/Asn1Editor.WPF/blob/3f7629ab68bced1b63b82e6a71b4ee5f67665890/Asn1Editor/API/Utils/WPF/WindowFactoryBase.cs#L14

Have you tested it without any problems? I don’t understand the code here and don’t know how to change it

qq1176914912 avatar Sep 15 '21 00:09 qq1176914912

You should set a breakpoint on a failing code and debug it line by line. I suspect the problem is related to a number of available windows:

https://github.com/PKISolutions/Asn1Editor.WPF/blob/3f7629ab68bced1b63b82e6a71b4ee5f67665890/Asn1Editor/API/Utils/WPF/WindowFactoryBase.cs#L14

Debug under debug and click on the new node under edit. It can be used normally, but if you debug under Release and click the change button, an error will be reported and the software will crash. 问题1 问题2

qq1176914912 avatar Sep 15 '21 02:09 qq1176914912

You should set a breakpoint on a failing code and debug it line by line. I suspect the problem is related to a number of available windows: https://github.com/PKISolutions/Asn1Editor.WPF/blob/3f7629ab68bced1b63b82e6a71b4ee5f67665890/Asn1Editor/API/Utils/WPF/WindowFactoryBase.cs#L14

Have you tested it without any problems? I don’t understand the code here and don’t know how to change it

The code finds the main window to set as parent window for dialog in order to avoid side effects of dialog getting behind main window and then it is hard to get it back in front.

Crypt32 avatar Sep 15 '21 07:09 Crypt32

You should set a breakpoint on a failing code and debug it line by line. I suspect the problem is related to a number of available windows: https://github.com/PKISolutions/Asn1Editor.WPF/blob/3f7629ab68bced1b63b82e6a71b4ee5f67665890/Asn1Editor/API/Utils/WPF/WindowFactoryBase.cs#L14

Have you tested it without any problems? I don’t understand the code here and don’t know how to change it

The code finds the main window to set as parent window for dialog in order to avoid side effects of dialog getting behind main window and then it is hard to get it back in front.

Why is there a problem that debugging can be used normally but cannot be used without debugging?

qq1176914912 avatar Sep 15 '21 07:09 qq1176914912

It seems that command parameter was missing in toolbar. Check the commit above, it should work now.

Crypt32 avatar Sep 15 '21 07:09 Crypt32

It seems that command parameter was missing in toolbar. Check the commit above, it should work now.

Thank you very much, trouble

qq1176914912 avatar Sep 15 '21 07:09 qq1176914912

You should set a breakpoint on a failing code and debug it line by line. I suspect the problem is related to a number of available windows: https://github.com/PKISolutions/Asn1Editor.WPF/blob/3f7629ab68bced1b63b82e6a71b4ee5f67665890/Asn1Editor/API/Utils/WPF/WindowFactoryBase.cs#L14

Have you tested it without any problems? I don’t understand the code here and don’t know how to change it

The code finds the main window to set as parent window for dialog in order to avoid side effects of dialog getting behind main window and then it is hard to get it back in front.

Why is there a problem that debugging can be used normally but cannot be used without debugging?

visual studio messes with windows in different debug modes. This is why I put compiler conditions in the code.

Crypt32 avatar Sep 15 '21 07:09 Crypt32