nus-cs2103-AY2425S1 / forum

12 stars 0 forks source link

Error initializing QuantumRenderer: no suitable pipeline found #430

Closed jinnsuke closed 1 month ago

jinnsuke commented 1 month ago

Hi! I am doing the AB3 Tutorial and I am stuck at the part where we have to run the code in "Debugger Mode".

I've forked the repository and cloned it, set the breakpoint at the line CommandResult commandResult = logic.execute(commandText); in MainWindow.java.

However, when I go to the main method on Main.java and try to run it using the debugging mode, I get the error

Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found

I am quite sure I am using the right version of Java as per below.

openjdk 17.0.12 2024-07-16 LTS OpenJDK Runtime Environment Zulu17.52+17-CA (build 17.0.12+7-LTS) OpenJDK 64-Bit Server VM Zulu17.52+17-CA (build 17.0.12+7-LTS, mixed mode, sharing)

Please help! Thank you :)

damithc commented 1 month ago

@jinnsuke While waiting for inputs from others, you can share more info, such as the following:

jinnsuke commented 1 month ago

@damithc

  1. Yes, I am using Intellij
  2. I realised that I am facing another error as well

Process 'command '/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

image image
  1. I am able to run AB3 outside of the IDE, using ./gradlew run
  2. What do you mean by running AB3 in normal mode inside the IDE? I think that's the part that I am stuck at. However, I am able to run it normally using the terminal inside Intellij using ./.gradlew run
damithc commented 1 month ago

4. What do you mean by running AB3 in normal mode inside the IDE?

@jinnsuke I meant run it using the green play button (instead of running it in the debug mode)

jinnsuke commented 1 month ago

@damithc

Oh, actually for now, I only get that error when I run it in normal mode. Under debugging mode, I don't get that error anymore for some reason.

nus-se-bot commented 1 month ago

Tagging a few other students (randomly selected) who have completed related increments, in case they can pitch in: @karthickkc @justsparsh @weijianwong @CJianzhi @FYL2003 @mongj @celeschai @JagdeepSinghNUS @weiseng18 @yiiilonggg Others are welcome to pitch in too.

damithc commented 1 month ago

@jinnsuke Ensure you have set the SDK correctly in Intellij https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk

After that, ensure the Gradle JVM is same as the project SDK intellijSetGradleJvm

kvernnn commented 1 month ago

Hi I faced this issue too but it works with this configuration

image

  1. Under project structure -> SDK, I chose the Zulu 17 version instead of OpenJDK 17. Previously I was using OpenJDK 17 also. Not super sure why it works but might be that OpenJDK 17 doesn't have JavaFX
  2. If you want to use OpenJDK 17 version, go to Run -> Edit Configurations -> Modify Options -> Add VM options. Then add '--module-path /path/to/javafx-sdk/lib --add-modules javafx.controls,javafx.fxml,javafx.graphics' but change /path/to/javafx-sdk/lib to the path of where your JavaFX SDK libraries are located in your computer. Again not super sure why this works but if its because OpenJDK 17 doesn't have JavaFX, then this probably just specifies it.
jinnsuke commented 1 month ago

@kvernnn Hey, thanks so much for this. I changed to Zulu 17 version and sure enough, I am able to run it now.

@damithc I followed your instructions but unfortunately it still doesn't work. Based on what @kvernnn recommended, do you advise that option 1 or 2 is better for me to follow?

damithc commented 1 month ago

I followed your instructions but unfortunately it still doesn't work.

@jinnsuke What exactly doesn't work?

based on what @kvernnn recommended, do you advise that option 1 or 2 is better for me to follow?

Mac users must use the exact JDK version we have prescribed. There is no other option.

kvernnn commented 1 month ago

Mac users must use the exact JDK version we have prescribed. There is no other option.

@jinnsuke If you're using Mac I think you need to use the version specified below https://se-education.org/guides/tutorials/javaInstallationMac.html

Had help from @jiaxinnns and @harithh07 !

jinnsuke commented 1 month ago

@kvernnn Yup, I am already using that version. So currently, you are running it by using the Zulu 17 version under Project Structures or did you do the second option of Add VM Options?

I tried your second method but upon clicking Edit Configurations, I don't see an option stating "Modify Options". Instead, this is all I see

image

damithc commented 1 month ago

@jinnsuke You are at the following point of the tutorial? Are you able to follow the steps given in the screenshot? image

jinnsuke commented 1 month ago

@damithc No, I can't follow those steps using OpenJDK17. But I've already completed that part by setting Project Settings -> SDK to Zulu 17 as per below.

image

I just want to check, for File -> Project Structure, under SDK, what is the appropriate SDK to use? Mine is as below image

And also for Run -> Edit configurations, what Java version should we expect to see here? Mine is as below image

damithc commented 1 month ago

@jinnsuke What OS are you on? If on Mac, use the Azul JDK we have prescribed. Otherwise any Java 17 JDK is fine. Use the same JDK everywhere. In fact there is no need to have multiple Java 17 JDKs on your computer.

nus-se-bot commented 1 month ago

@jinnsuke A gentle reminder to close this issue if the problem has been resolved. If not resolved yet, please post a comment explaining which part of the problem/question remains unresolved.

nus-se-bot commented 1 month ago

@jinnsuke I'm closing this issue due to inactivity. Feel free to reopen if the issue is still unresolved.