#20 MENUCOMMAND.FILE_EXIT might result in deadlock


There's a test case over here:
When I execute that command in the console, then N++ closes nicely.
So it only seems to happen when calling it in a callback function?
Or maybe just a N++ problem.


  • Dave Brotherstone

    Urgh, yeah, it will be just in the callback. Without investigating, I'm guessing this is due to the cleanup on exit, and the cleanup waits for the python script to finish, the python script is waiting for N++ to finish.

    I'll leave this open, and try and confirm that's what's happening. There's no easy answer though, other than maybe a notepad.exit() function, that copes specifically with the callback case?

  • UFO

    UFO - 2012-05-23

    I guess I'm even happy if you don't investigate into it.
    I thought that it might probably be one of those 'native'
    bugs, which you can only cover with hacks.
    I mainly reported it simply because I noticed it,
    just in case somebody else stumbles across it -
    and finally everybody could be happy with a
    sys.exit in the end? Also I'm sure it's an exceptional
    use case in which you want N++ to shutdown..