Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#114 Octave link broken

0.0.18
closed-fixed
nobody
None
5
2014-05-16
2013-06-28
Guilherme
No

Mike Brinson reported:

Recent code changes to Qucs-0.0.17 and Qucs-0.0.18 appear to have caused the
link between Qucs and Octave post processing to become broken. The problem is
as follows: when using Octave linked to Qucs for post-simulation data processing
the link works correctly the first time a simulation is run. However, subsequent simulator
runs fail to complete ( ie stick!). The attached Qucs project file demonstrates the effect.

See attached example

1 Attachments

Related

Bugs: #114

Discussion

  • Guilherme
    Guilherme
    2013-06-28

    Somehow the octave window is blocking other processes. You can run the schematic multiple times as long as you 'exit' octave before running again.

    Issues:
    1) Octave still uses Q3Process, the qcusator is using QProcess;
    2) Octave is assumed to be on the path;
    3) How can I get it to read ~/.octaverc, where I setup 'setenv ("GNUTERM", "X11")'. This is needed to get it to plot on Mac OSX.

     
  • MikeBrinson
    MikeBrinson
    2013-06-28

    Hello Guilherme

    Thanks for confirming the Qucs-Octave link problem.
    Qucsstudio uses SendSignal to link with Octave.
    SendSignal could be worth looking at - however Qucsstudio still
    uses Qt3 so it might not help.

    Best wishes.

    Mike

    Mike Brinson

    mbrin72043@yahoo.co.uk

     
    Last edit: Guilherme 2013-06-28
  • Frans
    Frans
    2013-06-28

    This should be fixed right now, I think it was an incompatibility between Q3Process and QProcess
    I have ported most Q3Processes now (some are remaining) and it seems to work now

     
  • Frans
    Frans
    2013-06-28

    This should be fixed right now, I think it was an incompatibility
    between Q3Process and QProcess
    I have ported most Q3Processes now (some are remaining) and it seems to
    work now

     
  • Guilherme
    Guilherme
    2013-06-28

    I made some further tweaks to get it working on my box. It looks good here.

     
  • Guilherme
    Guilherme
    2013-06-28

    • status: open --> accepted
     
  • Frans
    Frans
    2013-06-29

    Hi Guilherme, Yesterday I committed some code to port the octave Q3Process, which fixed the bug that the simulation would not finish the second time if an octave script was involved.
    A few hours later you committed some code, now my octave (ubuntu) does not start anymore.

     
  • Guilherme
    Guilherme
    2013-06-29

    Sorry for that. I saw your commits, however they were not working on my side (Mac OSX).
    We have to provide the full path to octave. It also need to be aware of the location of gnuplot. I tried to make the path to octave portable, and also injected the QucsDir into the octave process environment (under the assumption that gnuplot is also on QucsDir, '/usr/local/bin' in my case).

     
  • Frans
    Frans
    2013-06-30

    Maybe we should add a path to octave to QucsConfig. It should not be QucsDir, maybe OCTAVEBINDIR (OCTAVEDIR) is already occupied.

     
  • Guilherme
    Guilherme
    2013-07-01

    I think it makes sense to have a path to Octave. Environment variables should be looked first. Perhaps we could even add another tab to the 'Application Settings' which lists the registered tools and allow users to point to the used tools (octave, iverilot,...).

     
  • Frans
    Frans
    2013-07-01

    I am now working on the QSettings implementation in stead of qucsrc. With QSettings it is very easy to also add an extra tab in application settings with a few "browse" buttons.

     
    • Guilherme
      Guilherme
      2013-07-02

      Frans, very nice the QSettings feature. I really miss the option of relocating with the QUCSDIR variable. It is helpful on development. I have a 'good' version of Qucs in /usr/local and a 'development' version on ~/git/qucs. Setting QUCSDIR before starting the development version allow it to use all resources from the 'good' one. It makes easy to compare changes.
      Would the attached patch be ok?
      Can we get a plain text of the QSettings? Haven't found it yet on my Mac.
      Do you foresee any breakage with users relying on .qucsrc?
      Last question, can we save/reset the last position of the toolbars?

       
  • Frans
    Frans
    2013-07-02

    Hi Guilherme,
    I think we can remove qucsdir from qsettings.
    Your patch will ignore it anyway. I think that is a good thing because it will now extract the executable location unless you specify qucsdir.
    Frans

     
  • Frans
    Frans
    2013-07-02

    Hi Guilherme, I have not completely used your patch, but QUCSDIR can now be used again, and those variables have been removed from QSettings. The octave path is only derived from OCTAVEBINDIR the first run, later the path can be set in application settings.

     
    • Guilherme
      Guilherme
      2013-07-03

      I was packaging a 0.0.18 snapshot and there is still a problem on Mac.
      there is a '/usr/local/bin/qucs' script which points to the actual application binary which lives inside the Mac bundle '/usr/local/bin/qucs.app/Contents/MacOS/qucs'. Therefore the QucsApplicationPath is wrong. If we replace or remove '/bin*' it should be ok.

       
      • Guilherme
        Guilherme
        2013-07-03

        I changed it to:
        - QucsDir = QDir(QucsApplicationPath.replace("/bin",""));
        + QucsDir = QDir(QucsApplicationPath.section("/bin",0,0));

         
  • Frans
    Frans
    2013-07-02

    I think we can close this bug now right?

     
  • Guilherme
    Guilherme
    2013-07-02

    It looks very good! I think you can close. I would add the other external tools (asco, freehdl, iverilog) to the new locations tab. What do you think?

     
  • Frans
    Frans
    2013-07-03

    freehdl and iverilog are a little problematic because they are called through qucsdigi and qucsveri, the full path is not provided by qucs.
    Maybe we can add a command line option, then we can them to the settings as well.

     
    • Guilherme
      Guilherme
      2013-07-03

      Sounds good.

       
  • MikeBrinson
    MikeBrinson
    2013-07-03

    Hello all

    I have downloaded the latest Qucs version using the QSettings feature.  This works well, removing the
    problems that resulted previously when using Octave with Qucs.  The code seems much more robust than 
    earlier versions.  However, one small point I noticed from the latest snapshot:  the listed Qucs output messages
    are no longer the same as before.  Is this a result of the new experimental matrix solution library routines?
    While changes are being finalised it would be a good idea to output simulation time to a much higher resolution
    than previously provided by Qucs - say to a milli-second rather than a second.

    Best wishes.

    Mike


    Mike Brinson

    mbrin72043@yahoo.co.uk


    From: Guilherme guitorri@users.sf.net
    To: [qucs:bugs] 114@bugs.qucs.p.re.sf.net
    Sent: Tuesday, 2 July 2013, 10:43
    Subject: [qucs:bugs] Re: #114 Octave link broken

    Frans, very nice the QSettings feature. I really miss the option of relocating with the QUCSDIR variable. It is helpful on development. I have a 'good' version of Qucs in /usr/local and a 'development' version on ~/git/qucs. Setting QUCSDIR before starting the development version allow it to use all resources from the 'good' one. It makes easy to compare changes.
    Would the attached patch be ok?
    Can we get a plain text of the QSettings? Haven't found it yet on my Mac.
    Do you foresee any breakage with users relying on .qucsrc?
    Last question, can we save/reset the last position of the toolbars?


    [bugs:#114] Octave link broken
    Status: accepted
    Created: Fri Jun 28, 2013 03:18 PM UTC by Guilherme
    Last Updated: Mon Jul 01, 2013 12:23 PM UTC
    Owner: nobody
    Mike Brinson reported:
    Recent code changes to Qucs-0.0.17 and Qucs-0.0.18 appear to have caused the
    link between Qucs and Octave post processing to become broken. The problem is
    as follows: when using Octave linked to Qucs for post-simulation data processing
    the link works correctly the first time a simulation is run. However, subsequent simulator
    runs fail to complete ( ie stick!). The attached Qucs project file demonstrates the effect.
    See attached example


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/qucs/bugs/114/
    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     

    Related

    Bugs: #114

  • Frans
    Frans
    2013-07-03

    I changed it to:
    - QucsDir = QDir(QucsApplicationPath.replace("/bin",""));
    + QucsDir = QDir(QucsApplicationPath.section("/bin",0,0));

    Please revert, it doesn't work on linux. If you make mac specific changes, you could use #ifdef __APPLE__

     
  • Guilherme
    Guilherme
    2013-07-04

    On 03/07/13 13:21, Frans wrote:

    I changed it to:
    - QucsDir = QDir(QucsApplicationPath.replace("/bin",""));
    + QucsDir = QDir(QucsApplicationPath.section("/bin",0,0));
    

    Please revert, it doesn't work on linux. If you make mac specific
    changes, you could use #ifdef APPLE

    I see that you added the ifdef already. Thanks!
    Indeed there are differences on how the application dir is returned:
    http://qt-project.org/doc/qt-4.8/qcoreapplication.html#applicationDirPath

     
  • Guilherme
    Guilherme
    2014-05-16

    • status: accepted --> closed-fixed
     
  • Guilherme
    Guilherme
    2014-05-16

    Closing. It looks to work fine.