sumatrapdfreader / sumatrapdf

SumatraPDF reader
http://www.sumatrapdfreader.org
GNU General Public License v3.0
13.42k stars 1.71k forks source link

Crashes while trying to set a custom zoom #4478

Closed PrinceOC912 closed 1 month ago

PrinceOC912 commented 1 month ago

SumatraPDF version

Describe the bug The program crashes if I try to set a custom zoom value when a keyboard shortcut is set to bring up the custom zoom dialog. It works fine with the default shortcut Ctrl + Y (when CmdZoomCustom is not used)

To Reproduce Steps to reproduce the behavior:

  1. Click on menu icon select zoom and then custom zoom or use the custom keyboard shortcut

Expected behavior It doesn't crash and I am able to set a custom zoom. I tried many different shortcuts with different key modifiers eg. Ctrl Alt etc. It happens with any file whether it be PDF or DJVU.

Crash gist: https://gist.github.com/PrinceOC912/b7e2480446bc2d52451b11b20ff7a756

GitHubRulesOK commented 1 month ago

Hmm In newest 16759 (there should not be much difference it was language and one minor change for building) As you said I used CTRL + Y with 550 and no crash

Custom Zoom is supposed to be a desired use and you have no zoom entries nor defined a custom zoom value

I set a Key and or an Icon no crash

    [
        Cmd = CmdZoomCustom 550
        Key = 5
        ToolbarText = 5
    ]

image

PrinceOC912 commented 1 month ago

I went through the docs and it seems to be a change in versions 3.6+, before I was able to set z as a shortcut to bring up the zoom factor dialog and then set a custom value. I remapped z to Ctrl + Y using autohotkey to achieve my desired behavior.

kjk commented 1 month ago

Fixed, thanks for the report