Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1982: Negative Native Object Id Issue #2051

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andygibson
Copy link
Contributor

@andygibson andygibson commented Jul 27, 2023

Prototype that seems to solve the problem ( #1982) with negative numbers being a valid object id and an indicator of whether the id/object is valid or not. If interested, I can polish it up a bit.

The changes start in NativeObject, and most of the other changes are in response to those changes.

Prototype that seems to solve the problem with negative numbers being a
valid object id and an indicator of whether the id/object is valid or
not.
@riccardobl
Copy link
Member

This is probably the right way to resolve this issue, but it can be a breaking change for third party libraries that relies on getId() to be == INVALID_ID

@stephengold stephengold added this to the Future Release milestone Dec 13, 2023
return valid;
}

public boolean isInvalid() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose removing this method and using !isValid() whenever needed.
I think it's generally good practice to avoid "negative" method names.
WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right, and it's redundant anyway.

@neuweiler
Copy link
Contributor

neuweiler commented Jul 9, 2024

If this fix resolves this problem:
com.jme3.renderer.RendererException: Invalid ID (0) received when trying to create shader program. at com.jme3.renderer.opengl.GLRenderer.updateShaderData(GLRenderer.java:1595)

Is there any chance, this PR makes it into 3.7 ? Because 3.6.1 is currently not usable on a Mac

@stephengold
Copy link
Member

On behalf of the JMonkeyEngine project, I apologize for the delay and confusion.
@scenemax3d is release manager for v3.7.0; the decision to include a PR or not is up to him.
You could improve the odds by responding to his review (above) and resolving the merge conflict in BufferObject.java .

Regarding issue #1982, I use v3.6.1 on a Mac Mini M1 running Ventura 13.2.1 and have yet to encounter it.
I'm wondering if it is specific to a particular device driver.
Do you have a test that can reliably reproduce the issue on your system?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IllegalArgumentException in registerObject()
6 participants