Skip to content
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

QB64 slows down to a crawl after a while at random. #208

Open
RealKindOne opened this issue Oct 27, 2021 · 1 comment
Open

QB64 slows down to a crawl after a while at random. #208

RealKindOne opened this issue Oct 27, 2021 · 1 comment

Comments

@RealKindOne
Copy link
Contributor

Windows 7 SP1

QB v2.1 c48bf67

Describe the bug

QB64's UI will stall when doing other things. Keyboard shortcuts and using the mouse are delayed. It takes about 30 seconds to do something. Eventually the stalling will stop, but that can take 30+ minutes?

To Reproduce
Reproducing is a bit difficult and might take a while.

  1. Open QB64
  2. Open a video game (Factorio for me)
  3. Wait an hour or so?
  4. Switch back to QB64.
  5. The UI is slow.

Expected behavior

Don't stall.

Additional context

U:\Earth\ashish.exe on Discord has also talked about this issue. (October 21, 2021)

I've built a debug build and I've profiled it in "Very Sleepy" twice.

https://github.com/VerySleepy/verysleepy

http://www.codersnotes.com/sleepy/

sleepy.zip

Open the files and click "SleepEx" at the top.

According to Very Sleepy (capture-2021-10-27.sleepy), it was doing this:

internal/c/qbx.cpp:

32.90% line 1967: if (stop_program){exit_ok|=2; return;}//close thread #2

internal/c/libqb.cpp:

27.70% line 12930: evnt(0);//check for new events
26.58% line 28030:vertical_retrace_happened=1; vertical_retrace_in_progress=1;
6.32% line 26868: Sleep(4); msdelay-=4;//this forces GLUT to relinquish some CPU time to other threads but still allow for _FPS 100+
4.14% line 12935: goto recalculate;
2.36% line 28033: if (close_program){

@FellippeHeitor
Copy link
Contributor

That's very detailed and the "Very Sleepy" report should help very much. Thank you for your report. If you come up with anything else, please let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants