bugGNU Octave - Bugs: bug #42829, FLTK plot not respondent during...

 
 

bug #42829: FLTK plot not respondent during pause

Submitter:  Rodrigo <rudregues>
Submitted:  Tue 22 Jul 2014 05:29:35 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Rodrigo Open/Closed:  * Closed
Release:  * 3.8.1 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 22 Jul 2014 07:03:57 PM UTC, comment #8: 

If gnuplot is used as graphics_toolkit, octave uses popen2 to create a subprocess with two-way communication. See
scripts/plot/util/private/__gnuplot_open_stream__.m

The fltk graphics tookit runs in the main octave thread instead.

Andreas Weber <andy1978>
Group Member
Tue 22 Jul 2014 06:48:24 PM UTC, comment #7: 

Well, thanks Mike for clarifying this. But one question remais: why gnuplot worked even with 'pause' inside the m-file? Is it supposed to work this way while fltk isn't?

Rodrigo <rudregues>
Tue 22 Jul 2014 06:42:49 PM UTC, comment #6: 

@Rodrigo: I already explained, that input_event_hooks is not called while pause is executed. This is not a bug but per design.

Btw, if you call "pause" after plot within an Octave session, the plot window also gets "freezed" until pause ends.

I'll close this bug report as invalid.

You can ask on the help mailinglist if you need help finding a way to solve your particular task while keeping the plot window respondent.

Andreas Weber <andy1978>
Group Member
Tue 22 Jul 2014 06:36:19 PM UTC, comment #5: 

Thanks. So as Andy said, using pause suspends the Octave interpreter and blocks interacting with the FLTK plot. If you execute pause in a running Octave session, you'll see the same thing. It's not that one is from the terminal and one is in an Octave session, it's that you are using the pause function which blocks FLTK.

What you might want instead is to run your script without the pause function call and with the --persist option to Octave to keep it in the interpreter after the script has finished executing.

Mike Miller <mtmiller>
Group Member
Tue 22 Jul 2014 06:28:20 PM UTC, comment #4: 

"for example from the system shell or within a running Octave session?"

The problem occurs just when I execute the m-file from the terminal. If I plot from a running Octave session it doesn't occur.

Rodrigo <rudregues>
Tue 22 Jul 2014 06:24:36 PM UTC, comment #3: 

I excute in the terminal this way:

$ octave file.m

(file #31755)

Rodrigo <rudregues>
Tue 22 Jul 2014 05:51:49 PM UTC, comment #2: 

As Mike already suggested: please add an example m-file.

The FLTK plotting windows need periodical calls of _fltk_redraw_ to stay respondent for events like button clicks for example. This is done with an input_event hook which is executed when octave waits for input.

If you have a m-file which does some calculations, calls plot, does some other calculations, stays in a loop, calls system/sleep/pause octave is busy and doesn't call _fltk_redraw_.

-- Andy

Anonymous
Tue 22 Jul 2014 05:37:38 PM UTC, comment #1: 

Thanks for your bug report. Please attach an example m-file that shows the problem you are reporting, and show specifically how you are executing that m-file with Octave (for example from the system shell or within a running Octave session?).

Mike Miller <mtmiller>
Group Member
Tue 22 Jul 2014 05:29:35 PM UTC, original submission:  

This happens only with the default plotter (fltk).

Explaining better:
When I execute a plot from a m-file I'm not able to click in the options 'A', 'G', 'P', 'R' or '?'. Even to close that window in the X (besides minimization and maximization) I click and nothing happens. The scrolling doesn't scale the graphics. And clicking 'File' or 'Edit' nothing happens too.

However, if I do command by command from the m-file everything works.


Gnuplot works by terminal or by executing the m-file.

Rodrigo <rudregues>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #31755:  file.m added by rudregues (22B - text/x-objcsrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by andy1978 (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by rudregues (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-07-22 andy1978 StatusNeed Info Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
        Summarycan\'t click in the plot with m-file FLTK plot not respondent during pause
    2014-07-22 rudregues Attached File- Added file.m, #31755
    2014-07-22 mtmiller Item GroupNone Incorrect Result
        StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code