chcg / NPP_HexEdit

Notepad++ Plugin Hexedit
821 stars 156 forks source link

HexEditor x64 binary makes Notepad++ v8.3.0 crash #65

Closed donho closed 2 years ago

donho commented 2 years ago

Due to the support 2GB files opening in Notepad++ v8.2.2 x64 build, the header Sci_Position.h in Notepad++ has been modified for adapting this need. This change has caused the instability of HexEditor.

How to reproduce crash:

  1. Install HexEditor Plugin in Notepad++ v8.2.2(aka 8.3.0, renamed before release) x64 build
  2. Click on H icon on toolbar
  3. Notepad++ crash

The solution is quite simple - just replace Sci_Position.h by the new one (or just replace typedef long Sci_PositionCR; by typedef intptr_t Sci_PositionCR; in Sci_Position.h of your project), then recompile HexEditor. ref: https://community.notepad-plus-plus.org/topic/22471/recompile-your-x64-plugins-with-new-header

Could you please update HexEditor ASAP (and also PluginList) so I could work on installation (NSIS) script to remove only the old versions, but keep the new fixed version, just as how installer deals with NppSaveAsAdmin plugin currently.

Sorry for the inconvenience and thank you in advance for your help.

chcg commented 2 years ago

@donho I created https://github.com/chcg/NPP_HexEdit/releases/tag/0.9.12 with updated files and code from N++ 8.2.2. At least it is not crashing immediately. From the code I believe there are more parts which needs to be updated to work with 2 GB+ data. I added also a workaround for issue #51 at the cost of disabling the statusbar infos from hexedit.

Could you please give it a try how it behaves for you.

donho commented 2 years ago

@chcg Tested, it doesn't crash anymore - thank you for your new release. OTOH, could you update the plugin list? So users can install the fixed version directedly from the new Notepad++ release.

Edit: It's done, I've updated HexEditor to v0.9.12 in PluginList: https://github.com/notepad-plus-plus/nppPluginList/commit/de493cf4864083def8d7d0c0893f4f9344b0748f