pnedev / comparePlus

Compare plugin for Notepad++
GNU General Public License v3.0
983 stars 140 forks source link

NPP may crash on Compare #319

Closed Yaron10 closed 1 year ago

Yaron10 commented 2 years ago

Hello Pavel,

Congratulations and many thanks again. 👍

It seems that https://github.com/pnedev/comparePlus/commit/f007be9076ac841e9174b56dd79b1341700cdc46 may crash NPP.

Compare the current Compare.cpp and NppHelpers.cpp. If NPP does not crash on the first time, please restart NPP and try again.

Should that commit change the binary size from 624 KB to 813 KB?

BR

pnedev commented 2 years ago

Hello Yaron,

Hm, it doesn't happen under Wine but it uses completely different threads implementation. I will try also on native Windows 10 later.

Should that commit change the binary size from 624 KB to 813 KB?

It is totally possible because it adds multi-threading that uses additional C++ libraries.

BR

Yaron10 commented 2 years ago

Hello Pavel,

The crash seems to happen on 64-bit only. It's not consistent but easily reproducible. I've tested it on 32-bit (both Windows 7 and Windows 10), and NPP hasn't crashed.

Thank you for looking into it.

BR

pnedev commented 2 years ago

Hello Yaron,

Thank you for that clarification. It's becoming even stranger...

BR

Yaron10 commented 2 years ago

Hello Pavel,

I've downloaded a fresh NPP 8.4.5 64-bit, and installed ComparePlus via PluginAdmin. NPP crashed on the first try to compare those files.

Have you been able to reproduce it?

Thank you very much for your work and best of luck finding the cause.


BTW, the link on PluginAdmin is still https://github.com/pnedev/compare-plugin (it redirects properly).

תמונה

pnedev commented 1 year ago

Hello Yaron,

I haven't tried yet on native Windows. I will write back when I do. Thank you. :+1:

Thank you also for noticing the link in PluginAdmin, I have fixed it and created a PR in NppPluginList.

BR

Yaron10 commented 1 year ago

Hello Pavel,

👍 Thanks again. I appreciate it.

BR

pnedev commented 1 year ago

Hello Yaron,

As strange as it may seem I was not able to reproduce the crash on native Windows 10 Pro 64-bit. Could you please share your Notepad++ Debug Info? You can find it just above the About in ? menu. Might be something inter-plugin related, I don't know for sure now. Could you also tell me what is the processor on your computer? Thank you!

BR

Yaron10 commented 1 year ago

Hello Pavel,

Thank you for looking into it. 👍

I've been able to reproduce it on a fresh portable NPP without changing any settings.

I've downloaded a fresh NPP 8.4.5 64-bit, and installed ComparePlus via PluginAdmin. NPP crashed on the first try to compare those files.

My processor is: Intel(R) Core(TM) i7-10700.


Hello @vinsworldcom,

Could you please try it?

Thank you.

vinsworldcom commented 1 year ago

I've been using the ComparePlus 1.0.0 release since it was announced on the Npp Forum with WIndows 10 64-bit, Notepad++ 8.4.5 latest 64-bit and I've done a few compares (maybe 10+) and it's never yet crashed for me.

Cheers.

Yaron10 commented 1 year ago

@vinsworldcom,

Thank you for replying.

I've encountered a crash on comparing the current Compare.cpp and NppHelpers.cpp (https://github.com/pnedev/comparePlus/tree/master/src). If NPP does not crash on the first time, please restart NPP and try again.

pnedev commented 1 year ago

Hello Yaron,

I was able to reproduce it. I will analyze it when I have the time, thanks for the details. :+1:

BR

vinsworldcom commented 1 year ago

I've relaunched N++ a few times opening both those files and still have not had a crash:

image

Cheers.

Yaron10 commented 1 year ago

Hello Pavel,

That's "bad news and good news". :) Best of luck finding the cause. Whenever you have time.

Thank you very much. I appreciate it. 👍


@vinsworldcom,

Thanks again for testing it. 👍 So it's somewhat illusive. :)

Yaron10 commented 1 year ago

Hello Pavel,

https://github.com/pnedev/comparePlus/commit/29d812d2de545f70f29f45530b36e8a1cadcc777 seems to have fixed the issue. 👍 Are you still reviewing it?

Thank you.

BR

pnedev commented 1 year ago

Hello Yaron,

I haven't had the chance to fully test it yet. Can you still reproduce it on your side?

BR

pnedev commented 1 year ago

Hello again Yaron,

I cannot reproduce the issue after the fix you mentioned. If you cannot reproduce it on your side as well you can close this thread.

Thanks a lot! :+1:

BR

Yaron10 commented 1 year ago

Hello Pavel,

👍 I can not reproduce it.

Thank you very much. I do appreciate it.

BR