nicymike / serflings

Serflings Remake Project
https://serflings.simpleguide.net/
26 stars 0 forks source link

The game just crash after 2 hours — problems with sound on *nix host with PulseAudio… #104

Open ShpakMA opened 1 year ago

ShpakMA commented 1 year ago

Just building road after 2 hours of gameplay... and crash...

java.lang.IllegalArgumentException: No line matching interface Clip supporting format PCM_SIGNED 8000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian is supported. at java.desktop/javax.sound.sampled.AudioSystem.getLine(AudioSystem.java:425) at net.simpleguide.a.a.a.d.a(SourceFile:122) at net.simpleguide.a.a.a.d.a(SourceFile:70) at net.simpleguide.b.a.a.a.d.a(SourceFile:24) at net.simpleguide.b.a.a.e(SourceFile:1780) at net.simpleguide.b.a.a.f(SourceFile:1706) at net.simpleguide.b.a.q.a(SourceFile:972) at net.simpleguide.a.a.a.run(SourceFile:1499) at java.base/java.lang.Thread.run(Thread.java:833)

openSUSE Leap 15.4 x86-64
java-17-openjdk 17.0.7.0-150400.3.18.2 java-17-openjdk-devel 17.0.7.0-150400.3.18.2 java-17-openjdk-jmods 17.0.7.0-150400.3.18.2 java-17-openjdk-headless 17.0.7.0-150400.3.18.2

ShpakMA commented 1 year ago

Now after 5 hours of gamelay — AFK for a minute and crash when return…

Снимок экрана в 2023-05-29 22-07-41

java.lang.IllegalArgumentException: No line matching interface Clip supporting format PCM_SIGNED 8000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian is supported. at java.desktop/javax.sound.sampled.AudioSystem.getLine(AudioSystem.java:425) at net.simpleguide.a.a.a.d.a(SourceFile:122) at net.simpleguide.a.a.a.d.a(SourceFile:70) at net.simpleguide.b.a.a.a.d.a(SourceFile:24) at net.simpleguide.b.a.a.e(SourceFile:1780) at net.simpleguide.b.a.a.f(SourceFile:1706) at net.simpleguide.b.a.q.a(SourceFile:972) at net.simpleguide.a.a.a.run(SourceFile:1499) at java.base/java.lang.Thread.run(Thread.java:833)

nicymike commented 1 year ago

Thank you for the information. Looks like there is some issue with audio when playing on Linux. I will add some checks to prevent the crash and to just suppress the sound which raises the error.

ShpakMA commented 1 year ago

Or, probably, missing/corrupted resources (i.e., game plays sound, but no sound file to play)…

nicymike commented 1 year ago

You may do a quick validation for the offsets with the parameter: --validate-data

The question is: Why does Serflings crash after some hours and not at start of a new game where sounds are already needed? Maybe it is only a particular sound which is corrupt. Or maybe it has something to do with the number of simultaneous sounds.

Nevertheless I will add some checks to prevent the crash and to just skip the sound. You may also disable sound in options to prevent the crash until I have a fix ready.

nicymike commented 1 year ago

I updated the snapshot and included the fix. Please do a test with sound enabled. If everything works fine the next days I guess we can close this issue. To analyse the initial problem I need your spa file.

ShpakMA commented 1 year ago

Can I test windows version under Wine? I have original MS Office 2010 (with valid activation) on main wineprefix and, probably, windows version should work in same conditions…

ShpakMA commented 1 year ago

To analyse the initial problem I need your spa file.

Updated by nicymike: Removed file because of copyright.

ShpakMA commented 1 year ago

I updated the snapshot and included the fix. Please do a test with sound enabled. If everything works fine the next days I guess we can close this issue.

Ten hours without crashes. But 3 times freeze for few seconds.

nicymike commented 1 year ago

Can I test windows version under Wine? I have original MS Office 2010 (with valid activation) on main wineprefix and, probably, windows version should work in same conditions…

Well, the only difference to the Windows version is the Java runtime. If it will run under Wine you should be able to run the Windows version. The exe just executes "java -jar ..." with the runtime found in jre folder.

Ten hours without crashes. But 3 times freeze for few seconds.

Freezes are hard to analyse. Maybe it has something to do with the game trying to load sounds. If you want, you may test with sounds disabled.

nicymike commented 1 year ago

Your spae.pa file is fine, no problems there. It must be something with sound and Linux. What exactly do you use (like Gnome/KDE or which sound system)?

ShpakMA commented 1 year ago

I use openSUSE Leap 15.4 as home PC OS. This PC is also used for FOTO edititng.

I have on PC 4 different sound systems:

  1. ALSA. And soundcard driver work with ALSA.
  2. OSS. Wine and libvirt use OSS.
  3. JACK. Used by sound editors if I want to produce video.
  4. PulseAudio. Used by my preffered desktop enviroment — Mate.

Package list is attached. (Sorry about XML format, but it have more info)

user-packages.zip

ShpakMA commented 1 year ago

I am not powered user in Java… How I make additional logs for troubleshooting? serflings-2.0.0-SNAPSHOT-20230530.jar.log

ShpakMA commented 1 year ago

Bug is represented in Termux (on Android). Entire home directory are attached. termux.tar.gz

Java is launched on still X server without Desktop Enviroment. Installed packages are listed in termux.tar.gz/home/pkg-list-installed.txt Availiable packages are listed in termux.tar.gz/home/pkg-list-avaliable.txt

The only PulseAudio sound system is installed.

Latest SNAPSHOT work stable, but no sound: termux.tar.gz/home/serflings/serflings-2.0.0-SNAPSHOT-20230530.jar.2023-06-07T03:38:23+03:00.log

Previos SNAPSHOT is crash shortly. Log is are in: termux.tar.gz/home/serflings/serflings-2.0.0-SNAPSHOT-20230323.jar.2023-06-07T03:39:04+03:00.log termux.tar.gz/home/serflings/serflings-2.0.0-SNAPSHOT-20230323.jar.2023-06-07T03:39:32+03:00.log

I think that problem is in architecture of linux sound systems. Only one sound can be played simultaneusly. And this sound should be in format of stream between client and server.

XServer-XSDL provide server with 44100 16-bit stereo socket and all sounds should be combined in one stream with this parameters. Different servers may provide different socket tunables, but client should combine all sounds in one stream with server socket parameters.

nicymike commented 1 year ago

Thank you. I will need some time to check this. Did you try version 1 of Serflings? Is sound playing? You may need Java 8.

ShpakMA commented 1 year ago

Yes, I check. Version 1 have completly no sounds and no music. I try everywhere what able to launch it. But no crashes. I was think what Version 1 just have no sounds…

nicymike commented 1 year ago

I am not informed well about Linux sound systems and Java. I found some blog about java sound on Linux. https://keithp.com/blogs/Java-Sound-on-Linux/ Maybe it is a problem with Java and PulseAudio.

I think I will check thesound issues after the release of version 2 which is sheduled for next week.

nicymike commented 1 year ago

I am not powered user in Java… How I make additional logs for troubleshooting? serflings-2.0.0-SNAPSHOT-20230530.jar.log

Thank you for the log. I could add some more logs to the game myself. Other than that I don't think there is a log for sound systems.

ShpakMA commented 1 year ago

Other than that I don't think there is a log for sound systems.

I was listen documentary while 10 hours game… No problems with sound. I think, problem inside game… In other cases sound system should crash instead game…

And dmesg also clean…

nicymike commented 1 year ago

I added a new parameter: --system-info

This will print out the Java environment, some system information and a list of sound devices (called mixers). Maybe this will help to identify the problem.

ShpakMA commented 1 year ago

I added a new parameter:

Excuse me, but... Where I may obtain list of commandline parameters?

ShpakMA commented 1 year ago

https://keithp.com/blogs/Java-Sound-on-Linux/ Maybe it is a problem with Java and PulseAudio.

I am not programmer... Just field service engeneer (medical equipment)... But I have on PC both IcedTea and openjdk... And serflings craches sometimes...

But on phone, inside Termux, I have only openjdk-17-x... And it crashes before I go to settings to switch off sound and music... Few seconds...

This blog display another methods, than my system. But on my system all methods are same...

Details

![Снимок экрана в 2023-06-08 22-12-48](https://github.com/nicymike/serflings/assets/134811226/04cde720-8369-45d8-be97-abe1c834c565) And same on my system: ``` sma@SMA-M5A97:/> ls -l /usr/lib/jvm/ итого 4 drwxr-xr-x 3 root root 4096 мая 27 17:22 java-1.8.0-ibm-1.8.0 lrwxrwxrwx 1 root root 20 мая 27 17:22 java-1_8_0-ibm-1.8.0 -> java-1.8.0-ibm-1.8.0 lrwxrwxrwx 1 root root 23 мая 27 17:22 jre -> /etc/alternatives/jre32 lrwxrwxrwx 1 root root 30 мая 27 17:22 jre-1.8.0 -> /etc/alternatives/jre_1.8.0-32 lrwxrwxrwx 1 root root 24 апр 6 12:40 jre-1.8.0-ibm -> java-1.8.0-ibm-1.8.0/jre lrwxrwxrwx 1 root root 28 мая 27 17:22 jre-ibm -> /etc/alternatives/jre_ibm-32 sma@SMA-M5A97:/> cat /usr/lib/jvm/jre/lib/sound.properties # ======================================================================== # Licensed Materials - Property of IBM # "Restricted Materials of IBM" # # IBM SDK, Java(tm) Technology Edition, v8 # (C) Copyright IBM Corp. 2000, 2014. All Rights Reserved # # US Government Users Restricted Rights - Use, duplication or disclosure # restricted by GSA ADP Schedule Contract with IBM Corp. # ======================================================================== # Sound Configuration File ############################################################ # # This properties file is used to specify default service # providers for javax.sound.midi.MidiSystem and # javax.sound.sampled.AudioSystem. # # The following keys are recognized by MidiSystem methods: # # javax.sound.midi.Receiver # javax.sound.midi.Sequencer # javax.sound.midi.Synthesizer # javax.sound.midi.Transmitter # # The following keys are recognized by AudioSystem methods: # # javax.sound.sampled.Clip # javax.sound.sampled.Port # javax.sound.sampled.SourceDataLine # javax.sound.sampled.TargetDataLine # # The values specify the full class name of the service # provider, or the device name. # # See the class descriptions for details. # # Example 1: # Use MyDeviceProvider as default for SourceDataLines: # javax.sound.sampled.SourceDataLine=com.xyz.MyDeviceProvider # # Example 2: # Specify the default Synthesizer by its name "InternalSynth". # javax.sound.midi.Synthesizer=#InternalSynth # # Example 3: # Specify the default Receiver by provider and name: # javax.sound.midi.Receiver=com.sun.media.sound.MidiProvider#SunMIDI1 # sma@SMA-M5A97:/> ``` ![Снимок экрана в 2023-06-08 22-24-18](https://github.com/nicymike/serflings/assets/134811226/c1695656-d957-4fc5-9011-5a3494938d6c) ``` sma@SMA-M5A97:/> ls -l /usr/lib64/jvm/ итого 24 lrwxrwxrwx 1 root root 26 мая 17 18:12 java -> /etc/alternatives/java_sdk drwxr-xr-x 3 root root 4096 мая 27 16:59 java-10-openjdk-10 drwxr-xr-x 3 root root 4096 мая 27 14:31 java-11-openjdk-11 lrwxrwxrwx 1 root root 29 мая 27 14:32 java-17 -> /etc/alternatives/java_sdk_17 lrwxrwxrwx 1 root root 18 апр 27 15:18 java-17-openjdk -> java-17-openjdk-17 drwxr-xr-x 10 root root 4096 мая 27 19:22 java-17-openjdk-17 drwxr-xr-x 4 root root 4096 мая 27 17:21 java-1.8.0-ibm-1.8.0 lrwxrwxrwx 1 root root 20 мая 27 17:22 java-1_8_0-ibm-1.8.0 -> java-1.8.0-ibm-1.8.0 drwxr-xr-x 5 root root 4096 мая 27 17:22 java-1.8.0-openj9-1.8.0 drwxr-xr-x 5 root root 4096 мая 27 17:22 java-1.8.0-openjdk-1.8.0 lrwxrwxrwx 1 root root 34 мая 17 18:12 java-openjdk -> /etc/alternatives/java_sdk_openjdk lrwxrwxrwx 1 root root 21 мая 10 22:20 jre -> /etc/alternatives/jre lrwxrwxrwx 1 root root 24 мая 27 14:30 jre-17 -> /etc/alternatives/jre_17 lrwxrwxrwx 1 root root 18 апр 27 15:18 jre-17-openjdk -> java-17-openjdk-17 lrwxrwxrwx 1 root root 27 мая 27 17:20 jre-1.8.0 -> /etc/alternatives/jre_1.8.0 lrwxrwxrwx 1 root root 24 апр 6 12:31 jre-1.8.0-ibm -> java-1.8.0-ibm-1.8.0/jre lrwxrwxrwx 1 root root 27 мар 6 15:51 jre-1.8.0-openj9 -> java-1.8.0-openj9-1.8.0/jre lrwxrwxrwx 1 root root 28 мая 4 11:30 jre-1.8.0-openjdk -> java-1.8.0-openjdk-1.8.0/jre lrwxrwxrwx 1 root root 25 мая 27 17:20 jre-ibm -> /etc/alternatives/jre_ibm lrwxrwxrwx 1 root root 29 мая 10 22:20 jre-openjdk -> /etc/alternatives/jre_openjdk sma@SMA-M5A97:/> cat /usr/lib64/jvm/java-1.8.0-ibm-1.8.0/jre/lib/sound.properties # ======================================================================== # Licensed Materials - Property of IBM # "Restricted Materials of IBM" # # IBM SDK, Java(tm) Technology Edition, v8 # (C) Copyright IBM Corp. 2000, 2014. All Rights Reserved # # US Government Users Restricted Rights - Use, duplication or disclosure # restricted by GSA ADP Schedule Contract with IBM Corp. # ======================================================================== # Sound Configuration File ############################################################ # # This properties file is used to specify default service # providers for javax.sound.midi.MidiSystem and # javax.sound.sampled.AudioSystem. # # The following keys are recognized by MidiSystem methods: # # javax.sound.midi.Receiver # javax.sound.midi.Sequencer # javax.sound.midi.Synthesizer # javax.sound.midi.Transmitter # # The following keys are recognized by AudioSystem methods: # # javax.sound.sampled.Clip # javax.sound.sampled.Port # javax.sound.sampled.SourceDataLine # javax.sound.sampled.TargetDataLine # # The values specify the full class name of the service # provider, or the device name. # # See the class descriptions for details. # # Example 1: # Use MyDeviceProvider as default for SourceDataLines: # javax.sound.sampled.SourceDataLine=com.xyz.MyDeviceProvider # # Example 2: # Specify the default Synthesizer by its name "InternalSynth". # javax.sound.midi.Synthesizer=#InternalSynth # # Example 3: # Specify the default Receiver by provider and name: # javax.sound.midi.Receiver=com.sun.media.sound.MidiProvider#SunMIDI1 # sma@SMA-M5A97:/> cat /usr/lib64/jvm/java-1.8.0-openj9-1.8.0/jre/lib/sound.properties ############################################################ # Sound Configuration File ############################################################ # # This properties file is used to specify default service # providers for javax.sound.midi.MidiSystem and # javax.sound.sampled.AudioSystem. # # The following keys are recognized by MidiSystem methods: # # javax.sound.midi.Receiver # javax.sound.midi.Sequencer # javax.sound.midi.Synthesizer # javax.sound.midi.Transmitter # # The following keys are recognized by AudioSystem methods: # # javax.sound.sampled.Clip # javax.sound.sampled.Port # javax.sound.sampled.SourceDataLine # javax.sound.sampled.TargetDataLine # # The values specify the full class name of the service # provider, or the device name. # # See the class descriptions for details. # # Example 1: # Use MyDeviceProvider as default for SourceDataLines: # javax.sound.sampled.SourceDataLine=com.xyz.MyDeviceProvider # # Example 2: # Specify the default Synthesizer by its name "InternalSynth". # javax.sound.midi.Synthesizer=#InternalSynth # # Example 3: # Specify the default Receiver by provider and name: # javax.sound.midi.Receiver=com.sun.media.sound.MidiProvider#SunMIDI1 # sma@SMA-M5A97:/> cat /usr/lib64/jvm/java-17-openjdk-17/conf/sound.properties ############################################################ # Sound Configuration File ############################################################ # # This properties file is used to specify default service # providers for javax.sound.midi.MidiSystem and # javax.sound.sampled.AudioSystem. # # The following keys are recognized by MidiSystem methods: # # javax.sound.midi.Receiver # javax.sound.midi.Sequencer # javax.sound.midi.Synthesizer # javax.sound.midi.Transmitter # # The following keys are recognized by AudioSystem methods: # # javax.sound.sampled.Clip # javax.sound.sampled.Port # javax.sound.sampled.SourceDataLine # javax.sound.sampled.TargetDataLine # # The values specify the full class name of the service # provider, or the device name. # # See the class descriptions for details. # # Example 1: # Use MyDeviceProvider as default for SourceDataLines: # javax.sound.sampled.SourceDataLine=com.xyz.MyDeviceProvider # # Example 2: # Specify the default Synthesizer by its name "InternalSynth". # javax.sound.midi.Synthesizer=#InternalSynth # # Example 3: # Specify the default Receiver by provider and name: # javax.sound.midi.Receiver=com.sun.media.sound.MidiProvider#SunMIDI1 # sma@SMA-M5A97:/> cat /usr/lib64/jvm/java-1.8.0-openjdk-1.8.0/jre/lib/sound.properties ############################################################ # Sound Configuration File ############################################################ # # This properties file is used to specify default service # providers for javax.sound.midi.MidiSystem and # javax.sound.sampled.AudioSystem. # # The following keys are recognized by MidiSystem methods: # # javax.sound.midi.Receiver # javax.sound.midi.Sequencer # javax.sound.midi.Synthesizer # javax.sound.midi.Transmitter # # The following keys are recognized by AudioSystem methods: # # javax.sound.sampled.Clip # javax.sound.sampled.Port # javax.sound.sampled.SourceDataLine # javax.sound.sampled.TargetDataLine # # The values specify the full class name of the service # provider, or the device name. # # See the class descriptions for details. # # Example 1: # Use MyDeviceProvider as default for SourceDataLines: # javax.sound.sampled.SourceDataLine=com.xyz.MyDeviceProvider # # Example 2: # Specify the default Synthesizer by its name "InternalSynth". # javax.sound.midi.Synthesizer=#InternalSynth # # Example 3: # Specify the default Receiver by provider and name: # javax.sound.midi.Receiver=com.sun.media.sound.MidiProvider#SunMIDI1 # sma@SMA-M5A97:/> ``` And for Termux ``` ~ $ ls -l ../usr/opt/ total 7 drwx------ 10 u0_a515 u0_a515 3488 Jun 7 01:52 openjdk drwxr-xr-x 3 u0_a515 u0_a515 3488 Jun 7 01:49 openjdk-17 ~ $ cat ../usr/opt/openjdk/conf/sound.properties ############################################################ # Sound Configuration File ############################################################ # # This properties file is used to specify default service # providers for javax.sound.midi.MidiSystem and # javax.sound.sampled.AudioSystem. # # The following keys are recognized by MidiSystem methods: # # javax.sound.midi.Receiver # javax.sound.midi.Sequencer # javax.sound.midi.Synthesizer # javax.sound.midi.Transmitter # # The following keys are recognized by AudioSystem methods: # # javax.sound.sampled.Clip # javax.sound.sampled.Port # javax.sound.sampled.SourceDataLine # javax.sound.sampled.TargetDataLine # # The values specify the full class name of the service # provider, or the device name. # # See the class descriptions for details. # # Example 1: # Use MyDeviceProvider as default for SourceDataLines: # javax.sound.sampled.SourceDataLine=com.xyz.MyDeviceProvider # # Example 2: # Specify the default Synthesizer by its name "InternalSynth". # javax.sound.midi.Synthesizer=#InternalSynth # # Example 3: # Specify the default Receiver by provider and name: # javax.sound.midi.Receiver=com.sun.media.sound.MidiProvider#SunMIDI1 # ~ $ ```

ShpakMA commented 1 year ago

I added a new parameter: --system-info

New log from opensuse PC. Work stable, but freeze for 3 seconds at 2023-06-09T00:00:15+03:00... serflings-2.0.0-SNAPSHOT-20230608.jar.2023-06-09T00:02:02+03:00.log It is very strange — no any records 13 minutes before and 1,5 minutes after freeze...

And new log from Termux on my android phone (just launch, load a savefile, scroll two times and exit). Looks playable, but no sounds and no music. serflings-2.0.0-SNAPSHOT-20230608.jar.2023-06-09T00:14:12+03:00.log I try to "google" jsound, but find only the next-generation JSON Schema language...

ShpakMA commented 1 year ago

Windows version crashes under Wine... Снимок экрана в 2023-06-09 00-26-36

But Microsoft office work fine in same wine and with same wineprefix... Снимок экрана в 2023-06-09 00-28-55

nicymike commented 1 year ago

Excuse me, but... Where I may obtain list of commandline parameters?

I did not add a list of available parameters yet.

nicymike commented 1 year ago

The crashes with wine are directly comming from Java as seen in the message (javaw.exe). I am not sure how to run the windows version of Java with wine. The windows exe is just calling the Java command line as you would with the Linux version yourself.

What about using a Java version from here: https://adoptium.net/de/temurin/releases/?version=17

nicymike commented 1 year ago

But on phone, inside Termux, I have only openjdk-17-x... And it crashes before I go to settings to switch off sound and music... Few seconds...

Oh, still crashing? Are there any error messages displayed?

Btw. the parameter -verbose ist just useful for class loading issues which does not apply to sound I think.

ShpakMA commented 1 year ago

Btw. the parameter -verbose ist just useful for class loading issues which does not apply to sound I think.

I am sorry, but I not powered java user. How can I retrieve additional logs?

ShpakMA commented 1 year ago

The crashes with wine are directly comming from Java as seen in the message (javaw.exe). I am not sure how to run the windows version of Java with wine.

It works from 7-zip, was installed to wine64 via PlayOnLinux... This is bad idea to launch java in wine... But stable work in wine will indicate that problem is localized between PulseAudio and Java...

Снимок экрана в 2023-06-09 15-34-45

ShpakMA commented 1 year ago

Maybe it is a problem with Java and PulseAudio.

Is this blog article is helpful? https://data-flair.training/blogs/java-music-player/

I may test sound by opening files in this player and compare results with native programs... And why on android I have crash in few seconds, but on PC I have few hours before crash?

nicymike commented 1 year ago

I am sorry, but I not powered java user. How can I retrieve additional logs?

I don't think Java provides additional logs out of the box. If we need more logs I have to add some to Serflings myself.

nicymike commented 1 year ago

Is this blog article is helpful? https://data-flair.training/blogs/java-music-player/

Not that much. Settlers 1 uses midi as music and wav as sound. There is no mp3.

nicymike commented 1 year ago

I think I have to create my own Linux as virtual machine to test sound and music.

ShpakMA commented 1 year ago

Oh, still crashing? Are there any error messages displayed?

Btw. the parameter -verbose ist just useful for class loading issues which does not apply to sound I think.

Excuse me, but my log have not only load and unload messages. I teccomend to scroll log untol you finr lines not started from braces…

In example, serflings-2.0.0-SNAPSHOT-20230608.jar.2023-06-09T00.14.12+03.00.log contains this beautiful block…

[3.648s][info][class,load] java.lang.ClassLoader$$Lambda$188/0x000000010026cb50 source: java.lang.ClassLoader
[3.649s][info][class,load] javax.sound.sampled.LineUnavailableException source: jrt:/java.desktop
[3.653s][info][class,load] com.sun.media.sound.AbstractMidiDeviceProvider$Info source: jrt:/java.desktop
[3.700s][info][class,load] java.lang.Throwable$PrintStreamOrWriter source: jrt:/java.base
[3.700s][info][class,load] java.lang.Throwable$WrappedPrintStream source: jrt:/java.base
javax.sound.midi.MidiUnavailableException: Can not open line
    at java.desktop/com.sun.media.sound.SoftSynthesizer.open(SoftSynthesizer.java:1183)
    at java.desktop/com.sun.media.sound.SoftSynthesizer.open(SoftSynthesizer.java:1093)
    at java.desktop/com.sun.media.sound.SoftSynthesizer.getReceiverReferenceCounting(SoftSynthesizer.java:1398)
    at java.desktop/javax.sound.midi.MidiSystem.getReceiver(MidiSystem.java:237)
    at java.desktop/javax.sound.midi.MidiSystem.getSequencer(MidiSystem.java:416)
    at net.simpleguide.a.a.a.b.a(SourceFile:115)
    at net.simpleguide.a.a.b.b.v(SourceFile:14019)
    at net.simpleguide.b.a.q.c(SourceFile:302)
    at net.simpleguide.a.a.a.run(SourceFile:159)
    at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalArgumentException: No line matching interface SourceDataLine supporting format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian is supported.
    at java.desktop/javax.sound.sampled.AudioSystem.getLine(AudioSystem.java:425)
    at java.desktop/javax.sound.sampled.AudioSystem.getSourceDataLine(AudioSystem.java:534)
    at java.desktop/com.sun.media.sound.SoftSynthesizer.open(SoftSynthesizer.java:1123)
    ... 9 more
[3.702s][info][class,load] net.simpleguide.a.a.e.e source: file:/data/data/com.termux/files/home/serflings/serflings-2.0.0-SNAPSHOT-20230608.jar
[3.702s][info][class,load] net.simpleguide.a.a.e.b.h source: file:/data/data/com.termux/files/home/serflings/serflings-2.0.0-SNAPSHOT-20230608.jar
[3.703s][info][class,load] net.simpleguide.b.a.l.a.p source: file:/data/data/com.termux/files/home/serflings/serflings-2.0.0-SNAPSHOT-20230608.jar
[3.703s][info][class,load] net.simpleguide.b.a.n.a.i source: file:/data/data/com.termux/files/home/serflings/serflings-2.0.0-SNAPSHOT-20230608.jar
[3.704s][info][class,load] net.simpleguide.b.a.f.a.f source: file:/data/data/com.termux/files/home/serflings/serflings-2.0.0-SNAPSHOT-20230608.jar
[3.705s][info][class,load] net.simpleguide.b.a.f.a.c source: file:/data/data/com.termux/files/home/serflings/serflings-2.0.0-SNAPSHOT-20230608.jar
[3.705s][info][class,load] net.simpleguide.b.a.l.a.n source: file:/data/data/com.termux/files/home/serflings/serflings-2.0.0-SNAPSHOT-20230608.jar
[3.706s][info][class,load] net.simpleguide.b.a.n.a source: file:/data/data/com.termux/files/home/serflings/serflings-2.0.0-SNAPSHOT-20230608.jar
[3.706s][info][class,load] net.simpleguide.b.a.l source: file:/data/data/com.termux/files/home/serflings/serflings-2.0.0-SNAPSHOT-20230608.jar
[3.709s][info][class,load] java.awt.SplashScreen source: jrt:/java.desktop
ShpakMA commented 1 year ago

Is sound problems may be occurred by huge amount of buildings on screen? Probably, game try to play more independent sounds, than linux are able to play?

ShpakMA commented 1 year ago

I put JRE from adoptium.net in subfolder and use shell script (attached as .TXT) to launch adoptium JRE with log collecting. First freeze (3 seconds, not matter with CPU utilization) is correlating to [class,load] java.security.DomainCombiner source: jrt:/java.base.

serflings-2.0.0-SNAPSHOT-20230608.jar.2023-06-14T11:08:24+03:00.log serflings-2.0.0-SNAPSHOT-20230608.jar.2023-06-14T11:29:30+03:00.log serflings-2.0.0-SNAPSHOT-20230608.sh.txt

nicymike commented 1 year ago

The class load is just an internal thing of Java which unfortunately does not give any hints about the running game itself. The exceptions will help but the IllegalArgumentException is only telling that the game cannot open a line for audio but not why. I think I need to build up a debug session on a virtual machine myself first.

Thank you for the information about your Linux.

nicymike commented 12 months ago

@ShpakMA : I installed an opensuse myself inside a VirtualBox VM. Serflings is running fine including music and sound. I also installed Mate and enabled PulseAudio (https://en.opensuse.org/SDB:Pulseaudio) but still, sound is running fine. I used Leap 15.5 because I did not find any download for 15.4.

Do you have any idea what I should do to clone your system? How did you install opensuse? Do you have an install command for Yast or zypper?

ShpakMA commented 12 months ago

I was install 15.4 via updating of 15.3, 15.2... And all versions since 42.0. Updating using bootable DVD from official site opensuse.org.

Update to 15.5 was planned next week.

I was have normal gameplay few hours (2~5 hours) before problem persist. March snapshot would crashing. May and June snapshots would freeze in same conditions for few seconds.

Should I install fresh openSUSE 15.5 on my PC and test the game in fresh conditions?

ShpakMA commented 12 months ago

Do you have any idea what I should do to clone your system?

You need this things for package list clonning:

  1. Yast;
  2. my /etc/zypp/repos.d folder;
  3. list of my packages in Yast xml+ format.

But it is hard to clone package configuration. I think that system working good in case of all other software, include DosBox midi passthrough, work properly.

Only one idea: to launch March snapshot for few hours. It will crash without any mouse clicks.

nicymike commented 12 months ago

Should I install fresh openSUSE 15.5 on my PC and test the game in fresh conditions? You could try it to make sure there is no config issue about sound. Maybe there are config issues in older versions which persist if you don't do a fresh install.

Only one idea: to launch March snapshot for few hours. It will crash without any mouse clicks. Older snapshots have fixes missing. But I will release version 2 soon anyway.

ShpakMA commented 12 months ago

Older snapshots have fixes missing. But I will release version 2 soon anyway.

Yes, but you may just launch game in background and check the crash once per hour. I was provided set of save files — just load SMA10 ( save0 ) and close VM Window. If game crashed, repeat same with last snapshots and you should achieve non-fatal freeze.

nicymike commented 11 months ago

Thank you, now I understand.

I left the game open for some hours in my Linux VM but I had no issues with sound and no crashes. I used save SMA10. There must be something different to your system.