LWJGL Forum

Please login or register.

Login with username, password and session length

Author Topic: stbi_load() sending error for unknown reason  (Read 149 times)

Just_A_Fork

  • Newbie
  • *
  • Offline Offline
  • Posts: 2
stbi_load() sending error for unknown reason
« on: September 11, 2017, 02:38:44 »

I don't know why but keep getting this error (hs_err_pid6886.log) from java every time I run Main. if I comment it out it doesn't send the error if I comment it out so I'm pretty sure it's the problem. I think it might be a memory leak but if so I have no clue on how to fix it

note that I am using a mac to write this and I want it to be able to run on a mac. also, I am very new to lwjgl though I do have a little experience with c++ but only messing around.
Logged

spasi

  • Administrator
  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 1851
Re: stbi_load() sending error for unknown reason
« Reply #1 on: September 11, 2017, 06:52:47 »

IntBuffer.allocate is being used in Sprite.java, which creates an IntBuffer backed by a Java heap array. This is not supported in LWJGL, off-heap buffers are required. Please read the Memory FAQ for more details and the recommended allocation strategies.
Logged

Cornix

  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 468
Re: stbi_load() sending error for unknown reason
« Reply #2 on: September 11, 2017, 09:17:26 »

There are a lot of threads all with the same problem recently. Would it be possible to detect such a situation programmatically within LWJGL3 and print an appropriate error message?
Logged

spasi

  • Administrator
  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 1851
Re: stbi_load() sending error for unknown reason
« Reply #3 on: September 11, 2017, 10:50:53 »

This error, and many more, are covered by LWJGLX/debug.
Logged

Cornix

  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 468
Re: stbi_load() sending error for unknown reason
« Reply #4 on: September 11, 2017, 13:17:34 »

Well, in that case I guess its just laziness.
Logged

spasi

  • Administrator
  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 1851
Re: stbi_load() sending error for unknown reason
« Reply #5 on: September 11, 2017, 15:03:00 »

What is lazy exactly?
Logged

Cornix

  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 468
Re: stbi_load() sending error for unknown reason
« Reply #6 on: September 11, 2017, 15:03:45 »

I meant laziness from the users who rather ask in the forums instead of using the Debug build to find out what went wrong immediately.

There isnt much you can do about lazy users.
Logged

Just_A_Fork

  • Newbie
  • *
  • Offline Offline
  • Posts: 2
Re: stbi_load() sending error for unknown reason
« Reply #7 on: September 11, 2017, 17:28:52 »

IntBuffer.allocate is being used in Sprite.java, which creates an IntBuffer backed by a Java heap array. This is not supported in LWJGL, off-heap buffers are required. Please read the Memory FAQ for more details and the recommended allocation strategies.

thank you so much it's working well now
Logged