LWJGL Forum

Please login or register.

Login with username, password and session length
Pages: 1 [2]

Author Topic: [Solved] Errors when using newer version of LWJGL 3  (Read 353 times)

spasi

  • Administrator
  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 1820
Re: Errors when using newer version of LWJGL 3
« Reply #15 on: July 09, 2017, 20:27:03 »

Ouch. That shouldn't happen.

First thing we can try is earlier jemalloc versions. Could you please try jemalloc.dylib from the LWJGL 3.1.0 and 3.1.1 releases? You can download it from here, using the "Click to browse..." functionality. Use -Dorg.lwjgl.system.jemalloc.libname=<path_to_jemalloc.dylib> to override the library to load and -Dorg.lwjgl.util.DebugLoader=true to verify that the correct one is being loaded.

If you could also share a minimal program that reproduces the issue, it would be very useful.
Logged

bobjob

  • Prolific Timewaster
  • ****
  • Offline Offline
  • Posts: 393
  • LWJGL: WOW SO GOOD
Re: Errors when using newer version of LWJGL 3
« Reply #16 on: July 10, 2017, 08:01:11 »

I downloaded the dylib files via browsing from the download page:

3.1.2
Code: [Select]
[LWJGL] MemoryUtil accessor: MemoryAccessorUnsafe
[LWJGL] Loading library: /Volumes/Backup/lwjgl/3.1.2/libjemalloc.dylib
[LWJGL] Success
[LWJGL] MemoryUtil allocator: JEmallocAllocator
I can confirm the bug.

3.1.1
Code: [Select]
[LWJGL] Loading library: /Volumes/Backup/lwjgl/3.1.1/libjemalloc.dylib
[LWJGL] Success
[LWJGL] MemoryUtil allocator: JEmallocAllocator
I could NOT confirm the bug exists.

3.1.0
Code: [Select]
[LWJGL] Loading library: /Volumes/Backup/lwjgl/3.1.0/libjemalloc.dylib
[LWJGL] Success
[LWJGL] MemoryUtil allocator: JEmallocAllocator
I also could NOT observe the bug with this version

I will attempt to create a small program that that loads and unloads 2 seperate font files one on the main thread while the other loads on a background thread (both looping) to try reproduce the error.
Logged

bobjob

  • Prolific Timewaster
  • ****
  • Offline Offline
  • Posts: 393
  • LWJGL: WOW SO GOOD
Re: Errors when using newer version of LWJGL 3
« Reply #17 on: July 10, 2017, 10:11:03 »

I was able to produce a simple program that loads 2 fonts at the same time.

Quote
Hardware Overview:

  Model Name:   MacBook Pro
  Model Identifier:   MacBookPro12,1
  Processor Name:   Intel Core i5
  Processor Speed:   2.7 GHz
  Number of Processors:   1
  Total Number of Cores:   2
  L2 Cache (per Core):   256 KB
  L3 Cache:   3 MB
  Memory:   8 GB
  Boot ROM Version:   MBP121.0167.B24
  SMC Version (system):   2.28f7

The error would only occur when using the 3.1.2 version of jemalloc

Please note: this zip contains two ttf (font) files. It is a heavily stripped down version of my code. if its not clean enough I should be able to add comments and fix it. All of the relevant code should be in Program.java file and the draw2DOverlay() method body (inside Program.java)
Logged

spasi

  • Administrator
  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 1820
Re: Errors when using newer version of LWJGL 3
« Reply #18 on: July 10, 2017, 19:18:50 »

Minor status update: I have reproduced it (only on macOS with jemalloc 3.1.2). Will post again when I have a better understanding of the issue.
Logged

spasi

  • Administrator
  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 1820
Re: Errors when using newer version of LWJGL 3
« Reply #19 on: July 10, 2017, 21:35:11 »

Looks like building jemalloc without --enable-tls and --enable-lazy-lock fixes it.
Logged

spasi

  • Administrator
  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 1820
Re: Errors when using newer version of LWJGL 3
« Reply #20 on: July 21, 2017, 19:58:41 »

Sorry for the delay, 3.1.3 #5 is now available with a, hopefully, fixed jemalloc build. Could you please give it a try?
Logged

bobjob

  • Prolific Timewaster
  • ****
  • Offline Offline
  • Posts: 393
  • LWJGL: WOW SO GOOD
Re: Errors when using newer version of LWJGL 3
« Reply #21 on: July 22, 2017, 06:39:59 »

Brilliant, I was not able to observe the bug in that latest version.

Thanks spasi. Im always impressed by the way you have a nack for fixing code.
Logged
Pages: 1 [2]