bugGNU Octave - Bugs: bug #55528, [MXE-Octave] graphics_toolkit...

 
 

bug #55528: [MXE-Octave] graphics_toolkit gnuplot does not work

Submitter:  Avinoam Kalma <avinoam>
Submitted:  Sun 20 Jan 2019 06:20:00 PM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Avinoam Open/Closed:  * Closed
Release:  * 5.0.1 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 27 Jan 2019 09:17:06 PM UTC, comment #34: 

Thank you, @John & @Pantxo: It works for me on Win-7.

Avinoam Kalma <avinoam>
Group Member
Sun 27 Jan 2019 06:04:37 PM UTC, comment #33: 

@Markus: Those tests don't pass with fltk either so I pushed the following change:

http://hg.savannah.gnu.org/hgweb/octave/rev/e2e1aed33f7c

Closing report as fixed.

Pantxo Diribarne <pantxo>
Group Member
Sun 27 Jan 2019 05:44:56 PM UTC, comment #32: 

Plotting with "graphics_toolkit gnuplot" works for me on Windows 10 with your changes.

I see the following two failing tests for "__run_test_suite__" with gnuplot though:

D:\Repositories\Octave\test\octave-2019-01-27-16-56-w64_cdata\octave-2019-01-27-16-56-w64\mingw64\share\octave\6.0.0\m\image\getframe.m
***** testif HAVE_QT_OFFSCREEN; have_window_system ()
 hf = figure ("visible", "off");
 unwind_protect
   pos = get (hf, "position");
   assert (size (getframe (hf).cdata)(1:2), pos(4:-1:3));
 unwind_protect_cleanup
   close (hf);
 end_unwind_protect
!!!!! test failed
getframe: not implemented for gnuplot graphics toolkit
***** testif HAVE_QT_OFFSCREEN; have_window_system ()
 hf = figure ("visible", "off");
 unwind_protect
   hax = axes ("visible", "off", "position", [0 0 1 1]);
   verts = [0 0; .5 0; 1 0; ...
            0 .5; .5 .5; 1 .5; ...
            0 1; .5 1; 1 1];
   faces = [1 2 5 4; 2 3 6 5; 4 5 8 7; 5 6 9 8];
   fvc = [1 0 0; 0 1 0; 0 0 1; 1 0 1];
   patch ("vertices", verts, "faces", faces, "facevertexcdata", fvc, ...
          "facecolor", "flat");

   kk = 1;
   pos = get (hf, "position");

   for jj = [0.05 0.55]
     for ii = [0.05 0.55]
       rect = [ii jj .4 .4].*[pos(3:4) pos(3:4)];
       frame = getframe (hax, rect).cdata;
       assert (frame(:,:,1) == fvc(kk,1)*255);
       assert (frame(:,:,2) == fvc(kk,2)*255);
       assert (frame(:,:,3) == fvc(kk,3)*255);
       kk++;
     endfor
   endfor
 unwind_protect_cleanup
   close (hf);
 end_unwind_protect
!!!!! test failed
getframe: not implemented for gnuplot graphics toolkit


Should we skip these tests for gnuplot? New bug report?

Markus Mützel <mmuetzel>
Group administrator
Sun 27 Jan 2019 03:18:42 PM UTC, comment #31: 

@John: I think there is no reason for the patch to not work on stable.

Since the gnuplot toolkit is still preferred by many users, this can be considered a serious regression, so I pushed the patch to stable:

http://hg.savannah.gnu.org/hgweb/octave/rev/803006651db5

Marking "Ready for Test".


Pantxo Diribarne <pantxo>
Group Member
Sat 26 Jan 2019 01:48:46 PM UTC, comment #30: 

@Pantxo, I compiled dev with your patch and it looks its working - assuming it will also work the same on stable.


@Avinoam, I updated the pango patch and tried it on a win7 machine and it didnt have any errors so the updated mxe with that


John Donoghue <lostbard>
Group Member
Fri 25 Jan 2019 07:17:04 PM UTC, comment #29: 

I'll try the patch - the computer I have access to today is very slow so will take a loooong time to compile

I see a couple of places I missed on the or the ScriptIsComplex issue patch, so will push them up when I get a chance as well

John Donoghue <lostbard>
Group Member
Fri 25 Jan 2019 04:40:21 PM UTC, comment #28: 

I attached a new version of the patch with a change log. The only test I could do is that it does not break the ASCII chart terminal (see bug #54937) and that with this terminal, printing also works.

(file #46098)

Pantxo Diribarne <pantxo>
Group Member
Fri 25 Jan 2019 03:18:42 PM UTC, comment #27: 

I am probably responsible for that since I allowed recursion in drawnow. It did cause problems on linux with ASCII gnuplot terminal (see bug #54937), but not with standard terminals.

Does the attached patch fix the issue?

(file #46095)

Pantxo Diribarne <pantxo>
Group Member
Fri 25 Jan 2019 11:38:32 AM UTC, comment #26: 

adding same print out in _gnuplot_drawnow_ in linux and running


graphics_toolkit('gnuplot');
plot([1])


And it shows _gnuplot_drawnow_ being called only once, so am not sure what the issue with windowx octave epeatedly calling _gnuplot_drawnow_.


John Donoghue <lostbard>
Group Member
Fri 25 Jan 2019 08:17:32 AM UTC, comment #25: 

It seems that it did not help.
In Win-7, gnuplot is not working because of libpangowin32-1.0-0.dll.

Avinoam Kalma <avinoam>
Group Member
Fri 25 Jan 2019 01:46:03 AM UTC, comment #24: 

Anyone get a chance to see if that push at least stopped the ScriptIsComplex issue in windows 7 ?



John Donoghue <lostbard>
Group Member
Wed 23 Jan 2019 09:43:58 PM UTC, comment #23: 

That's with about 20 stopped in C:\Octave\OCTAVE~1.12\mingw64\share\octave\5.0.1\m\plot\util\__gnuplot_drawnow__.m at line
73


messages showing before hand



John Donoghue <lostbard>
Group Member
Wed 23 Jan 2019 09:42:20 PM UTC, comment #22: 

And if I put a breakpoint in  gnuplot_drawnow, line 73

plot_stream = _gnuplot_open_stream_ (2, h);


and run:

graphics_toolkit ("gnuplot")
plot([1])



I get a error:



error: max_recursion_depth exceeded
error: called from
    _gnuplot_drawnow_ at line 73 column 19

John Donoghue <lostbard>
Group Member
Wed 23 Jan 2019 09:25:21 PM UTC, comment #21: 

Not sure if related, but if I use the 4.4.0 stable  built and modify

_gnuplot_drawnow_.m

to print when entering and leaving the cuntion I get:

in _gnuplot_drawnow_
out _gnuplot_drawnow_


Doing the same for 5.0.1, I get a lot of

in _gnuplot_drawnow_

before it stops doing anything




John Donoghue <lostbard>
Group Member
Wed 23 Jan 2019 08:57:52 PM UTC, comment #20: 

I pushed up a patch for pango that will hopefully fix the error, if someone can check that works ok on a win7 machine


It doesnt fix the issue with not displaying the plot window, which appears to be something that changes in octave rather than updated libraries in mxe.

John Donoghue <lostbard>
Group Member
Wed 23 Jan 2019 06:51:45 PM UTC, comment #19: 

I went ahead and filed a wishlist bug for item 3 to improve the error message, see bug #55558.

Mike Miller <mtmiller>
Group Member
Wed 23 Jan 2019 06:44:27 PM UTC, comment #18: 

Its seems that there are 2 (even 3) issues here, when using stable branch (ver. 5.0.1):
1. In Win-7, gnuplot is not functional, because dlls issues.
2. In  Win-10 (and in Win-7 if we fix 1) gnuplot gets stuck in the command tmp = __go_uimenu__ (h, args{:});   in uimenu.m.
3. When gnuplot is installed but not functional, the result of the command "graphics_toolkit gnuplot" Is "error: graphics_toolkit: gnuplot version too old.", which is wrong.

Avinoam Kalma <avinoam>
Group Member
Wed 23 Jan 2019 12:54:24 PM UTC, comment #17: 

Still at commit http://hg.octave.org/mxe-octave/rev/22937c7fe60d, and compiling with octave-4.4.1 works with out any issue for me.

John Donoghue <lostbard>
Group Member
Wed 23 Jan 2019 01:58:10 AM UTC, comment #16: 

Moving usp10 to before gdi was fixed in http://ftp.gnome.org/pub/GNOME/sources/pango/1.42/pango-1.42.3.changes

so updating pango might fix the issue

John Donoghue <lostbard>
Group Member
Wed 23 Jan 2019 01:49:45 AM UTC, comment #15: 

i had seem a mention on the gimp dev site for issues with win7 causing error message with ScriptIsComplex errors

I am thinking thier are perhaps two separate issues here.

ANother quick look around for the ScriptIsCOmplex issue: https://github.com/Alexpux/MINGW-packages/issues/3122#issuecomment-379431033




John Donoghue <lostbard>
Group Member
Tue 22 Jan 2019 11:03:35 PM UTC, comment #14: 

If I do not move gnuplot it does not work. The problem is with libpangowin32-1.0-0.dll, if I remove it gnuplot works well (standalone).

But than


graphics_tookit gnuplot
plot (rand(10))


hangs Octave, which what you also saw.

Avinoam Kalma <avinoam>
Group Member
Tue 22 Jan 2019 10:14:30 PM UTC, comment #13: 

I tried rolling back to http://hg.octave.org/mxe-octave/rev/22937c7fe60d, which was before the mingw update

but with the update of the stable octave version applied

When running in win10, it gets stuck somewhere with gnuplot running but never showing anything (which is what I am seeing in the current tip)



Try a at the same place but without the stable version update next





John Donoghue <lostbard>
Group Member
Tue 22 Jan 2019 12:50:52 PM UTC, comment #12: 

If you don't copy gnuplot, but run it from the bin directory using command window does it work ?

John Donoghue <lostbard>
Group Member
Mon 21 Jan 2019 09:32:53 PM UTC, comment #11: 

I am building on Ubuntu 18.04, and run on Win-7 (64 bit)

Avinoam Kalma <avinoam>
Group Member
Mon 21 Jan 2019 09:04:36 PM UTC, comment #10: 

What OS?

John Donoghue <lostbard>
Group Member
Mon 21 Jan 2019 08:18:26 PM UTC, comment #9: 


./configure --enable-devel-tools --enable-octave=stable --enable-windows-64 --en
able-64


Avinoam Kalma <avinoam>
Group Member
Mon 21 Jan 2019 08:03:17 PM UTC, comment #8: 

@avinoam What optios do you use for configuring the mxe build?

John Donoghue <lostbard>
Group Member
Mon 21 Jan 2019 07:45:09 PM UTC, comment #7: 


>> addpath (fullfile (__octave_config_info__ ('fcnfiledir'), 'plot', 'util', 'private'));
>> __gnuplot_version__
error: you must have gnuplot installed to display graphics; if you have gnuplot installed in a non-
standard location, see the 'gnuplot_binary' function


And I get also an error window with


The procedure entry point ScriptIsComplex could not be located
In the dynamic link library GDI32.dll.


Actually, the error message "error: graphics_toolkit: gnuplot version too old." is misleading,
because the problem is that gnuplot is not functional.

If I copy gnuplot.exe to another directory, it works fine:


c:\Octave\Octave-5.0.1\mingw64\bin\tmp>.\gnuplot.exe

        G N U P L O T
        Version 5.2 patchlevel 6    last modified 2019-01-01

        Copyright (C) 1986-1993, 1998, 2004, 2007-2018
        Thomas Williams, Colin Kelley and many others

        gnuplot home:     http://www.gnuplot.info
        faq, bugs, etc:   type "help FAQ"
        immediate help:   type "help"  (plot window: hit 'h')

Terminal type is now 'wxt'
Options are '0 enhanced'
Encoding set to 'default'.
gnuplot>


It seems that one of the dll's in directory Octave-5.0.1\mingw64\bin makes gnuplot non-functional.

 


Avinoam Kalma <avinoam>
Group Member
Mon 21 Jan 2019 06:11:03 PM UTC, comment #6: 

For me:


$ gnuplot.exe &
[1] 44096

johnd@JYRW4S1 MINGW64 ~
$
        G N U P L O T
        Version 5.2 patchlevel 6    last modified 2019-01-01

        Copyright (C) 1986-1993, 1998, 2004, 2007-2018
        Thomas Williams, Colin Kelley and many others

        gnuplot home:     http://www.gnuplot.info
        faq, bugs, etc:   type "help FAQ"
        immediate help:   type "help"  (plot window: hit 'h')

Terminal type is now 'wxt'
Options are '0 enhanced'
Encoding set to 'cp1252'.
gnuplot>


John Donoghue <lostbard>
Group Member
Mon 21 Jan 2019 06:07:46 PM UTC, comment #5: 

mxe-octave is currently at v5.2.6 from 11-Jan, however I do see an issue on mine - calling plot([1]) enever returns -if I look at the process list, gnuplot is running.




 __gnuplot_version__ reports the version correctly.


and via command line: gnuplot -p -e "plot (x)" displays ok

John Donoghue <lostbard>
Group Member
Mon 21 Jan 2019 06:05:51 PM UTC, comment #4: 

In a bash shell on mxe-octave the gnuplot command gives neither error message nor output.
"gnuplot &" gives'[1] 6884" so it sees to run somehow but that's about it.
So I conclude gnuplot.exe is somehow broken.

I'll cc John D.

Philip Nienhuis <philipnienhuis>
Group Member
Mon 21 Jan 2019 05:07:55 PM UTC, comment #3: 

Try


>> addpath (fullfile (__octave_config_info__ ('fcnfiledir'), 'plot', 'util', 'private'));
>> __gnuplot_version__
ans = 5.2.6


If that throws an error or returns something that doesn't look like 5.2.5, that may help explain this.

Mike Miller <mtmiller>
Group Member
Mon 21 Jan 2019 05:04:57 PM UTC, comment #2: 

Can you run gnuplot standalone?
5.2.5 is new enough, something else is going on.

Dmitri.
--



Dmitri A. Sergatskov <dasergatskov>
Mon 21 Jan 2019 04:54:46 PM UTC, comment #1: 

I get:

>> graphics_toolkit gnuplot
error: graphics_toolkit: gnuplot version too old.
error: called from
    graphics_toolkit at line 88 column 9


The src/gnuplot.mk file says version is 5.2.5; a newer version mentions 5.2.6.
(and at present I can't update the mxe-octave repo (Gateway time-out)

Philip Nienhuis <philipnienhuis>
Group Member
Sun 20 Jan 2019 06:20:00 PM UTC, original submission:  



>> graphics_toolkit gnuplot
error: graphics_toolkit: gnuplot version too old.
error: called from
    graphics_toolkit at line 88 column 9
>> available_graphics_toolkits ()
ans =
{
  [1,1] = fltk
  [1,2] = gnuplot
  [1,3] = qt
}


If I execute gnuplot manually, I get:


The procedure entry point ScriptIsComplex could not be located
In the dynamic link library GDI32.dll.



Avinoam Kalma <avinoam>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #46098:  no_recursion.patch added by pantxo (2KiB - text/x-patch)
file #46095:  no_recursion.patch added by pantxo (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by pantxo (Updated the item)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by philipnienhuis
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by avinoam (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-27 pantxo StatusNone Fixed
        Open/ClosedOpen Closed
    2019-01-27 mmuetzel StatusReady For Test None
    2019-01-27 pantxo StatusNone Ready For Test
    2019-01-25 pantxo Attached File- Added no_recursion.patch, #46098
    2019-01-25 pantxo Attached File- Added no_recursion.patch, #46095
    2019-01-21 philipnienhuis Carbon-Copy- Added lostbard

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code