bugGNU Octave - Bugs: bug #33291, Gnuplot does not work anymore due...

 
 

bug #33291: Gnuplot does not work anymore due to wrong code in __gnuplot_get_var__.m

Submitted by:  fidelcastro <transsilvanien>
Submitted on:  Wed 11 May 2011 02:48:51 PM UTC  
 
Category: Plotting with gnuplotSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: Works For MeAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.4.0Operating System: Other

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)

Fri 14 Oct 2011 07:03:15 AM UTC, comment #14:

Johan,
if you have a X server problem on cygwin
we should discuss on the cygwin mailing list.
Please follow
http://cygwin.com/problems.html
guideline.

I see no reason to raise this issue on the octave bug tracker

Regards
Marco

marco atzeri <matzeri>
Fri 14 Oct 2011 06:43:09 AM UTC, comment #13:

I have this exact problem, however, using a cyqgwin1.dll from cygwin1-20111013.dll.bz2 or cygwin1-20110829.dll.bz2 makes it impossible to start x. Using cygwin1-20110829.dll.bz2 and starting a normal shell and starting x gives:

Starting xwin just cause a crash.

I'm using

on windows xp.

XWin.0.log looks like this

thanks / Johan

Johan Lans <hadoque>
Fri 23 Sep 2011 06:21:53 AM UTC, comment #12:

The new cygwin1.dll snapshot appears to fix the problem for me. Currently running octave 3.4.2-2 and gnuplot 4.4.0-1 on Windows XP.

Mike Ng <mng2>
Thu 15 Sep 2011 04:00:33 AM UTC, comment #11:

could you check if octave-3.4.2 and a recent cygwin1.dll
snapshot solve the problem ?
(from June the problem should be solved)

To test a cygwin snapshots

download cygwin1-20110829.dll.bz2 from
http://cygwin.com/snapshots/

$ bunzip2 cygwin1-20110829.dll.bz2
$ cp cygwin1-20110829.dll cygwin1.dll
$ cp /bin/cygwin1.dll /bin/cygwin1.dll_backup

exit all cygwin processes and from windows explorer
copy the cygwin1.dll snapshot to

c:\cygwin\bin
(or in the equivalent directory of you cygwin installation)

marco atzeri <matzeri>
Tue 31 May 2011 05:28:31 PM UTC, comment #10:

The problem is getting narrowed down, however I'm not sure what you want to try next.

Briefly, gnuplot works in a stand-alone environment and sets the terminal type to x11. However, when Octave calls gnuplot and asks for the terminal type it gets the null string.

As Ben pointed out, this could be a problem with communication. Octave, I believe, uses FIFOs which aren't always supported well outside of UNIX-like operating systems. Does 'graphics_toolkit fltk' work on Cygwin? If so, another choice would be to ditch gnuplot entirely.

Rik <rik5>
Project Administrator
Thu 26 May 2011 08:12:46 AM UTC, comment #9:

Sorry, for my mistake...

fidelcastro <transsilvanien>
Wed 25 May 2011 05:17:57 PM UTC, comment #8:

The command 'print GPVAL_TERM' needs to be run from a gnuplot instance, not an Octave instance. So, can you try the following set of commands in gnuplot at the command line

Rik <rik5>
Project Administrator
Wed 25 May 2011 12:34:33 PM UTC, comment #7:

I installed the three missing packages from cygwin, and then the output is:

fidelcastro <transsilvanien>
Tue 24 May 2011 11:23:11 PM UTC, comment #6:

If "str" is an empty cell, then I assume that gnuplot isn't handling the printing of variables correcty ... either that or something is wrong with the communication between gnuplot and octave.

When running gnuplot, what does the following produce?

Also what version of gnuplot are you running?

Ben Abbott <bpabbott>
Project Member
Thu 19 May 2011 04:10:55 PM UTC, comment #5:

There is good news/bad news here. The good news is that this doesn't seem to be specifically an Octave issue, but rather a gnuplot issue. The bad news is that you still have a problem. I would try getting gnuplot to work in a standalone manner. Once you can do that, then there may be a chance of figuring out how to get Octave to call gnuplot in the correct manner. See, for example, the help text for gnuplot_binary().

I'm attaching a simple data file, tst.dat, to the bug report. I can produce something in gnuplot with these lines.

(file #23432)

Rik <rik5>
Project Administrator
Thu 19 May 2011 08:28:55 AM UTC, comment #4:

Thanks for your interest and suggestions. So, I tried as you told and I got the following results:

So, at least cell arrays do work.

Hence, the results for disp(str) are different on my system, but I cannot interpret what the value of str means...

fidelcastro <transsilvanien>
Mon 16 May 2011 04:23:56 PM UTC, comment #3:

Well this is a promising line to debug. Do cell arrays and comma separated lists work at all on the Windows build?

Code to test:

If this doesn't work, then there is something deeply wrong with the Octave build you have. If it does work then you will need to poke around in _gnuplot_get_var_.m to discover why strcat is not being given the correct input arguments.

I would try this:

which will bring you to a "debug>" prompt at line 113.
Check the value of str before the call to strcat

Also check the type

which should be cell.

Rik <rik5>
Project Administrator
Mon 16 May 2011 09:10:15 AM UTC, comment #2:

With the line

gnuplot_get_var.m:113 -> str = strcat (str{:});

I get the following on my fully updated cygwin under win 7 64 bit:

fidelcastro <transsilvanien>
Sun 15 May 2011 01:26:56 AM UTC, comment #1:

gnuplot as a backend works correctly for me. This is on a Linux system (Kubuntu 10.04) with gnuplot 4.2.6.

The Octave code in question is correct. 'str', at line 113 of _gnuplot_get_var_.m is a cell array of strings. The call 'str{:}' returns each cell of the array which is then concatenated into a real string. The code you quote as belonging to the previous version produces an error when run.

Starting from something simple, does the gnuplot toolkit work for simple graphs like

Rik <rik5>
Project Administrator
Wed 11 May 2011 02:48:51 PM UTC, original submission:

I myself - and others http://permalink.gmane.org/gmane.os.cygwin/126369 - have experienced that gnuplot does not work anymore.

E.g. when I executed imshow() from octave the function failed to complete due to the following coding error in _gnuplot_get_var_.m:

The previous version is correct, which I have fixed manually.

After this imshow() still fails at this line in the same file:

I have repleced this code with

and now imshow() works for me again. I think these fixes should be incorporated into the stable version. Thanks.

fidelcastro <transsilvanien>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #23432:  tst.dat added by rik5 (20B - application/x-ns-proxy-autoconfig)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by hadoque (Posted a comment)
  • -unavailable- added by mng2 (Posted a comment)
  • -unavailable- added by matzeri (Posted a comment)
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by transsilvanien (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 23 Sep 2011 03:53:59 PM UTCrik5Open/ClosedOpen=>Closed
    Thu 19 May 2011 04:10:55 PM UTCrik5Attached File-=>Added tst.dat, #23432
    Sun 15 May 2011 01:26:56 AM UTCrik5StatusNone=>Works For Me

    Back to the top


    Powered by Savane 3.1-cleanup1