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
Bug Report: ObjCInstance b'PygletDelegate' has no attribute b'initWithAttributes_' #1089
Comments
Can you confirm if this still happens with older version of pyglet? |
@benmoran56 Thank you for your response |
I can't replicate this on an M1 Mac. Do the pyglet examples work from the repository? Can you try |
I'm having this intermittently, mostly in the context of some automated tests I'm running that initialize and closes many windows in series, usually with an invisible window to test some app logic. Most work well, but some seem to throw this error (of note: I'm not using pyglet directly, but via the I threw together this reproduction code based on the hello_world example where it seems to fail eventually (I've had it fail on as early as the 4th window, but sometimes much later): import pyglet
import tqdm
def make_window():
window = pyglet.window.Window(visible=False)
label = pyglet.text.Label(
'Hello, world!',
font_size=36,
x=window.width // 2,
y=window.height // 2,
anchor_x='center',
anchor_y='center',
)
@window.event
def on_draw():
window.clear()
label.draw()
pyglet.clock.schedule_interval(lambda _: window.close(), 1.0)
pyglet.app.run()
for i in tqdm.tqdm(range(1000)):
make_window() |
It doesn't mean that your test is invalid, but multiple calls to def null(window):
pass
pyglet.app.event_loop.on_window_close = null |
I'll accept that what I'm doing is unsupported. :) Just to let you know though that your suggestion of the null function seems to make the window unable to close (so in my example in never gets past the first iteration of the loop). |
Describe the bug
my computer is MacOS M1 version
the crashes log down below.
pyglet version
System Information:
python3 -m pyglet.info
How To Reproduce
A small code example that illustrates how to reproduce the bug is very useful to help triage.
The text was updated successfully, but these errors were encountered: