Java games constantly crash. Edit: Ran memtest again and it failed.

I've been playing two video games that use Java: Starsector and Haven & Hearth.
Of the two games Haven & Hearth tends to crash more frequently, between 2 minutes and hours of gaming.

Here are their respective forum topics where I've tried to look for fixes and their crash logs:
Starsector
https://fractalsoftworks.com/forum/index.php?topic=17614.msg277292#msg277292
Java crash logs:

Haven & Hearth
http://www.havenandhearth.com/forum/viewtopic.php?f=47&t=67075&sid=077f60ffd2842e9415fe210cde7affe1
Java crash logs:

Here's what I did to narrow down possible causes:
Removed all installed java packages, ran pacman -Sc, and installed the java packages again.
For Starsector I've tried running it with java-7-openjdk/jre and 8. I didn't notice any improvements. Haven & Hearth seems to only run on java-8-openjdk/jre.
Ran memtest a couple of times and both of them passed.
Installed a brand new power supply.
Ran/tested both games on two drives and I didn't notice a difference in the frequency of crashes.
Lowered the graphic settings on both games and I didn't notice a difference in the frequency of crashes.
I tried to install Oracle's JDK 11, but I don't think I did it correctly.

I run both games on windowed fullscreen and I frequently alt-tab out. I have a minor suspicion that if didn't tab out so frequently the games might not crash so often, but then I alt-tab on other games just fine and don't experience crashes.
I don't think it is the cause of the crashes but maybe when I did this I screwed up Java.

The developers of the two games both came to the conclusion that my system is the cause of the crashes.
I've run out of ideas on how to troubleshoot the problem other than to ask here and maybe on Oracle's website.

$ inxi -Fxxxz
System:    Host: satjwu-pc Kernel: 4.19.101-1-MANJARO x86_64 bits: 64 compiler: gcc v: 9.2.0 Desktop: KDE Plasma 5.17.5 
           tk: Qt 5.14.1 wm: kwin_x11 dm: SDDM Distro: Manjaro Linux 
Machine:   Type: Desktop Mobo: ASRock model: AB350 Pro4 serial: <filter> UEFI: American Megatrends v: P5.40 date: 12/19/2018 
CPU:       Topology: 8-Core model: AMD Ryzen 7 1700 bits: 64 type: MT MCP arch: Zen rev: 1 L2 cache: 4096 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 124559 
           Speed: 1973 MHz min/max: 1550/3900 MHz boost: enabled Core speeds (MHz): 1: 2888 2: 2453 3: 3855 4: 3769 5: 3374 
           6: 3401 7: 3226 8: 3227 9: 3238 10: 3214 11: 1557 12: 1556 13: 3170 14: 3347 15: 1556 16: 1556 
Graphics:  Device-1: NVIDIA TU106 [GeForce RTX 2070 Rev. A] vendor: eVga.com. driver: nvidia v: 440.59 bus ID: 26:00.0 
           chip ID: 10de:1f07 
           Display: x11 server: X.Org 1.20.7 driver: nvidia compositor: kwin_x11 resolution: 1920x1080~60Hz 
           OpenGL: renderer: GeForce RTX 2070/PCIe/SSE2 v: 4.6.0 NVIDIA 440.59 direct render: Yes 
Audio:     Device-1: NVIDIA TU106 High Definition Audio vendor: eVga.com. driver: snd_hda_intel v: kernel bus ID: 26:00.1 
           chip ID: 10de:10f9 
           Device-2: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: ASRock driver: snd_hda_intel v: kernel 
           bus ID: 28:00.3 chip ID: 1022:1457 
           Device-3: Focusrite-Novation Scarlett Solo USB type: USB driver: snd-usb-audio bus ID: 5-3:5 chip ID: 1235:8205 
           Sound Server: ALSA v: k4.19.101-1-MANJARO 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASRock driver: r8168 v: 8.048.00-NAPI 
           port: d000 bus ID: 25:00.0 chip ID: 10ec:8168 
           IF: enp37s0 state: up speed: 100 Mbps duplex: half mac: <filter> 
Drives:    Local Storage: total: 2.63 TiB used: 1.12 TiB (42.6%) 
           ID-1: /dev/nvme0n1 vendor: Intel model: SSDPEKNW010T8 size: 953.87 GiB speed: 31.6 Gb/s lanes: 4 serial: <filter> 
           rev: 002C scheme: GPT 
           ID-2: /dev/sda vendor: Western Digital model: WD1002FAEX-00Z3A0 size: 931.51 GiB speed: 6.0 Gb/s serial: <filter> 
           rev: 1D05 scheme: MBR 
           ID-3: /dev/sdb vendor: Crucial model: CT500MX500SSD4 size: 465.76 GiB speed: 6.0 Gb/s serial: <filter> rev: 022 
           scheme: GPT 
           ID-4: /dev/sdc vendor: Micron model: C400-MTFDDAK128MAM size: 119.24 GiB speed: 6.0 Gb/s serial: <filter> rev: 0609 
           scheme: GPT 
           ID-5: /dev/sdd vendor: Patriot model: Pyro SE size: 111.79 GiB speed: 6.0 Gb/s serial: <filter> rev: BBF0 
           scheme: GPT 
           ID-6: /dev/sde vendor: Intel model: SSDSC2CW120A3 size: 111.79 GiB speed: 6.0 Gb/s serial: <filter> rev: 400i 
           scheme: GPT 
Partition: ID-1: / size: 105.19 GiB used: 34.26 GiB (32.6%) fs: ext4 dev: /dev/dm-0 
           ID-2: /home size: 457.45 GiB used: 140.92 GiB (30.8%) fs: ext4 dev: /dev/dm-2 
           ID-3: swap-1 size: 4.00 GiB used: 98.8 MiB (2.4%) fs: swap dev: /dev/dm-1 
Sensors:   System Temperatures: cpu: 29.9 C mobo: 23.0 C gpu: nvidia temp: 30 C 
           Fan Speeds (RPM): fan-1: 580 fan-2: 898 fan-3: 0 fan-4: 726 fan-5: 0 gpu: nvidia fan: 0% 
           Voltages: 12v: N/A 5v: N/A 3.3v: 3.34 vbat: 3.23 
Info:      Processes: 412 Uptime: 1d 16h 34m Memory: 15.66 GiB used: 6.71 GiB (42.8%) Init: systemd v: 242 Compilers: 
           gcc: 9.2.0 Shell: bash v: 5.0.11 running in: konsole inxi: 3.0.37

Some output from the terminal when Haven & Hearth crashed:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f6771c4169b, pid=19828, tid=0x00007f672c3e6700
#
# JRE version: OpenJDK Runtime Environment (8.0_242-b08) (build 1.8.0_242-b08)
# Java VM: OpenJDK 64-Bit Server VM (25.242-b08 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libc.so.6+0xa869b]  memcpy+0x1b
#
# Core dump written. Default location: /home/satjwu/amber-1.75.1/core or core.19828
#
# An error report file with more information is saved as:
# /home/satjwu/amber-1.75.1/hs_err_pid19828.log
[thread 140081028392704 also had an error]
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
./run.sh: line 2: 19828 Aborted                 (core dumped) java -Djogl.disable.opengles=true -Xss1024k -Xms512m -Xmx1024m -jar hafen.jar -U https://game.havenandhearth.com/hres/ game.havenandhearth.com



1.75.1.f1839648
Linux 4.19.99-1-MANJARO, 1.8.0_242 amd64
NVIDIA Corporation (GeForce RTX 2070/PCIe/SSE2) - 4.6.0 NVIDIA 440.44

java.lang.NullPointerException
	at haven.GLState$Buffer.adjust(GLState.java:292)
	at haven.GLState$Buffer.copy(GLState.java:232)
	at haven.RenderList.add(RenderList.java:238)
	at haven.GLState$Wrapping.setup(GLState.java:862)
	at haven.RenderList.setup(RenderList.java:170)
	at haven.RenderList.add(RenderList.java:247)
	at haven.MapMesh.setup(MapMesh.java:650)
	at haven.RenderList.setup(RenderList.java:170)
	at haven.RenderList.add(RenderList.java:247)
	at haven.MapView$2.setup(MapView.java:586)
	at haven.RenderList.setup(RenderList.java:170)
	at haven.RenderList.add(RenderList.java:247)
	at haven.MapView.setup(MapView.java:997)
	at haven.PView$1.setup(PView.java:206)
	at haven.RenderList.setup(RenderList.java:170)
	at haven.RenderList.setup(RenderList.java:197)
	at haven.PView.draw(PView.java:230)
	at haven.MapView.draw(MapView.java:1428)
	at haven.Widget.draw(Widget.java:726)
	at haven.Widget.draw(Widget.java:731)
	at haven.GameUI.draw(GameUI.java:770)
	at haven.Widget.draw(Widget.java:726)
	at haven.Widget.draw(Widget.java:731)
	at haven.RootWidget.draw(RootWidget.java:67)
	at haven.UI.draw(UI.java:144)
	at haven.HavenPanel.rootdraw(HavenPanel.java:345)
	at haven.HavenPanel.run(HavenPanel.java:641)
	at java.lang.Thread.run(Thread.java:748)

	
	
	
	1.75.1.f1839648
Linux 4.19.99-1-MANJARO, 1.8.0_242 amd64
NVIDIA Corporation (GeForce RTX 2070/PCIe/SSE2) - 4.6.0 NVIDIA 440.44

java.lang.ArrayIndexOutOfBoundsException
	at haven.GLState$Buffer.copy(GLState.java:233)
	at haven.GLState$Applier.set(GLState.java:516)
	at haven.RenderList.render(RenderList.java:492)
	at haven.PView.draw(PView.java:261)
	at haven.MapView.draw(MapView.java:1428)
	at haven.Widget.draw(Widget.java:726)
	at haven.Widget.draw(Widget.java:731)
	at haven.GameUI.draw(GameUI.java:770)
	at haven.Widget.draw(Widget.java:726)
	at haven.Widget.draw(Widget.java:731)
	at haven.RootWidget.draw(RootWidget.java:67)
	at haven.UI.draw(UI.java:144)
	at haven.HavenPanel.rootdraw(HavenPanel.java:345)
	at haven.HavenPanel.run(HavenPanel.java:641)
	at java.lang.Thread.run(Thread.java:748)

	
	
	1.75.1.f1839648
Linux 4.19.99-1-MANJARO, 1.8.0_242 amd64
NVIDIA Corporation (GeForce RTX 2070/PCIe/SSE2) - 4.6.0 NVIDIA 440.44

java.lang.NullPointerException
	at haven.GLState$Buffer.adjust(GLState.java:292)
	at haven.GLState$Buffer.copy(GLState.java:232)
	at haven.RenderList.add(RenderList.java:205)
	at haven.RenderList.add(RenderList.java:233)
	at haven.MapView$2.setup(MapView.java:595)
	at haven.RenderList.setup(RenderList.java:170)
	at haven.RenderList.add(RenderList.java:247)
	at haven.MapView.setup(MapView.java:997)
	at haven.PView$1.setup(PView.java:206)
	at haven.RenderList.setup(RenderList.java:170)
	at haven.RenderList.setup(RenderList.java:197)
	at haven.PView.draw(PView.java:230)
	at haven.MapView.draw(MapView.java:1428)
	at haven.Widget.draw(Widget.java:726)
	at haven.Widget.draw(Widget.java:731)
	at haven.GameUI.draw(GameUI.java:770)
	at haven.Widget.draw(Widget.java:726)
	at haven.Widget.draw(Widget.java:731)
	at haven.RootWidget.draw(RootWidget.java:67)
	at haven.UI.draw(UI.java:144)
	at haven.HavenPanel.rootdraw(HavenPanel.java:345)
	at haven.HavenPanel.run(HavenPanel.java:641)
	at java.lang.Thread.run(Thread.java:748)

	
	
	1.75.1.f1839648
Linux 4.19.99-1-MANJARO, 1.8.0_242 amd64
NVIDIA Corporation (GeForce RTX 2070/PCIe/SSE2) - 4.6.0 NVIDIA 440.44

java.lang.NullPointerException
	at haven.Gob.ctick(Gob.java:230)
	at haven.OCache.ctick(OCache.java:115)
	at haven.Glob.ctick(Glob.java:149)
	at haven.HavenPanel.run(HavenPanel.java:630)
	at java.lang.Thread.run(Thread.java:748)
	
	
	
	1.75.1.f1839648
Linux 4.19.101-1-MANJARO, 1.8.0_242 amd64
NVIDIA Corporation (GeForce RTX 2070/PCIe/SSE2) - 4.6.0 NVIDIA 440.59

java.lang.AbstractMethodError
	at haven.GLState$Applier.apply(GLState.java:584)
	at haven.GOut.apply(GOut.java:276)
	at haven.FastMesh$Compiler.get(FastMesh.java:109)
	at haven.FastMesh.draw(FastMesh.java:361)
	at haven.RenderList.render(RenderList.java:430)
	at haven.RenderList.render(RenderList.java:493)
	at haven.PView.draw(PView.java:261)
	at haven.MapView.draw(MapView.java:1428)
	at haven.Widget.draw(Widget.java:726)
	at haven.Widget.draw(Widget.java:731)
	at haven.GameUI.draw(GameUI.java:770)
	at haven.Widget.draw(Widget.java:726)
	at haven.Widget.draw(Widget.java:731)
	at haven.RootWidget.draw(RootWidget.java:67)
	at haven.UI.draw(UI.java:144)
	at haven.HavenPanel.rootdraw(HavenPanel.java:345)
	at haven.HavenPanel.run(HavenPanel.java:641)
	at java.lang.Thread.run(Thread.java:748)

Before going to bed I decided to run memtest again for the third time and I was surprised to see that it found errors.
MemTest86 error log:

Sometimes memory errors show up due to component incompatibility. A memory module may work fine in one system and not in another. This is not uncommon and is a source of confusion. In these situations the components are not necessarily bad but have marginal conditions that when combined with other components will cause errors.

I'll swap RAM with my brother and see if he experiences problems.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by