Fatal Error has been detected by the JVM

Im using Linux Mint 21.1 using KDE Plasma 5.24.7.

The errors happen at random, sometimes when the frameRate is over 300

Error reads the following:


#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f87c6633a00, pid=502, tid=552
#
# JRE version: OpenJDK Runtime Environment Temurin-17.0.6+10 (17.0.6+10) (build 17.0.6+10)
# Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.6+10 (17.0.6+10, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libnvidia-glcore.so.530.41.03+0x159ba00]
#
# Core dump will be written. Default location: Core dumps may be processed with "/lib/systemd/systemd-coredump %P %u %g %s %t 9223372036854775808 %h" (or dumping to /app/share/processing/core.502)
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid502.log

Sometimes it even says “Could not run sketch” even when it still does

int scrollx, scrolly;

void setup() {
  size(960, 720, P2D);
  windowTitle("Open Idea");
}

void draw() {
  background(#31363B);
  if (!focused) background(#2A2E32);

  for (int i = 0; i < 32; i++) line(0, i*(width/32), width, i*(width/32));
}

this is the code