#I get Index -1 out of bounds for length 1 in JOGL

1 messages ยท Page 1 of 1 (latest)

summer path
torpid riverBOT
#

<@&987246487241105418> please have a look, thanks.

torpid riverBOT
# summer path

I uploaded your attachments as Gist. This makes them more accessible, for example to mobile users.

timid basin
#

What you need to know ?

summer path
#

how to solve that problem

timid basin
#

Do you understand the error ?

summer path
#

index -1 out of bounds

#

on that line ```java
frame.setVisible(true);

timid basin
#

Do you know why we are getting such an array ? In what occasions ?

summer path
#

i don't know

timid basin
#

Its really commond problem

#

Before will anyone help you i would suggest you to add there error handling for your sake

#

Oh its JOGL

summer path
#

lol

ruby agate
#

Is the error in your code or maybe in the library?
Maybe you added/removed some lines so the error shows on the wrong line. Try to rerun the code and reproduce the error

summer path
#

the error comes from frame.setVisible(true); from what line the jetbrain give me

ruby agate
# summer path the code compiled no problem

That your program compiles has nothing to do with this issue. I asked whether you may have added/removed some lines in your code, while the application was running. This could explain why it would show a different line number than where the real issue is. Because this line can't cause an array index out of bounds error per say in your code. So its either on a different line or an error inside a library where you may not have access to change something.

summer path
#

Haven't changed at all

ruby agate
#

Can you please show me whats on this line

#

And or the whole method

summer path
#

What is that. I never have this java file in my codebase

ruby agate
#

Because its in a library you are using

summer path
#

fair

#

I'll get that later

#

I'm trying to fix something [outside java]

torpid riverBOT
#

@summer path

Your question has been closed due to inactivity.

If it was not resolved yet, feel free to just post a message below
to reopen it, or create a new thread.

Note that usually the reason for nobody calling back is that your
question may have been not well asked and hence no one felt confident
enough answering.

When you reopen the thread, try to use your time to improve the quality
of the question by elaborating, providing details, context, all relevant code
snippets, any errors you are getting, concrete examples and perhaps also some
screenshots. Share your attempt, explain the expected results and compare
them to the current results.

Also try to make the information easily accessible by sharing code
or assignment descriptions directly on Discord, not behind a link or
PDF-file; provide some guidance for long code snippets and ensure
the code is well formatted and has syntax highlighting. Kindly read through
https://stackoverflow.com/help/how-to-ask for more.

With enough info, someone knows the answer for sure ๐Ÿ‘

summer path
#

.

worthy heart
#

@summer path change your GLCanvas to a GLJPanel and it will run.

#

GLJPanel canvas = new GLJPanel(caps); is all you need

summer path
#

I'll try that when I finish configuring my pc

summer path
#

1 is from swing?

worthy heart
#

afaik GLJPanel wraps a GLCanvas to work with swing.

#

I'm around if you have more JOGL questions.

#

currently trying to update one of my apps from gl2 to gl3, which means means all the shaders....

summer path
summer path
#

but what does newt do

worthy heart
#

with no context I can't answer that question.

#

come on, friend. help me help you ๐Ÿ™‚

summer path
#

lol