processing / processing/processing4

Segmentation fault/non-working renderer (default, P2D, P3D)

Open
#1,547 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
494
Forks
183
Avg merge
4h 39m
Merged PRs (30d)
3

Description

Description

Graphics not updated correctly or segmentation fault, depending on which renderer is selected

Expected Behavior

Below code should just work fine (as it does with FX2D)

Current Behavior

  • graphics is not updated with default renderer size(300,200);
    It works fine if I comment out the noLoop()

  • Segmentation fault with P2D/P3D renderer size(300,200,P2D) (see below)
    when doing first key press

  • works just fine with size(300,200,FX2D);

Steps to Reproduce

void setup() {
  size(300, 200, P2D);
  noLoop();
}
void draw() {
}
void keyPressed() {
  background(255);
  text("x", 10, 10);
  redraw();
}

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fffa2222e31, pid=8425, tid=0x000000000000fc07
#
# JRE version: Java(TM) SE Runtime Environment (8.0_181-b13) (build 1.8.0_181-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.181-b13 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C  [libGL.dylib+0xe31]  glClearColor+0xd
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/foo/hs_err_pid8425.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Could not run the sketch (Target VM failed to initialize).
For more information, read revisions.txt and Help → Troubleshooting.

  1. type any key

Your Environment

  • Processing version: 3.4 (macOS), 3.3.7 (windows)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the sketch with the default, P2D, P3D, and FX2D renderers on the listed Processing versions, then inspect the reported hs_err_pid8425.log and problematic libGL.dylib frame. Done means noLoop() sketches update after the first key press and P2D/P3D no longer segfault.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, macos
Domain
computer-graphics, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.