GL_FRAMEBUFFER ERROR crash

Hi, Over a year ago I asked the forum about an error message when moving from OpenJFX11 to OpenJFX13. No one seemed to know what could lead to the error, so I reported it as a bug to the OpenJFX community, but nothing seems to have been done.

Recently OpenJFX17.0.1 was released as a long term LTS version, and the problem still exists. I am therefore hoping to address the problem from the other end, however I do not really know where this error message is originating in the display system. The error message is as follows:

Incomplete attachment. (GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT)(FBO - 820) Error creating framebuffer object with TexID 1)

The call stack immediately prior to the crash is as follows:

mouseEvent:2591, Scene$ScenePeerListener (javafx.scene)
run:409, GlassViewEventHandler$MouseEventNotification (com.sun.javafx.tk.quantum)
run:299, GlassViewEventHandler$MouseEventNotification (com.sun.javafx.tk.quantum)
doPrivileged:-1, AccessController (java.security)
lambda$handleMouseEvent$2:447, GlassViewEventHandler (com.sun.javafx.tk.quantum)
get:-1, 2067987277 (com.sun.javafx.tk.quantum.GlassViewEventHandler$$Lambda$812)
runWithoutRenderLock:412, QuantumToolkit (com.sun.javafx.tk.quantum)
handleMouseEvent:446, GlassViewEventHandler (com.sun.javafx.tk.quantum)
handleMouseEvent:556, View (com.sun.glass.ui)
notifyMouse:942, View (com.sun.glass.ui)
_runLoop:-1, GtkApplication (com.sun.glass.ui.gtk)
lambda$runLoop$11:277, GtkApplication (com.sun.glass.ui.gtk)
run:-1, 1159114532 (com.sun.glass.ui.gtk.GtkApplication$$Lambda$115)
run:834, Thread (java.lang)

My problem is that I do not know who else to ask regarding which components in the OS or the Java stack could be originating the problem that leads to this error message.

Any ideas would be very welcome.

I have updated the snap build since this problem first appeared butthe error is identical to the previous version. My current snapcraft.yaml is as follows:

name: photonotebook
title: PhotoNoteBook
version: "1.4.2"
summary: A digital photography library manager and notebook 
license: Proprietary
description: PhotoNoteBook is a digital photograph library manager enabling collections of images and the making of notes and memo's for the collections and the photographs. 
icon: photonotebook.png 

confinement: strict
grade: stable
base: core20 

# this line enables LZO compression for the snap and speed up first start time - hopefully!
compression: lzo
 
apps:
  photonotebook:
    command: bin/photonotebook
    extensions:
      - gnome-3-38
    plugs: [home, unity7,  opengl, network, removable-media, optical-drive ,desktop, desktop-legacy, gsettings, x11, wayland]
     
parts:
  photonotebook:
    plugin: dump
    source: ./photonotebook/
    stage-packages: [libgif7, liblcms2-2]

Many thanks in advance

Alan

Following further investigations into this issue, I have found a work-around that may be of use to others.

I got a hint of the work-around by setting up the following debug options on the jvm call:

-Djavafx.verbose=true -Djavafx.debug=true -Dprism.verbose=true -Dprism.debug=true -Dquantum.verbose=true -Dquantum.debug=true -Dquantum.pulsedebug=true -Dprism.order=sw 

running the App I saw the following crash:

PC.removeDirtyScene:  scene: 1596154225 @ (-1,-1)
PC.removeDirtyScene:  scene: 1596154225 @ (-1,-1)
PC.removeDirtyScene:  scene: 1596154225 @ (-1,-1)
PC.removeDirtyScene:  scene: 1596154225 @ (-1,-1)
PC.addDirtyScene: 12225757175188 scene: 1596154225 @ (-1,-1)
QT.postPulse@(12225760218463): TAPN
PC.addDirtyScene: 12225781351419 scene: 1596154225 @ (-1,-1)
PC.addDirtyScene: 12225781509215 scene: 1596154225 @ (-1,-1)
PC.addDirtyScene: 12225782656044 scene: 1596154225 @ (-1,-1)
QT.endPulse: 12225782846730
java.lang.IllegalArgumentException: WIDTH must be positive
    at javafx.graphics/com.sun.pisces.AbstractSurface.<init>(Unknown Source)
    at javafx.graphics/com.sun.pisces.JavaSurface.<init>(Unknown Source)
    at javafx.graphics/com.sun.prism.sw.SWRTTexture.<init>(Unknown Source)
    at javafx.graphics/com.sun.prism.sw.SWResourceFactory.createRTTexture(Unknown Source)
    at javafx.graphics/com.sun.prism.sw.SWResourceFactory.createRTTexture(Unknown Source)
    at javafx.graphics/com.sun.javafx.tk.quantum.UploadingPainter.run(Unknown Source)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
    at javafx.graphics/com.sun.javafx.tk.RenderJob.run(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)
QT.postPulse@(12225783499118): TaPN
PC.addDirtyScene: 12225786804608 scene: 1596154225 @ (-1,-1)
QT.endPulse: 12225786976417

which got me thinking that if I set the stage size after loading the scene but before calling stage.show() the “java.lang.IllegalArgumentException: WIDTH must be positive” crash wudl not happen and this could solve the problem e.g.

Stage mPrimaryStage ;

  mPrimaryStage.setScene(mScene);

ScreenUtils screenUtils = new ScreenUtils();
        double minX = screenUtils.getMinX();
        double minY = screenUtils.getMinY();
        double height = screenUtils.getScreenHeight();
        double width = screenUtils.getScreenWidth();

        mPrimaryStage.setX(minX);
        mPrimaryStage.setY(minY);

        mPrimaryStage.setWidth(width);
        mPrimaryStage.setHeight(height);
        mPrimaryStage.show();

(ScreenUtils is a utility I wrote to determine screen parameters)

And yes it works, and the errors “Incomplete attachment. (GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT)(FBO - 820)” and “Error creating framebuffer object with TexID 1)” are no longer reported.

This work-around has been reported to OpenJDK bug report JDK-8258601 .

cheers Alan