r52 / PTA

PoE Trade Assistant
GNU General Public License v3.0
21 stars 3 forks source link

PTA stops working after game client crashes. #37

Closed djinnsynth closed 4 years ago

djinnsynth commented 4 years ago

Describe the bug After the game crashes I have to restart PTA for it to workk again.

Is it consistently reproducible? Yes

Additional context Maybe there's some way PTA can re-find the game automatically? It seems like it just forgets where it is after a crash. If you need me to provide anymore data please let me know.

r52 commented 4 years ago

I haven't been able to reproduce this. I'm crashing pretty often with the Delirium content and haven't had PTA fail after restarting the game without touching PTA. Will need more info on this.

djinnsynth commented 4 years ago

I just noticed I actually don't have to restart it, opening settings and hitting save makes it work again.

What other info would you need? Is there sommething from the log that would help?

r52 commented 4 years ago

Is your computer setup a single monitor? Try focusing on another window before or after restarting PoE to reset the hooks.

djinnsynth commented 4 years ago

Yeh single monitor, and next crash I'll try that.

djinnsynth commented 4 years ago

Ok nice, it was just because I jumped immediately back into game, focusing another window works fine.

I really don't know what PTA relies on to work, but would it be possible to not have to do that window focus trick?

r52 commented 4 years ago

I don't think so. IMO this is more of an OS issue than anything. The reason you have to do the focus reset is because PTA unbinds all hotkeys when it detects that you aren't focused onto PoE (and rebinds them when you do), so that people (like myself) with multi-monitor setups can tab into the browser and use F5 when I have F5 setup as my hideout macro. If PTA does not unbind the keys when focused away from PoE, then the key is blocked and cannot be used which is no good. I'm guessing the reason why it breaks for you is because when you restart the game, Windows isn't re-issuing the message to PTA that PoE has focus again so you have to force it. Where as I play on the Steam version so I must go through the Steam menu to boot PoE again so that force resets my focus. Either way there isn't much I can do here except letting you know the workaround.

djinnsynth commented 4 years ago

Yrp all good, thanks for that information. I might try adding something to my launcher .bat file to focus the window again, might have to do some research.