Menu

#20 MENUCOMMAND.FILE_EXIT might result in deadlock

open
5
2014-08-22
2012-05-22
UFO
No

There's a test case over here:
https://sourceforge.net/projects/npppythonscript/forums/forum/1199074/topic/5294989
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.

Discussion

  • 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..

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.