quisquous / cactbot

FFXIV TypeScript Raiding Overlay
Apache License 2.0
793 stars 378 forks source link

Overlay stops updating when game in focus #309

Closed gaogaostegosaurus closed 5 years ago

gaogaostegosaurus commented 5 years ago

Hello,

I'm having an issue where Cactbot appears to stop updating itself after a few seconds. I load the test module and it will rapidly show changes in position for a few seconds, but after that the reported position freezes along with everything else (MP and such won't update). I can apparently force it to check again by alt-tabbing out or changing jobs, but it then stops working again within a few seconds.

If I run around with the XIV window not in focus, the position and such will update without issue (as far as I know) but at a much slower rate.

Not sure if this is something to do with my machine, but I figured I'd ask in case there's something I overlooked. Thank you!

quisquous commented 5 years ago

Hmm. This is very curious. Cactbot treats itself as active when the the process id called ffxiv_dx11 is the foreground window.

If you open up task manager in Windows, are there multiple processes with that name? Are you using any sort of weird Windows window manager or things that might make the window not think that it's the foreground?

If you can't find anything in task manager, I'll make you a custom build that spits out the process id that it is following and we can make sure that it's finding the right process. Past that, I'm not sure what else to do.

gaogaostegosaurus commented 5 years ago

So again, not sure if this is some weird setting (or screw up...) on my system or not, but I figured it'd be useful information anyone that might run into this issue. I don't know if this is something that is "fixable" from the plugin side (but if it is, let me know so I can feel like I contributed =p).

There's something strange going on on my system where XIV is not obeying the framerate limit I set. When XIV shoots off into the 100+FPS range and the GPU hits 90-100%, overlays stop working, but when the GPU load falls they start working again. From the Task Manager view, it looks like the overlay uses just a little bit of GPU to display so if it has no space it just decides to quit updating. Additionally, I had the option set where it would lower the framerate when XIV wasn't in focus, which explains why the overlays worked a lot more consistently when it was out of focus.

I am almost positive frame limiting was working before which explains why I had no (or at least fewer? I'm not sure now) problems with the overlay prior to very recently, so for now I'm just trying to figure out why nothing is paying attention to the FPS limit anymore. ┐(´д`)┌

quisquous commented 5 years ago

Mmm. That makes quite a bit of sense that the overlays are blocked on gpu. Is there something in ffxiv or your graphics card setup or in windows that you can do to limit it to something more reasonable? I think from the plugin side, it's capped at 60hz (and CEF doesn't go higher than that), and there's really nothing else I can do.

Are you having a ton of CPU usage? #71 (the last comment) has a link to something where dual monitors would cause issues.

gaogaostegosaurus commented 5 years ago

CPU usage looked (and looks) normal.

For anyone that sees similar issues, I turned on Chill in my AMD settings for FFXIV specifically (made a profile for it) and that seems to have solved my issues with cactbot sporadically stopping - I presume anything that limits normal GPU load to under 90% would have a similar result.

quisquous commented 5 years ago

Excellent. Thanks for the update! :+1: I will point people to this if I ever see this happening again.