Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default spice4qucs working directory path set to /spice4qucs #86

Closed
bladane opened this issue Apr 11, 2022 · 11 comments
Closed

Default spice4qucs working directory path set to /spice4qucs #86

bladane opened this issue Apr 11, 2022 · 11 comments
Assignees
Labels
Milestone

Comments

@bladane
Copy link

bladane commented Apr 11, 2022

Installed qucs-s 0.0.23 for ubuntu20.04 (followed procedure from the site: [https://ra3xdh.github.io/#docs] ).

It also installed ngspice-31 that I checked with simple *.cir example and it is working. So Ngspice is working.

Then I opened Qucs 0.0.23 and created an example of RC schematic from tutorial (prior to this set ngspice as default simulator and directed to Ngspice executable location: /usr/bin/ngspice) but when tried to simulate it is showing:

  • popup window Simulate with external simulator with message in Simulation console - Ngspice started and
  • new popup window with message Failed to start simulator.
  • And when Failed to start simulator popup is closed it writes inside Simulation console new message - Ngspice error...

Any recommendation how to debug this problem.

@ra3xdh
Copy link
Owner

ra3xdh commented Apr 11, 2022

This may be related to #85 Please send me your qucs-s.conf file. I cannot reproduce this issue on my clean Ubunutu20.04 installation. It seems that the path for netlist file somehow set is unwriteable.

@bladane
Copy link
Author

bladane commented Apr 11, 2022

here is the content of qucs-s.conf (renamed to txt):
qucs_s.conf.txt
Thnx!

@ra3xdh
Copy link
Owner

ra3xdh commented Apr 11, 2022

Yes, my suspicions were correct. The working directory is not writeable. Please also send me screenshot from the Simulation->Select default simulator menu. I am interested what is this setting:
image

@ra3xdh ra3xdh added the bug label Apr 11, 2022
@bladane
Copy link
Author

bladane commented Apr 11, 2022

Here is the screenshot -

Select default simulator menu

@bladane
Copy link
Author

bladane commented Apr 11, 2022

Fixed it by changing the directory to store netlist and simulator output to my home dir (/home/user/.qucs). Now it is working!
Thank you one again!

@ra3xdh
Copy link
Owner

ra3xdh commented Apr 11, 2022

As a workaround you may to set "Directory to store netlist ..." as the writeable path. Usually it should be $HOME/.qucs/spice4qucs/. I will check why it may be not set correctly automatically.

@bladane
Copy link
Author

bladane commented Apr 11, 2022

Done as per your suggestion.

@ra3xdh
Copy link
Owner

ra3xdh commented Apr 11, 2022

Yes, I can reproduce an issue now. The Qucs-S may set the working directory as an unwriteable path. It's strange that it was not discovered before. I will provide a fix soon.

@ra3xdh ra3xdh self-assigned this Apr 11, 2022
@ra3xdh ra3xdh added this to the 0.0.24 milestone Apr 11, 2022
@ra3xdh ra3xdh changed the title Ngspice error Default spice4qucs working directory path set to /spice4qucs Apr 11, 2022
@ra3xdh
Copy link
Owner

ra3xdh commented Apr 11, 2022

I made more investigations on this. The issue can take place if the directory $HOME/.qucs doesn't exist. The QDir::absolutePath() returns an empty string in such case (main.cpp line 147). This also explains why this issue was discovered only recently. The most of Qucs-S users had also Qucs installed and .qucs directory was already presented on the first application start.

@bladane
Copy link
Author

bladane commented Apr 11, 2022

I had qucs but it was installed with snap (and in snap directory). And that is not visible to qucs-s.

ra3xdh added a commit that referenced this issue Apr 11, 2022
@ra3xdh
Copy link
Owner

ra3xdh commented Apr 11, 2022

Fixed by 6d78f16 on master branch. The fix will be available in 0.0.24 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants