pyMeow
pyMeow copied to clipboard
PyMeow crashes with overlay
Hi, I have a problem with PyMeow, more specifically about overlay.
My problem is that after around 5-6 seconds of displaying the overlay it crashes. My code looks something like this
` pm.overlay_init() pm.set_window_position(0, 0) pm.set_window_size(1919, 1079)
run = True
while run and pm.overlay_loop():
pm.begin_drawing()
# drawing here
pm.end_drawing()
pm.overlay_close() `
Program ends after around 5 seconds with message "Python is not responding". My suspicion is that it has something to do about handling the events by overlay window, as I have faced similar issues in the past using C++ and that was the issue with similar behavior. The fix in C++ was providing PeekMessage() call. Any help would be appreciated
I use the latest release of PyMeow and Python 3.12
You are probably grilling your gpu/cpu.
Limit your FPS and actually draw something.
Without limitation the overlay runs at 2,5k fps ++ And since you arent drawing anything i guess its even more.
See this Code from the examples (removing unimportant things):
pm.overlay_init("Counter-Strike 2", fps=144)
while pm.overlay_loop():
view_matrix = pm.r_floats(self.proc, self.mod + Offsets.dwViewMatrix, 16)
pm.begin_drawing()
pm.draw_fps(0, 0)
.......
pm.end_drawing()
Didn't work, the only fix I found was what I suggested and after adding PeekMessage (without actually handling it) after overlay_loop() and it no longer crashes.
The thing is, that the error only occurs for you and its also not reproducible. And for me you fix seems to be pretty much unrelated. The whole GUI part of pyMeow is based on raylib and atleast for me and several others its working flawlessly. If you believe there is a bug in raylib, you are mostlikely better of opening an issue there
Closed since there was no answer yet.