Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6924319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:38:54+00:00 2026-05-27T10:38:54+00:00

I have some CAD software I’ve written. Each component being drawn has a set

  • 0

I have some CAD software I’ve written. Each component being drawn has a set of vertex buffer objects. If the component gets deleted, I have to free the vertex buffer objects in the finalize method such as:

    if (gl != null) {
        Integer[] keys = vbos.keySet().toArray(new Integer[0]);
        for (int i = 0; i < keys.length; i++) {
            Integer tmp = keys[i];
            if (tmp != null) {
                if (gl.glIsBufferARB(tmp.intValue()));
                gl.glDeleteBuffersARB(1, new int[]{tmp.intValue()}, 0);
            }
        }
    }

however I sometimes get a SIGSEV and JVM crash. The hs_err log file points to gl.glIsBufferArb(tmp.intValue()).

I believe this means my gl object is no longer valid?

It should have been still valid I think. The program was still operating up until the crash. Is there a way to free a glbuffer without having stored a reference to the GL object?

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T10:38:54+00:00Added an answer on May 27, 2026 at 10:38 am

    The most obvious issue you’re going to run into here is that an OpenGL context can only be referenced in the thread it is active in. Generally speaking this will be your rendering thread, which means that the OpenGL context will not be available in the JVM’s finalizer thread. That, to me, seems the most likely cause of your errors. I would recommend that you keep a global list of invalidated VBOs, and have the finalize method add ids to that list. You can then process that list periodically from your rendering threads, making the OpenGL calls necessary to actually delete the VBOs.

    You can find a quick rundown on OpenGL’s behavior in a multi-threaded environment here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some 3d models written in 3dmax/maya/cad/4dcinema , i wand to display them
I have some C# / asp.net code I inherited which has a textbox which
We have some files on our website that users of our software can download.
I am creating a CAD software in which I have a class point &
Have some validating problems which seem to appear only when using the Auth component.
I have some buffer and known size #define BUFFER_SIZE 1024*1024 char buffer[BUFFER_SIZE]; I must
I have some input checkboxes that are being dynamically generated in a $.post callback
I have some UI in VB 2005 that looks great in XP Style, but
I have some ASP.NET web services which all share a common helper class they
I have some code for starting a thread on the .NET CF 2.0: ThreadStart

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.