bugGNU Octave - Bugs: bug #44866, Issues with copy to clipboard

 
 

bug #44866: Issues with copy to clipboard

Submitter:  Guillaume <gyom>
Submitted:  Fri 17 Apr 2015 04:35:45 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 02 Jun 2015 03:36:30 PM UTC, comment #9: 

I pushed the patch here:
http://hg.savannah.gnu.org/hgweb/octave/rev/ede7224d062f

Closing the bug report.

Pantxo Diribarne <pantxo>
Group Member
Tue 02 Jun 2015 02:49:41 PM UTC, comment #8: 

@Pantxo: The patch works for me.  I'm okay with pushing this to stable as well.

Rik <rik5>
Group administrator
Mon 01 Jun 2015 10:10:32 PM UTC, comment #7: 

The attached patch fixes the issue with copying to clipboard while in --no-gui mode. May I push it to stable and close this report?

(file #34144)

Pantxo Diribarne <pantxo>
Group Member
Wed 22 Apr 2015 03:54:06 PM UTC, comment #6: 

Much better.  I no longer get segfaults with the test case in comment #3.

Like Guillaume, I am unable to copy to clipboard when running --no-gui so that issue still remains.  Interestingly, I can see the plot window go black when it does the "printing", but the result isn't transferred over to the clipboard for pasting.

Rik <rik5>
Group administrator
Wed 22 Apr 2015 10:46:59 AM UTC, comment #5: 

It seems much more stable now: the image is in the clipboard each time and I haven't observed any segfault.
However it doesn't seem to work when running Octave with the "--no-gui" flag (it might be another peculiarity of my testing platform though).

Guillaume <gyom>
Wed 22 Apr 2015 05:43:24 AM UTC, comment #4: 

I checked in the following changeset.  With it, I'm able to copy images to the clipboard on Windows and my Debian system.  I think the problem was that printing to the file needs to happen in the interpreter thread and copying the resulting image from the file to the clipboard needs to happen in the GUI thread.  At least that's what this patch attempts to do.

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

John W. Eaton <jwe>
Group administrator
Sat 18 Apr 2015 09:36:01 PM UTC, comment #3: 

The following code always segfaults for me.


./run-octave -f
sombrero
# 5 <CTRL+C> keystrokes quickly in figure window



Rik <rik5>
Group administrator
Sat 18 Apr 2015 11:36:25 AM UTC, comment #2: 

After this changeset:

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

I don't have a segfault with a blank figure any more but it still behaves somehow randomly otherwise.

Guillaume <gyom>
Sat 18 Apr 2015 12:11:41 AM UTC, comment #1: 

Confirmed.  This bit of code is de-stabilizing.  I don't get exactly the same behavior as you, but I do get segfaults.

For me, a blank figure only leads to an error message, but not a segfault.

On the other hand, using Ctrl+C twice leads to a segfault on the second time.

Rik <rik5>
Group administrator
Fri 17 Apr 2015 04:35:45 PM UTC, original submission:  

I am testing the copy to clipboard option recently introduced by @jwe and noticed a number of things:

  • I sometimes have to select "copy" several times before it effectively appears in the clipboard (tested by Edit>Paste in GIMP) and it never seems to be there the first time I "copy" a figure.


  • If a figure is empty, there is a segmentation fault:



>> error: print: no axes object in figure to print
error: called from
    print at line 305 column 5
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
octave-gui: xcb_io.c:274: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
panic: Aborted -- stopping myself...
attempting to save variables to 'octave-workspace'...
save to 'octave-workspace' complete
Aborted


  • I've seen that the code will ultimately ask for image format but maybe default for now could be PNG, to minimize compression.


  • Definitely not "normal" usage but if I press Ctrl-C repeatedly (quickly) in a figure, Octave will eventually segfault:



>> octave-gui: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.
octave-gui: Fatal IO error 2 (No such file or directory) on X server :0.0.
panic: Segmentation fault -- stopping myself...
attempting to save variables to 'octave-workspace'...
save to 'octave-workspace' complete
Segmentation fault


Guillaume <gyom>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #34144:  fix_copy_nogui.patch added by pantxo (1KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pantxo (Updated the item)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by gyom (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-06-02 pantxo StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2015-06-01 pantxo Attached File- Added fix_copy_nogui.patch, #34144
    2015-04-18 rik5 StatusNone Confirmed
        Carbon-Copy- Added jwe

    Back to the top

    Powered by Savane 3.13-54b4.
    Corresponding source code