{"action":"created","issue":{"url":"https://api.github.com/repos/imagej/imagej-legacy/issues/1","repository_url":"https://api.github.com/repos/imagej/imagej-legacy","labels_url":"https://api.github.com/repos/imagej/imagej-legacy/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/imagej/imagej-legacy/issues/1/comments","events_url":"https://api.github.com/repos/imagej/imagej-legacy/issues/1/events","html_url":"https://github.com/imagej/imagej-legacy/issues/1","id":32737980,"number":1,"title":"LegacyService dispose code is fragile","user":{"login":"ctrueden","id":556626,"avatar_url":"https://avatars.githubusercontent.com/u/556626?v=3","gravatar_id":"","url":"https://api.github.com/users/ctrueden","html_url":"https://github.com/ctrueden","followers_url":"https://api.github.com/users/ctrueden/followers","following_url":"https://api.github.com/users/ctrueden/following{/other_user}","gists_url":"https://api.github.com/users/ctrueden/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrueden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrueden/subscriptions","organizations_url":"https://api.github.com/users/ctrueden/orgs","repos_url":"https://api.github.com/users/ctrueden/repos","events_url":"https://api.github.com/users/ctrueden/events{/privacy}","received_events_url":"https://api.github.com/users/ctrueden/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/imagej/imagej-legacy/milestones/2","html_url":"https://github.com/imagej/imagej-legacy/milestones/m1","labels_url":"https://api.github.com/repos/imagej/imagej-legacy/milestones/2/labels","id":1034345,"number":2,"title":"m1","description":"","creator":{"login":"hinerm","id":1123809,"avatar_url":"https://avatars.githubusercontent.com/u/1123809?v=3","gravatar_id":"","url":"https://api.github.com/users/hinerm","html_url":"https://github.com/hinerm","followers_url":"https://api.github.com/users/hinerm/followers","following_url":"https://api.github.com/users/hinerm/following{/other_user}","gists_url":"https://api.github.com/users/hinerm/gists{/gist_id}","starred_url":"https://api.github.com/users/hinerm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hinerm/subscriptions","organizations_url":"https://api.github.com/users/hinerm/orgs","repos_url":"https://api.github.com/users/hinerm/repos","events_url":"https://api.github.com/users/hinerm/events{/privacy}","received_events_url":"https://api.github.com/users/hinerm/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":6,"state":"open","created_at":"2015-03-23T15:49:43Z","updated_at":"2016-09-01T18:17:53Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2014-05-03T02:13:09Z","updated_at":"2016-09-01T18:17:53Z","closed_at":"2016-09-01T18:17:52Z","body":"The DefaultLegacyService dispose() method closes all windows before shutting down IJ1. However the code that closes all windows can fail. You can see this by inspecting IJ1's source code. The closeAllWindows() command relies on the idea that Editor windows with changes will not close without saving first. Right now if a legacy plugin opens a Editor window and changes its text then the closeAllWindows() should fail. We might need some CodeHacker or reflection code for setting Editor's changed flag to false.\n\nMigrated-From: http://trac.imagej.net/ticket/1836"},"comment":{"url":"https://api.github.com/repos/imagej/imagej-legacy/issues/comments/244165772","html_url":"https://github.com/imagej/imagej-legacy/issues/1#issuecomment-244165772","issue_url":"https://api.github.com/repos/imagej/imagej-legacy/issues/1","id":244165772,"user":{"login":"ctrueden","id":556626,"avatar_url":"https://avatars.githubusercontent.com/u/556626?v=3","gravatar_id":"","url":"https://api.github.com/users/ctrueden","html_url":"https://github.com/ctrueden","followers_url":"https://api.github.com/users/ctrueden/followers","following_url":"https://api.github.com/users/ctrueden/following{/other_user}","gists_url":"https://api.github.com/users/ctrueden/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrueden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrueden/subscriptions","organizations_url":"https://api.github.com/users/ctrueden/orgs","repos_url":"https://api.github.com/users/ctrueden/repos","events_url":"https://api.github.com/users/ctrueden/events{/privacy}","received_events_url":"https://api.github.com/users/ctrueden/received_events","type":"User","site_admin":false},"created_at":"2016-09-01T18:17:52Z","updated_at":"2016-09-01T18:17:52Z","body":"Much work was done to reliably dispose all open windows, both image and non-image:\r\n\r\n* All image windows are now [closed without recourse by looping](https://github.com/imagej/imagej-legacy/blob/imagej-legacy-0.22.1/src/main/java/net/imagej/legacy/IJ1Helper.java#L1170-L1198).\r\n* All non-image windows known to ImageJ are [closed without recourse as well](https://github.com/imagej/imagej-legacy/blob/imagej-legacy-0.22.1/src/main/java/net/imagej/legacy/IJ1Helper.java#L1200-L1239) using a combination of `WindowManager.getNonImageWindows()` and `WindowManager.getNonImageTitles()`.\r\n\r\nSo the only potentially remaining rogue windows are those which some ImageJ plugin created and showed but did not register with ImageJ1's `WindowManager`. So far, we have no had problems in practice with such windows. And if we do, the proper fix is probably to correct the code of the plugin in question."}}
{"actor":{"display_login":"ctrueden"}}