New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Komodo and closing behavior #1594

Closed
babobski opened this Issue May 24, 2016 · 19 comments

Comments

Projects
None yet
4 participants
@babobski
Contributor

babobski commented May 24, 2016

Short Summary

Made for K9 the addon closing settings, only in K10 I can't prevent closing komodo.
It shows the prompt or minimize, but the closing of komodo is not prevented.

I tested it with the toolbox, but here i can prevented closing using the trigger "on shutdown"

Yesterday, I was working on my Less Compiler, only sometimes i had a dirty file, and komodo asks if you want to save, discard or cancel. Only when you click the cancel button komodo is still shutting down.

Platform Information

Windows 10 Komodo ide 10

@Naatan

This comment has been minimized.

Member

Naatan commented May 24, 2016

Sorry I'm not entirely clear on this; are you saying Komodo's closing behaviour is broken or that your addon stopped working?

@babobski

This comment has been minimized.

Contributor

babobski commented May 24, 2016

I'm saying the closing behavior is broken and my addon also :)

When i have a unsafed buffer and i drop a addon on komodo, is ask to restart.
When i do that, ti will ask if i want to save, discard the changes or cancel.
When i click on cancel Komodo is still closing, this a bug

@Naatan

This comment has been minimized.

Member

Naatan commented May 24, 2016

Perfect, thanks for clarifying :)

@Naatan Naatan added Type: Bug and removed Pending: Response labels May 24, 2016

@Naatan Naatan added this to the 10.0.1 milestone May 24, 2016

@cgchoffman

This comment has been minimized.

Member

cgchoffman commented May 31, 2016

FYI @Naatan, this was coded to do exactly this, once you selected restart, you can't stop it. Was there a reason that you had written it like that? I may need to direct that question @mitchell-as now that I think about it. I think it was you who wrote this stuff right?

@mitchell-as

This comment has been minimized.

Member

mitchell-as commented May 31, 2016

@cgchoffman I do not recall writing any code to fiddle with Komodo's shutdown behavior.

@Naatan Naatan modified the milestones: 10.1, 10.0.1 May 31, 2016

@Naatan

This comment has been minimized.

Member

Naatan commented May 31, 2016

@cgchoffman the bug is that pressing cancel still restarts Komodo. Not that it should be asking for additional confirmation. We'll want to revert that commit and fix the bigger issue: shutdown continuing despite the user cancelling it.

I've re-targeted this for 10.1 because it's not a new bug. But please revert your commit as it does not address the bug and it changes the current behaviour in ways that it was not intended for.

Fwiw I used confirmation=false because this is not an explicit restart request, so it makes no sense to ask "do you really want to restart?".

@Naatan Naatan reopened this May 31, 2016

@Naatan Naatan modified the milestones: 10.0.1, 10.1 May 31, 2016

@Naatan

This comment has been minimized.

Member

Naatan commented May 31, 2016

Putting this back on 10.0.1 to revert the commit, please re-target for 10.1 once that's done.

@cgchoffman

This comment has been minimized.

Member

cgchoffman commented May 31, 2016

The fix I've implemented does what is requested. If you say "yes" to a restart but then say "Cancel" to saving dirty files, then the shutdown process stops.

With confirmation=false, it is my impression that Komodo will shutdown no matter what, at least that seems to be the intended purpose of utils.restart. Having said that, @Naatan and I both note that it uses the wrong constant as an arg if that is it's intended use case, ie. Ci.nsIAppStartup.eAttemptQuit.
Ref: utils.restart

@Naatan and I discussed and we now agree that my change gets the desired effect stated in the first paragraph of this comment.

Leaving open and moving to 10.1 as this merits follow up. I'm getting a bad smell from this code.

@cgchoffman cgchoffman modified the milestones: 10.1, 10.0.1 May 31, 2016

@cgchoffman

This comment has been minimized.

Member

cgchoffman commented May 31, 2016

@babobski, I'm staging a nightly right now. It will be available in about an hour. Do you mind trying it and letting us know if it's behaving how you expected?

@Naatan

This comment has been minimized.

Member

Naatan commented May 31, 2016

To be clear: Carey's fix has the desired effect but it works around the actual bug - which is that interrupting a Mozilla shutdown event does not seem to work unless you jump through Komodo specific hoops.

@babobski

This comment has been minimized.

Contributor

babobski commented May 31, 2016

@cgchoffman of course no problem, downloading the latest nightly now

@babobski

This comment has been minimized.

Contributor

babobski commented May 31, 2016

@cgchoffman Just tested it, but it's working half.
When I have Komodo open, and I have a unsaved buffer.
When I now close komodo its asking me if i want to save, cancel, or reject the changes.
If I click cancel, Komodo doesn't shutdown and I can decide what to do further.

Tested It a bit more, now when I have unsaved buffer and a drop a new addon on Komodo, I get the same question. But when I now click on cancel it is still closing.

@cgchoffman

This comment has been minimized.

Member

cgchoffman commented May 31, 2016

When I have Komodo open, and I have a unsaved buffer.
When I now close komodo its asking me if i want to save, cancel, or reject the changes.
If I click cancel, Komodo doesn't shutdown and I can decide what to do further.

@babobski this wasn't in question was it? Did I miss something in this ticket or are you just testing thoroughly?

What is the build number of your install? I'm not seeing this.
I have a dirty file open
I drop an addon on to KOmodo and am asked to restart
I click Restart Now
I am asked to save dirty file (don't save, cancel, save)
I click cancel
Shutdown process stops

@cgchoffman

This comment has been minimized.

Member

cgchoffman commented May 31, 2016

Addendum: The build number we're looking for is 89188.

@babobski

This comment has been minimized.

Contributor

babobski commented May 31, 2016

@cgchoffman it is working correct, was looking at the wrong build.
Installed the latest nightly, but opened it with the shortcut in my taskbar.
Opening the old version.
Tested it with build 89188 and it is now working correct.
Thanks

@babobski babobski closed this May 31, 2016

@cgchoffman

This comment has been minimized.

Member

cgchoffman commented May 31, 2016

Thanks a lot for checking @babobski. We're going to keep this ticket open for now since my fix is more of a patch or workaround for an issue in how Komodo handles shutdown sequences.

@cgchoffman cgchoffman reopened this May 31, 2016

@cgchoffman

This comment has been minimized.

Member

cgchoffman commented Jun 28, 2016

I don't think this should be in Komodo 10.1 should it? This is going to have to review the entire mechanic that handles Komodo shutdowns.

@Naatan

This comment has been minimized.

Member

Naatan commented Jun 28, 2016

Let's have a look for 10.1, we can always decide to push to 11 if it ends up being too much.

@cgchoffman

This comment has been minimized.

Member

cgchoffman commented Aug 11, 2016

We're going to close this. After reviewing the shutdown code for Komodo it looks like this is the best option.

@cgchoffman cgchoffman closed this Aug 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment