How to find and eliminate memory leaks in LWJGL - memory

I'm getting a few memory leak errors in a LWJGL project:
[LWJGL] 16 bytes leaked, thread 10 (Thread-0), address: 0x1D40000
at org.lwjgl.system.Callback.create(Callback.java:133)
at org.lwjgl.system.Callback.<init>(Callback.java:83)
at org.lwjgl.glfw.GLFWKeyCallback.<init>(GLFWKeyCallback.java:58)
at InputHandeling.KeyboardHandler.<init>(KeyboardHandler.java:11)
at Core.RenderThread.init(RenderThread.java:118)
at Core.RenderThread.run(RenderThread.java:40)
[LWJGL] 1864 bytes leaked, thread 10 (Thread-0), address: 0x5D082700
at org.lwjgl.system.ThreadLocalUtil.setEnv(ThreadLocalUtil.java:164)
at org.lwjgl.opengl.GL.setCapabilities(GL.java:242)
at org.lwjgl.opengl.GL.createCapabilities(GL.java:467)
at org.lwjgl.opengl.GL.createCapabilities(GL.java:321)
at DisplayRenderEngine.DisplayManager.createDisplay(DisplayManager.java:71)
at Core.RenderThread.init(RenderThread.java:118)
at Core.RenderThread.run(RenderThread.java:40)
[LWJGL] 16 bytes leaked, thread 10 (Thread-0), address: 0x22B0000
at org.lwjgl.system.Callback.create(Callback.java:133)
at org.lwjgl.system.CallbackI.address(CallbackI.java:34)
at org.lwjgl.opengl.GLDebugMessageCallback.create(GLDebugMessageCallback.java:54)
at org.lwjgl.opengl.GLUtil.setupDebugMessageCallback(GLUtil.java:63)
at org.lwjgl.opengl.GLUtil.setupDebugMessageCallback(GLUtil.java:30)
at DisplayRenderEngine.DisplayManager.createDisplay(DisplayManager.java:72)
at Core.RenderThread.init(RenderThread.java:118)
at Core.RenderThread.run(RenderThread.java:40)
Is there a decent way to find out why these memory leaks happen? I'm not looking for you to fix me these errors but, rather, I'm looking for a general description for fixing these leaks?
Here is some more info(Provided by LWJGL) about my project if that helps:
[LWJGL] Version: 3.2.0 build 12
[LWJGL] OS: Windows 7 v6.1
[LWJGL] JRE: 1.8.0_151 amd64
[LWJGL] JVM: Java HotSpot(TM) 64-Bit Server VM v25.151-b12 by Oracle Corporation
[LWJGL] Loading library (system): lwjgl
[LWJGL] Found at: C:\Users\user\AppData\Local\Temp\lwjgluser\3.2.0-build-12\lwjgl.dll
[LWJGL] Loaded from org.lwjgl.librarypath: C:\Users\user\AppData\Local\Temp\lwjgluser\3.2.0-build-12\lwjgl.dll
[LWJGL] MemoryUtil accessor: MemoryAccessorUnsafe
[LWJGL] MemoryUtil allocator: DebugAllocator
[LWJGL] Loading library: glfw
[LWJGL] Found at: C:\Users\user\AppData\Local\Temp\lwjgluser\3.2.0-build-12\glfw.dll
[LWJGL] Loaded from org.lwjgl.librarypath: C:\Users\user\AppData\Local\Temp\lwjgluser\3.2.0-build-12\glfw.dll
[LWJGL] Loading library (system): lwjgl_opengl
[LWJGL] Found at: C:\Users\user\AppData\Local\Temp\lwjgluser\3.2.0-build-12\lwjgl_opengl.dll
[LWJGL] Loaded from org.lwjgl.librarypath: C:\Users\user\AppData\Local\Temp\lwjgluser\3.2.0-build-12\lwjgl_opengl.dll
[LWJGL] Loading library: opengl32
[LWJGL] opengl32.dll not found in org.lwjgl.librarypath=C:\Users\user\AppData\Local\Temp\lwjgluser\3.2.0-build-12
[LWJGL] Loaded from system paths: C:\Windows\system32\opengl32.dll
[LWJGL] [GL] Using KHR_debug for error logging.
[LWJGL] [GL] Warning: A non-debug context may not produce any debug output.

Related

how do I disable wlan0 hard block from rfkill

there are very similar questions to this one but all of them are solved by disabling some other wifi source by using modprobe and then reseting rfkill
in my case:
artixlinux:[rail]:/etc/modprobe.d$ rfkill list all
0: phy0: Wireless LAN
Soft blocked: no
Hard blocked: yes
and with nmcli:
wlan0: unavailable
"Qualcomm Atheros AR9485"
wifi (ath9k), 5A:9D:61:C0:BB:F0, sw disabled, hw, mtu 1500
I've already tried to modprobe ath9k but that does nothing
hardware:
[System]
OS: Artix Linux 20220123 n/a
Arch: x86_64
Kernel: 5.18.0-zen1-1-zen
Desktop: KDE
Display Server: x11
[CPU]
Vendor: GenuineIntel
Model: Intel(R) Core(TM) i3-3227U CPU # 1.90GHz
Physical cores: 2
Logical cores: 4
[Memory]
RAM: 3.7 GB
Swap: 0.0 GB
[Graphics]
Vendor: Intel
OpenGL Renderer: Mesa Intel(R) HD Graphics 4000 (IVB GT2)
OpenGL Version: 4.2 (Compatibility Profile) Mesa 22.2.0-devel (git-3e679219a1)
OpenGL Core: 4.2 (Core Profile) Mesa 22.2.0-devel (git-3e679219a1)
OpenGL ES: OpenGL ES 3.0 Mesa 22.2.0-devel (git-3e679219a1)
Vulkan: Supported
See https://askubuntu.com/a/98719
"Hard blocked" cannot be changed by software, look for a wifi toggle on your keyboard or edges of the laptop; the device can also be hard blocked if disabled in the bios.
And:
https://askubuntu.com/questions/98702/how-to-unblock-something-listed-in-rfkill#comment618926_98719
FYI hard block also happens when the wifi is disabled in the bios.

Not able to load .net DLL targeted for 64-bit platform only

Below is the exception being thrown:
com.javonet.api.NException: Could not load file or assembly 'file:///C:\downloads\UrlNomalization\Microsoft.Bing.HashUtil.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
at System.Reflection.RuntimeAssembly._nLoad(Unknown Source)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(Unknown Source)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(Unknown Source)
at System.Reflection.Assembly.LoadFrom(Unknown Source)
at SicsClrController.Engine.ClrEngine.LoadAssembly(Unknown Source)
at SicsClrController.Engine.ClrEngine.processCommand(Unknown Source)
at com.javonet.internal.BinaryStreamProtocol.executeCommand(Unknown Source)
at com.javonet.internal.GatewayManager.loadAssembly(Unknown Source)
at com.javonet.Javonet.<clinit>(Unknown Source)
at Hello.main(Hello.java:20)
My system settings:
IntelliJ IDEA 2020.2.2 (Ultimate Edition)
Build #IU-202.7319.50, built on September 14, 2020
Licensed to IntelliJ IDEA Evaluator
Expiration date: October 25, 2020
Runtime version: 11.0.8+10-b944.31 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1971M
Cores: 8
Actually, my .net dll was blocked (since came from 3rd party) by windows, unblocking this file solved the issue.

How can we fix the Azure DevOps SonarQube error: Class path contains multiple SLF4J bindings

Since upgrading from SonarQube 7.x to 8, the scans have stopped working. The Build task Run Code Analysis seems to succeed with several errors like:
Calling the SonarQube Scanner...
INFO: Scanner configuration file: D:\agent6\_work\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.8.0\classic-sonar-scanner-msbuild\sonar-scanner-4.1.0.1829\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: D:\agent6\_work\1\.sonarqube\out\sonar-project.properties
INFO: SonarQube Scanner 4.1.0.1829
INFO: Java 1.8.0_181 Oracle Corporation (64-bit)
INFO: Windows Server 2016 10.0 amd64
INFO: User cache: C:\Windows\ServiceProfiles\NetworkService\.sonar\cache
INFO: SonarQube server 8.0.0
INFO: Default locale: "en_GB", source code encoding: "windows-1252" (analysis is platform dependent)
##[error]SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Windows/ServiceProfiles/NetworkService/.sonar/cache/6abbcd30a9bf1fba1794eb6ce16eb36f/scanner-developer-8.0-all.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Windows/ServiceProfiles/NetworkService/.sonar/cache/6abbcd30a9bf1fba1794eb6ce16eb36f/scanner-developer-8.0-all.jar!/org/slf4j/impl/StaticLoggerBinder.class]
##[error]SLF4J: Found binding in [jar:file:/C:/Windows/ServiceProfiles/NetworkService/.sonar/cache/9f2b37948b00b865aaf57dfd335e8d6a/sonar-scanner-engine-shaded-8.0-all.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Found binding in [jar:file:/C:/Windows/ServiceProfiles/NetworkService/.sonar/cache/9f2b37948b00b865aaf57dfd335e8d6a/sonar-scanner-engine-shaded-8.0-all.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
##[error]SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
WARN: SonarScanner will require Java 11+ to run starting in SonarQube 8.x
It eventually ends with
INFO: SCM writing changed lines (done) | time=172ms
INFO: Analysis report generated in 1813ms, dir size=2 MB
INFO: Analysis report compressed in 8453ms, zip size=1 MB
INFO: Analysis report uploaded in 109ms
INFO: ANALYSIS SUCCESSFUL, you can browse https://server/sonarqube/dashboard?id=MercuryNew&pullRequest=568
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report INFO: More about the report processing at https://server/sonarqube/api/ce/task?id=AW7u_AxnikdkBhrYNw3V
INFO: Analysis total time: 1:19.860 s
INFO: EXECUTION SUCCESS
INFO: Total time: 1:21.750s
INFO: Final Memory: 77M/2590M
INFO: ------------------------------------------------------------------------
The SonarQube Scanner has finished
My java version is: "1.8.0_181" and the scanner configuration contains: wrapper.java.command=C:\Program Files\Java\jdk-12.0.1\bin\java
Has anyone encountered this? Is this a configuration issue or a JAVA version issue? How can I fix the scan errors?
There's another question about this, but in this case I have a brand new install.
From Sonarqube:
Deleting the errant sonar-scanner-engine-shaded-8.0-all.jar in the lib\scanner folder solved the problem.

How to fix SIGSEGV which prevents MVC application running in Mono

ASP.NET MVC application is installed in Debian server using Apache and mod_mono.
Trying to start it causes SIGSEGV exception in Mono. Apache error.log contains
[Wed Mar 06 22:07:13 2019] [notice] Apache/2.2.22 (Debian) mod_mono/3.12 configured -- resuming normal operations
Listening on: /tmp/.mod_mono_server4
Root directory: /
Stacktrace:
[Wed Mar 06 22:07:35 2019] [error] (70014)End of file found: read_data failed
[Wed Mar 06 22:07:35 2019] [error] Command stream corrupted, last command was 1
Listening on: /tmp/.mod_mono_server4
Root directory: /
Stacktrace:
Native stacktrace:
/usr/bin/mono() [0x4accca]
/usr/bin/mono() [0x5040fe]
/usr/bin/mono() [0x4275d7]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf0a0) [0x7f47845d30a0]
/usr/bin/mono() [0x47aad9]
/usr/bin/mono() [0x50fcb8]
/usr/bin/mono() [0x510253]
/usr/bin/mono() [0x425efc]
/usr/bin/mono() [0x4af809]
/usr/bin/mono() [0x4b0117]
[0x411fe68c]
Debug info from gdb:
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
How to fix this so that application can run ?
Same server also contains other application created with older ASP.NET MVC which runs OK.
Mono was installed using Debian package:
mono --version
Mono JIT compiler version 4.6.2 (Stable 4.6.2.7/08fd525 Mon Nov 14 12:30:00 UTC 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: sgen

Xcode simulator not working error - could not load inserted library '/usr/lib/libignitor2.dylib' because no suitable image found

Updated my xcode this evening to 7.2.1 im running on yosemite 10.10.5
i've just started learning swift, and everytime i try to run the simulator it crashes with the error:
could not load inserted library '/usr/lib/libignitor2.dylib' because no suitable image found.
I have spent the last 4 hours searching online, there seems to be a few similar errors of inserted library missing but nothing that i can see that helps with this error. The full code can be seen below.
Process: Simulator [2907]
Path: /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator
Identifier: com.apple.iphonesimulator
Version: 9.2 (643)
Build Info: Indigo-643000000000000~28
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Simulator [2907]
User ID: 501
Date/Time: 2016-09-10 03:00:48.102 +0100
OS Version: Mac OS X 10.10.5 (14F1912)
Report Version: 11
Anonymous UUID: 1ACB9325-E877-4FA4-FEBD-B9450D15E13A
Time Awake Since Boot: 10000 seconds
Crashed Thread: 0
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Application Specific Information:
dyld: launch, loading dependent libraries
DYLD_INSERT_LIBRARIES=/usr/lib/libignitor2.dylib
Dyld Error Message:
could not load inserted library '/usr/lib/libignitor2.dylib' because no suitable image found. Did find:
/usr/lib/libignitor2.dylib: mmap() error 1 at address=0x107DE9000, size=0x00001000 segment=__TEXT in Segment::map() mapping /usr/lib/libignitor2.dylib
Binary Images:
0x107da0000 - 0x107dccff7 com.apple.iphonesimulator (9.2 - 643) <2A577F90-517C-3363-A980-EEB79D21FEBF> /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator
0x7fff65635000 - 0x7fff6566b92f dyld (353.2.4) <708E385E-50C6-32A3-983C-42E97BEE4346> /usr/lib/dyld
Model: MacBookPro12,1, BootROM MBP121.0167.B14, 2 processors, Intel Core i5, 2.7 GHz, 16 GB, SMC 2.28f7
Graphics: Intel Iris Graphics 6100, Intel Iris Graphics 6100, Built-In
Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1867 MHz, 0x02FE, 0x4544464232333241314D412D4A442D460000
Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1867 MHz, 0x02FE, 0x4544464232333241314D412D4A442D460000
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x133), Broadcom BCM43xx 1.0 (7.15.166.24.3)
Bluetooth: Version 4.3.6f3 16238, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SM0128G, 121.33 GB
USB Device: Internal Memory Card Reader
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 27.1
Any help would be appreciated. thanks
You could try
sudo update_dyld_shared_cache -force
I'm trying to fix my beta but it appears to be trying to get after an update and this is the solution I"m working with. If it fails you can try
https://apple.stackexchange.com/questions/217232/trying-to-force-update-dyld-shared-cache-but-having-some-errors
I hope this is helpful

Resources