pyMeow icon indicating copy to clipboard operation
pyMeow copied to clipboard

PyMeow crashes with overlay

Open tomkan84 opened this issue 1 year ago • 3 comments

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

tomkan84 avatar May 12 '24 20:05 tomkan84

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()

Hypnootika avatar May 13 '24 00:05 Hypnootika

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.

tomkan84 avatar May 17 '24 11:05 tomkan84

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

Hypnootika avatar May 17 '24 12:05 Hypnootika

Closed since there was no answer yet.

qb-0 avatar Oct 30 '24 17:10 qb-0