SnkSynthesis / voxel-game

A simple voxel game written in Java.
MIT License
11 stars 2 forks source link

Unable to compile on macOS ARM64 #2

Open lokka30 opened 2 years ago

lokka30 commented 2 years ago

Hi, I am unable to compile voxel-game on macOS ARM64 (M1 MacBook Air):

lach@LAIR voxel-game % ./mvnw compile exec:java
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for org.lwjgl:lwjgl:jar:${lwjgl.natives} is missing. @ line 95, column 21
[ERROR] 'dependencies.dependency.version' for org.lwjgl:lwjgl-glfw:jar:${lwjgl.natives} is missing. @ line 100, column 21
[ERROR] 'dependencies.dependency.version' for org.lwjgl:lwjgl-opengl:jar:${lwjgl.natives} is missing. @ line 105, column 21
[ERROR] 'dependencies.dependency.version' for org.lwjgl:lwjgl-stb:jar:${lwjgl.natives} is missing. @ line 110, column 21
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.snksynthesis.voxelgame:voxel-game:1.0 (/Users/lach/Documents/Programming/Java/voxel-game/pom.xml) has 4 errors
[ERROR]     'dependencies.dependency.version' for org.lwjgl:lwjgl:jar:${lwjgl.natives} is missing. @ line 95, column 21
[ERROR]     'dependencies.dependency.version' for org.lwjgl:lwjgl-glfw:jar:${lwjgl.natives} is missing. @ line 100, column 21
[ERROR]     'dependencies.dependency.version' for org.lwjgl:lwjgl-opengl:jar:${lwjgl.natives} is missing. @ line 105, column 21
[ERROR]     'dependencies.dependency.version' for org.lwjgl:lwjgl-stb:jar:${lwjgl.natives} is missing. @ line 110, column 21
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

I tried to solve this myself by adding a macOS ARM64 profile for LWJGL but that was fruitless as I have no idea what I was doing there.

SnkSynthesis commented 2 years ago

Hi @lokka30

I've added support for macOS ARM64 in pom.xml However, I have not tested it.

lokka30 commented 2 years ago

Sweet! I'll test it now.

lokka30 commented 2 years ago

Unfortunately I still can't compile (following instructions on the README):

[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for org.lwjgl:lwjgl:jar:natives-macos-arm64 is missing. @ line 131, column 21
[ERROR] 'dependencies.dependency.version' for org.lwjgl:lwjgl-glfw:jar:natives-macos-arm64 is missing. @ line 136, column 21
[ERROR] 'dependencies.dependency.version' for org.lwjgl:lwjgl-opengl:jar:natives-macos-arm64 is missing. @ line 141, column 21
[ERROR] 'dependencies.dependency.version' for org.lwjgl:lwjgl-stb:jar:natives-macos-arm64 is missing. @ line 146, column 21
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.snksynthesis.voxelgame:voxel-game:1.0 (/Users/lach/Documents/Programming/Java/voxel-game/pom.xml) has 4 errors
[ERROR]     'dependencies.dependency.version' for org.lwjgl:lwjgl:jar:natives-macos-arm64 is missing. @ line 131, column 21
[ERROR]     'dependencies.dependency.version' for org.lwjgl:lwjgl-glfw:jar:natives-macos-arm64 is missing. @ line 136, column 21
[ERROR]     'dependencies.dependency.version' for org.lwjgl:lwjgl-opengl:jar:natives-macos-arm64 is missing. @ line 141, column 21
[ERROR]     'dependencies.dependency.version' for org.lwjgl:lwjgl-stb:jar:natives-macos-arm64 is missing. @ line 146, column 21
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
SnkSynthesis commented 2 years ago

Which JDK are you using?

lokka30 commented 2 years ago

Which JDK are you using?

lach@LAIR ~ % java -version
openjdk version "17.0.1" 2021-10-19
OpenJDK Runtime Environment (build 17.0.1+12-39)
OpenJDK 64-Bit Server VM (build 17.0.1+12-39, mixed mode, sharing)

:)

SnkSynthesis commented 2 years ago

Okay :). I've updated pom.xml to include versions of all LWJGL dependencies.

lokka30 commented 2 years ago

Ooh, working better now! Encountered a new warning/error:

[WARNING] 
java.lang.ExceptionInInitializerError
    at org.lwjgl.glfw.GLFW.glfwInit (GLFW.java:1046)
    at com.snksynthesis.voxelgame.gfx.Window.create (Window.java:36)
    at com.snksynthesis.voxelgame.App.init (App.java:43)
    at com.snksynthesis.voxelgame.App.run (App.java:95)
    at com.snksynthesis.voxelgame.App.main (App.java:125)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:254)
    at java.lang.Thread.run (Thread.java:833)
Caused by: java.lang.IllegalStateException: GLFW may only be used on the main thread and that thread must be the first thread in the process. Please run the JVM with -XstartOnFirstThread. This check may be disabled with Configuration.GLFW_CHECK_THREAD0.
    at org.lwjgl.glfw.EventLoop.<clinit> (EventLoop.java:30)
    at org.lwjgl.glfw.GLFW.glfwInit (GLFW.java:1046)
    at com.snksynthesis.voxelgame.gfx.Window.create (Window.java:36)
    at com.snksynthesis.voxelgame.App.init (App.java:43)
    at com.snksynthesis.voxelgame.App.run (App.java:95)
    at com.snksynthesis.voxelgame.App.main (App.java:125)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:254)
    at java.lang.Thread.run (Thread.java:833)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  11.038 s
[INFO] Finished at: 2022-03-24T21:59:53+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:java (default-cli) on project voxel-game: An exception occured while executing the Java class. null: ExceptionInInitializerError: GLFW may only be used on the main thread and that thread must be the first thread in the process. Please run the JVM with -XstartOnFirstThread. This check may be disabled with Configuration.GLFW_CHECK_THREAD0. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
SnkSynthesis commented 2 years ago

Okay that's better. Based on https://www.lwjgl.org/guide, MacOS users have to add the option: -XstartOnFirstThread. I've updated the README.md to include that.

lokka30 commented 2 years ago

Another step closer! But now a new error. 😣

lach@LAIR voxel-game % java -XstartOnFirstThread -jar ./target/voxel-game-1.0.jar
java.io.FileNotFoundException: ile:/Users/lach/Documents/Programming/Java/voxel-game/target/voxel-game-1.0.jar!/shaders/vertex.glsl (No such file or directory)
    at java.base/java.io.FileInputStream.open0(Native Method)
    at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
    at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
    at java.base/java.util.Scanner.<init>(Scanner.java:639)
    at com.snksynthesis.voxelgame.gfx.Shader.readFile(Shader.java:100)
    at com.snksynthesis.voxelgame.gfx.Shader.createShader(Shader.java:80)
    at com.snksynthesis.voxelgame.gfx.Shader.link(Shader.java:43)
    at com.snksynthesis.voxelgame.App.init(App.java:47)
    at com.snksynthesis.voxelgame.App.run(App.java:95)
    at com.snksynthesis.voxelgame.App.main(App.java:125)
java.io.FileNotFoundException: ile:/Users/lach/Documents/Programming/Java/voxel-game/target/voxel-game-1.0.jar!/shaders/fragment.glsl (No such file or directory)
    at java.base/java.io.FileInputStream.open0(Native Method)
    at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
    at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
    at java.base/java.util.Scanner.<init>(Scanner.java:639)
    at com.snksynthesis.voxelgame.gfx.Shader.readFile(Shader.java:100)
    at com.snksynthesis.voxelgame.gfx.Shader.createShader(Shader.java:80)
    at com.snksynthesis.voxelgame.gfx.Shader.link(Shader.java:44)
    at com.snksynthesis.voxelgame.App.init(App.java:47)
    at com.snksynthesis.voxelgame.App.run(App.java:95)
    at com.snksynthesis.voxelgame.App.main(App.java:125)
java.lang.Exception: Error linking shader: ERROR: Compiled vertex shader was corrupt.
ERROR: Compiled fragment shader was corrupt.

    at com.snksynthesis.voxelgame.gfx.Shader.link(Shader.java:48)
    at com.snksynthesis.voxelgame.App.init(App.java:47)
    at com.snksynthesis.voxelgame.App.run(App.java:95)
    at com.snksynthesis.voxelgame.App.main(App.java:125)
Exception in thread "main" java.lang.RuntimeException: Couldn't load texture!
    at com.snksynthesis.voxelgame.texture.Texture.<init>(Texture.java:45)
    at com.snksynthesis.voxelgame.texture.Texture.loadRGBA(Texture.java:66)
    at com.snksynthesis.voxelgame.chunk.Chunk.<init>(Chunk.java:55)
    at com.snksynthesis.voxelgame.chunk.ChunkManager.setVisibleChunks(ChunkManager.java:87)
    at com.snksynthesis.voxelgame.chunk.ChunkManager.setCamPos(ChunkManager.java:99)
    at com.snksynthesis.voxelgame.App.update(App.java:89)
    at com.snksynthesis.voxelgame.App.run(App.java:100)
    at com.snksynthesis.voxelgame.App.main(App.java:125)
View full log ``` lach@LAIR Java % git clone https://github.com/SnkSynthesis/voxel-game.git Cloning into 'voxel-game'... remote: Enumerating objects: 1103, done. remote: Counting objects: 100% (1103/1103), done. remote: Compressing objects: 100% (592/592), done. remote: Total 1103 (delta 349), reused 927 (delta 202), pack-reused 0 Receiving objects: 100% (1103/1103), 7.94 MiB | 7.38 MiB/s, done. Resolving deltas: 100% (349/349), done. lach@LAIR Java % cd voxel-game lach@LAIR voxel-game % chmod +x mvnw lach@LAIR voxel-game % ./mvnw clean package --2022-03-25 09:59:26-- https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar Resolving repo.maven.apache.org (repo.maven.apache.org)... 151.101.196.215 Connecting to repo.maven.apache.org (repo.maven.apache.org)|151.101.196.215|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 50710 (50K) [application/java-archive] Saving to: β€˜/Users/lach/Documents/Programming/Java/voxel-game/.mvn/wrapper/maven-wrapper.jar’ /Users/lach/Documents/Programming/Java/voxel-game/ 100%[================================================================================================================>] 49.52K 237KB/s in 0.2s 2022-03-25 09:59:27 (237 KB/s) - β€˜/Users/lach/Documents/Programming/Java/voxel-game/.mvn/wrapper/maven-wrapper.jar’ saved [50710/50710] [INFO] Scanning for projects... [INFO] [INFO] ---------------< com.snksynthesis.voxelgame:voxel-game >---------------- [INFO] Building voxel-game 1.0 [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ voxel-game --- [INFO] [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ voxel-game --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] Copying 3 resources [INFO] [INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ voxel-game --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 14 source files to /Users/lach/Documents/Programming/Java/voxel-game/target/classes [INFO] [INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ voxel-game --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] skip non existing resourceDirectory /Users/lach/Documents/Programming/Java/voxel-game/src/test/resources [INFO] [INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ voxel-game --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 1 source file to /Users/lach/Documents/Programming/Java/voxel-game/target/test-classes [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ voxel-game --- [INFO] Surefire report directory: /Users/lach/Documents/Programming/Java/voxel-game/target/surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running com.snksynthesis.voxelgame.AppTest Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec Results : Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ voxel-game --- [INFO] Building jar: /Users/lach/Documents/Programming/Java/voxel-game/target/voxel-game-1.0.jar [INFO] [INFO] --- maven-shade-plugin:3.2.4:shade (default) @ voxel-game --- [INFO] Including org.lwjgl:lwjgl:jar:3.3.1 in the shaded jar. [INFO] Including org.lwjgl:lwjgl-glfw:jar:3.3.1 in the shaded jar. [INFO] Including org.lwjgl:lwjgl-opengl:jar:3.3.1 in the shaded jar. [INFO] Including org.lwjgl:lwjgl-stb:jar:3.3.1 in the shaded jar. [INFO] Including org.lwjgl:lwjgl:jar:natives-macos-arm64:3.3.1 in the shaded jar. [INFO] Including org.lwjgl:lwjgl-glfw:jar:natives-macos-arm64:3.3.1 in the shaded jar. [INFO] Including org.lwjgl:lwjgl-opengl:jar:natives-macos-arm64:3.3.1 in the shaded jar. [INFO] Including org.lwjgl:lwjgl-stb:jar:natives-macos-arm64:3.3.1 in the shaded jar. [INFO] Including org.joml:joml:jar:1.10.4 in the shaded jar. [WARNING] Discovered module-info.class. Shading will break its strong encapsulation. [WARNING] joml-1.10.4.jar, lwjgl-3.3.1-natives-macos-arm64.jar, lwjgl-3.3.1.jar, lwjgl-glfw-3.3.1-natives-macos-arm64.jar, lwjgl-glfw-3.3.1.jar, lwjgl-opengl-3.3.1-natives-macos-arm64.jar, lwjgl-opengl-3.3.1.jar, lwjgl-stb-3.3.1-natives-macos-arm64.jar, lwjgl-stb-3.3.1.jar, voxel-game-1.0.jar define 1 overlapping resource: [WARNING] - META-INF/MANIFEST.MF [WARNING] lwjgl-3.3.1-natives-macos-arm64.jar, lwjgl-3.3.1.jar, lwjgl-glfw-3.3.1-natives-macos-arm64.jar, lwjgl-glfw-3.3.1.jar, lwjgl-opengl-3.3.1-natives-macos-arm64.jar, lwjgl-opengl-3.3.1.jar, lwjgl-stb-3.3.1-natives-macos-arm64.jar, lwjgl-stb-3.3.1.jar define 1 overlapping classes: [WARNING] - META-INF.versions.9.module-info [WARNING] maven-shade-plugin has detected that some class files are [WARNING] present in two or more JARs. When this happens, only one [WARNING] single version of the class is copied to the uber jar. [WARNING] Usually this is not harmful and you can skip these warnings, [WARNING] otherwise try to manually exclude artifacts based on [WARNING] mvn dependency:tree -Ddetail=true and the above output. [WARNING] See http://maven.apache.org/plugins/maven-shade-plugin/ [INFO] Replacing original artifact with shaded artifact. [INFO] Replacing /Users/lach/Documents/Programming/Java/voxel-game/target/voxel-game-1.0.jar with /Users/lach/Documents/Programming/Java/voxel-game/target/voxel-game-1.0-shaded.jar [INFO] Dependency-reduced POM written at: /Users/lach/Documents/Programming/Java/voxel-game/dependency-reduced-pom.xml [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.760 s [INFO] Finished at: 2022-03-25T09:59:29+08:00 [INFO] ------------------------------------------------------------------------ lach@LAIR voxel-game % java -XstartOnFirstThread -jar ./target/voxel-game-1.0.jar java.io.FileNotFoundException: ile:/Users/lach/Documents/Programming/Java/voxel-game/target/voxel-game-1.0.jar!/shaders/vertex.glsl (No such file or directory) at java.base/java.io.FileInputStream.open0(Native Method) at java.base/java.io.FileInputStream.open(FileInputStream.java:216) at java.base/java.io.FileInputStream.(FileInputStream.java:157) at java.base/java.util.Scanner.(Scanner.java:639) at com.snksynthesis.voxelgame.gfx.Shader.readFile(Shader.java:100) at com.snksynthesis.voxelgame.gfx.Shader.createShader(Shader.java:80) at com.snksynthesis.voxelgame.gfx.Shader.link(Shader.java:43) at com.snksynthesis.voxelgame.App.init(App.java:47) at com.snksynthesis.voxelgame.App.run(App.java:95) at com.snksynthesis.voxelgame.App.main(App.java:125) java.io.FileNotFoundException: ile:/Users/lach/Documents/Programming/Java/voxel-game/target/voxel-game-1.0.jar!/shaders/fragment.glsl (No such file or directory) at java.base/java.io.FileInputStream.open0(Native Method) at java.base/java.io.FileInputStream.open(FileInputStream.java:216) at java.base/java.io.FileInputStream.(FileInputStream.java:157) at java.base/java.util.Scanner.(Scanner.java:639) at com.snksynthesis.voxelgame.gfx.Shader.readFile(Shader.java:100) at com.snksynthesis.voxelgame.gfx.Shader.createShader(Shader.java:80) at com.snksynthesis.voxelgame.gfx.Shader.link(Shader.java:44) at com.snksynthesis.voxelgame.App.init(App.java:47) at com.snksynthesis.voxelgame.App.run(App.java:95) at com.snksynthesis.voxelgame.App.main(App.java:125) java.lang.Exception: Error linking shader: ERROR: Compiled vertex shader was corrupt. ERROR: Compiled fragment shader was corrupt. at com.snksynthesis.voxelgame.gfx.Shader.link(Shader.java:48) at com.snksynthesis.voxelgame.App.init(App.java:47) at com.snksynthesis.voxelgame.App.run(App.java:95) at com.snksynthesis.voxelgame.App.main(App.java:125) Exception in thread "main" java.lang.RuntimeException: Couldn't load texture! at com.snksynthesis.voxelgame.texture.Texture.(Texture.java:45) at com.snksynthesis.voxelgame.texture.Texture.loadRGBA(Texture.java:66) at com.snksynthesis.voxelgame.chunk.Chunk.(Chunk.java:55) at com.snksynthesis.voxelgame.chunk.ChunkManager.setVisibleChunks(ChunkManager.java:87) at com.snksynthesis.voxelgame.chunk.ChunkManager.setCamPos(ChunkManager.java:99) at com.snksynthesis.voxelgame.App.update(App.java:89) at com.snksynthesis.voxelgame.App.run(App.java:100) at com.snksynthesis.voxelgame.App.main(App.java:125) ```
lokka30 commented 2 years ago

I would also like to add - on macOS we need to skip the ./mvnw compile exec:java step as afaik we can't parse JVM arguments into that command. I used ./mvnw clean package and java -Xstart... -jar ... to compile and run it.

SnkSynthesis commented 2 years ago

Good point, thanks, I've updated the README to include that. I got the same error on Windows. It looks like that loading textures wasn't working with the compiled JAR file. I've fixed it (tested on Windows).

lokka30 commented 2 years ago

Thanks! Another step forward :)

lach@LAIR voxel-game % java -XstartOnFirstThread -jar target/voxel-game-1.0.jar
java.lang.Exception: Error creating shader: ERROR: 0:1: '' :  version '330' is not supported
ERROR: 0:1: '' : syntax error: #version
ERROR: 0:3: 'layout' : syntax error: syntax error

    at com.snksynthesis.voxelgame.gfx.Shader.createShader(Shader.java:88)
    at com.snksynthesis.voxelgame.gfx.Shader.link(Shader.java:42)
    at com.snksynthesis.voxelgame.App.init(App.java:47)
    at com.snksynthesis.voxelgame.App.run(App.java:95)
    at com.snksynthesis.voxelgame.App.main(App.java:125)
FATAL ERROR in native method: Thread[main,5,main]: No context is current or a function that is not available in the current context was called. The JVM will abort execution.
    at org.lwjgl.opengl.GL30C.nglGenVertexArrays(Native Method)
    at org.lwjgl.opengl.GL30C.glGenVertexArrays(GL30C.java:2420)
    at org.lwjgl.opengl.GL30.glGenVertexArrays(GL30.java:2346)
    at com.snksynthesis.voxelgame.gfx.Mesh.<init>(Mesh.java:39)
    at com.snksynthesis.voxelgame.chunk.Chunk.genMesh(Chunk.java:310)
    at com.snksynthesis.voxelgame.chunk.ChunkManager.update(ChunkManager.java:56)
    at com.snksynthesis.voxelgame.App.update(App.java:90)
    at com.snksynthesis.voxelgame.App.run(App.java:100)
    at com.snksynthesis.voxelgame.App.main(App.java:125)

Would you like me to PR an improvement to the README for Linux/Mac users? - the two platforms seem to have different enough instructions I think they should be separate

SnkSynthesis commented 2 years ago

That's better :). I've updated window initialization code to support MacOS. Also, I've updated README to separate Mac and Linux instructions.

lokka30 commented 2 years ago

The instructions are perfect! And, it runs!

Although.. not as we hoped. πŸ˜†

error

Low framerate and extreme CPU usage, likely also high memory usage as it became slower over time.

By the way, I have no expectation for you to actually work on this issue! As voxel-game is a really neat open-source project, I took interest in trying to improve it through issue documentation and testing. Especially since this particular issue is taking up a lot of your free time for a project with low demand, and on both unpopular hardware and an upopular operating system, feel free to leave this issue alone if you wish. :) I would contribute to the codebase if I knew anything about Java game development, but unfortunately I am only familiar with the programming language itself and not any of these libraries. As I am a student, finding the time to learn these libraries is also not an option. 😞

SnkSynthesis commented 2 years ago

Hi @lokka30

πŸ‘ I've made some changes based on the warning that is showing in your terminal when you run the program ("Warning: Validation Failed: ..."). I hope it works now πŸ˜„

lokka30 commented 2 years ago

Hi @lokka30

πŸ‘ I've made some changes based on the warning that is showing in your terminal when you run the program ("Warning: Validation Failed: ..."). I hope it works now πŸ˜„

Hi, unfortunately I still have the same result as last time. Feel free to give up if you want πŸ˜† otherwise I'm happy to continue testing!