You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
set() method throws NullPointerException for PGraphicsOpenGL objects #1520
changed the title [-]`background()` method throws `NullPointerException` for `PGraphics` objects[/-][+]`set()` method throws `NullPointerException` for `PGraphicsOpenGL` objects[/+]on Jul 31, 2026
Renaming this because I see void backgroundImpl(PImage image) calls set(0, 0, image), and I can reproduce the bug with set(0, 0, g) also. And this bug only applies to PGraphicsOpenGL instances.
Other permutations of renderer type or graphics type don't experience the problem. The bug only appears when both the Sketch and the graphics object are PGraphicsOpenGL instances. The bug is triggered with background() or set().
Activity
catilac commentedon Jul 13, 2026
Thanks @hx2A! Assigned to you.
hx2A commentedon Jul 15, 2026
Thank you @catilac ! This bug fix is pretty straightforward and I'll get it done.
catilac commentedon Jul 15, 2026
thanks @hx2A really appreciate your help :)
[-]`background()` method throws `NullPointerException` for `PGraphics` objects[/-][+]`set()` method throws `NullPointerException` for `PGraphicsOpenGL` objects[/+]hx2A commentedon Jul 31, 2026
Renaming this because I see
void backgroundImpl(PImage image)callsset(0, 0, image), and I can reproduce the bug withset(0, 0, g)also. And this bug only applies toPGraphicsOpenGLinstances.hx2A commentedon Jul 31, 2026
I created a PR for this, it is running the checks.
#1557
Here is test code:
hx2A commentedon Jul 31, 2026
Other permutations of renderer type or graphics type don't experience the problem. The bug only appears when both the Sketch and the graphics object are
PGraphicsOpenGLinstances. The bug is triggered withbackground()orset().hx2A commentedon Jul 31, 2026
Awesome, thank you for merging @catilac
Next up, #1422
fix processing#1520 (processing#1557)