Snazzah / SublimeDiscordRP

📄 Discord rich presence for Sublime Text
MIT License
131 stars 35 forks source link

Unsolicited infinite freezes #71

Closed medallyon closed 3 years ago

medallyon commented 3 years ago

I've long been wondering (a few months) why my ST3 was randomly freezing, indefinitely unresponsive, and eventually have to manually quit out via Task Manager. I finally had enough and chose to track down the issue by systematically disabling and re-enabling my packages one by one. It seems as though this is the only package where this behaviour with ST3 occurs.

I don't think it's completely random. I've noticed that most often, it happens when I close a tab, either with an MMB click or CTRL+W.

My setup is as follows:

I love this package to bits and I want to do more to fix this. If you have any idea about any logs I can submit that would help, or anything else for that matter, please let me know.

Snazzah commented 3 years ago

Not sure where this is coming about. I've been using it recently in a project and haven't gotten any issues while closing tabs. You can open the console with ctrl+ `, or open Discord's console with the instructions below, not too sure how to fix this if there is a problem. Might be something holding up the IPC.


ctrl + shift + i to open Discord's Console (option + cmd + i on mac)

FichteFoll commented 3 years ago

I could see the following on_close event handler causing at least smaller freezes since it is the only blocking call, but I wouldn't expect it to freeze indefinitely.

https://github.com/Snazzah/SublimeDiscordRP/blob/61755f229c8b1acfca6fedb3e70a9f1acfacc420/drp.py#L333-L339

@Snazzah, when is the condition expected to trigger? When all views of a window have been closed?

Snazzah commented 3 years ago

@FichteFoll Yes, but I need to fix this. At the moment, it just goes back to the idle presence when any tab is closed.

66d30eddbd595ff6e1e6ce6e67df31c14c440475 should be doing the correct behavior.

medallyon commented 3 years ago

I've been using 66d30eddbd595ff6e1e6ce6e67df31c14c440475 since the last comment and I have not gotten any freezes as described.