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

 
 

bug #42829: FLTK plot not respondent during pause

Submitted by:  Rodrigo <rudregues>
Submitted on:  Tue 22 Jul 2014 05:29:35 PM UTC  
 
Category: Plotting with OpenGLSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: None
Originator Name: RodrigoOpen/Closed: Closed
Release: 3.8.1Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission 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>
Project 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>
Project 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>
Project Administrator
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>
Project Administrator
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 File(s):
   
   
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
  • -unavailable- added by andy1978 (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by rudregues (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 22 Jul 2014 06:42:49 PM UTCandy1978StatusNeed Info=>Invalid
      Open/ClosedOpen=>Closed
      Summarycan\'t click in the plot with m-file =>FLTK plot not respondent during pause
    Tue 22 Jul 2014 06:24:36 PM UTCrudreguesAttached File-=>Added file.m, #31755
    Tue 22 Jul 2014 05:37:38 PM UTCmtmillerItem GroupNone=>Incorrect Result
      StatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1