Re: Unable to determine Graphics Configuration. Am I setting up something wrong?
Posted by Electra on Feb 04, 2022; 9:17am
URL: https://forum.jogamp.org/Unable-to-determine-Graphics-Configuration-Am-I-setting-up-something-wrong-tp4041606p4041620.html
I only get the OOB issue on release 2.3.2, and not on release candidate 2.4
Thank you for providing a link to the source .zip. I've looked through using a debugger, and basically what seems to happen is
1) The "First Choice" of a desired PFD fails. This happens because Win32SunJDKReflection's "initialized" field is set to false, and so the default case where it returns null is triggered. I am assuming this is expected behavior and why the "Second Choice" exists, but I'm not sure.
2) The "Second Choice" obtains a list of AWT PFDs. There is only one element in this list.
3) When asking the system which PFD to pick, it does not return one that matches. Thus, the index is -1, and no configuration is selected.
I think I better understand what the previous error on 2.3.2 was, then. The index out of bounds error happens only when the graphics configuration would otherwise *not* be selected. So, it's still giving an error in both cases, just, in one case it fails early due to OOB and the other case it correctly realizes the index is wrong, but then fails due to no graphics config?
I guess this is why the "workaround" for both of these errors is hypothetically the same, to work around the OOB error you just avoid getting the null GC case and it won't happen?
Now if that *only* fires when its a null index, I could see that being an issue as getting a real index would *not* set the GC. Does this mean that the only way to work around this was to set the GC using the "First Choice"? Possibly this indicates that this fixed it by changing things around so that Win32SunJdkReflection was initialized?
I hope I am understanding this correctly.
I can try to look into the actual PFD selection thing later and see if I can figure out why that isn't returning a matching ID, but it looks very complicated so i'm not sure if I'll be able to figure out what's going on there.
Do you have an idea of what the flow here is expected to look like?
1) Is it expected that the PFD should generally / ideally be chosen in the "first case", or is this just an ideal case that rarely works? Is it expected that Win32SunJdkReflection is uninitialized?
2) Is the PFD selection supposed to be able to return an invalid PFD / PFD not in the list? Is this the intended behavior when the available PFD isn't sufficient or something?
Thank you for all your help.