Files
Mujoco_WASM/python/mujoco
devshahofficial 564007204c Fix AttributeError in Renderer.__del__ on partial construction.
If Renderer.__init__ raises before the rendering contexts are assigned
(e.g. width > offwidth raises ValueError, or MjrContext construction
fails), __del__ calls close() which accesses self._gl_context and
self._mjr_context unconditionally, raising AttributeError. This masks
the real __init__ failure with a noisy "Exception ignored in..." message
during garbage collection.

Pre-initialize both attributes to None at the top of __init__ so that
close() is safe on a partially-constructed instance. Add a regression
test that captures sys.unraisablehook and asserts that __del__ raises
nothing when __init__ fails via the width > offwidth path.

Fixes #3213.
2026-04-15 12:15:24 -07:00
..
2024-11-19 14:07:21 -08:00
2022-05-25 07:01:59 -07:00
2026-03-10 01:56:10 -07:00
2022-05-23 01:08:49 -07:00
2023-10-13 16:13:24 -07:00
2024-10-24 08:31:15 -07:00
2025-02-21 08:44:17 -05:00
2025-02-21 08:44:17 -05:00
2024-12-16 09:57:08 -08:00
2024-12-16 09:57:08 -08:00