bugGNU Octave - Bugs: bug #58844, Unintended binary content copied...

 
 

bug #58844: Unintended binary content copied into clipboard

Submitter:  Hg200 <hg200>
Submitted:  Tue 28 Jul 2020 07:59:25 PM UTC
   
 
Category:  GUI Severity:  2 - Minor
Priority:  3 - Low Item Group:  Unexpected Error or Warning
Status:  Postponed Assigned to:  None
Originator Name:  hg200 Open/Closed:  * Open
Release:  * dev Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 17 Jan 2022 04:34:56 PM UTC, comment #11: 

Yes, thanks for updates!

Hg200 <hg200>
Mon 17 Jan 2022 08:14:20 AM UTC, comment #10: 

Thanks for looking at this and the insight Markus 🙂

I leave this item open then with low priority.

Kai Torben Ohlhus <siko1056>
Group Member
Mon 17 Jan 2022 08:11:04 AM UTC, comment #9: 

That might be a (combination of) known bug(s). One part is that copying from the command window widget on Windows might append or prepend garbage characters to the copied string. Those are pretty much random afaict. (Maybe a buffer "over-read".) I have the feeling that this happens less often (but still does) with more modern versions of Windows.
The second part is that entering certain characters into the command window widget on Windows might crash the console host (which is currently used as the "backend driver" for the command window widget on Windows).

If (by chance) the garbage characters happen to contain one of the offending characters, pasting them might lead to that crash.

I'd suspect that these bugs won't happen any more once/if we change to a cross-platform Qt-widget for the command window.

It's some time since I looked at the current implementation. So, I can't tell how hard it would be to fix this. Given the fact that this part of the code is going to be ditched anyway once/if we switch to the cross-platform widget, my motivation to work on this personally is pretty low admittedly.
I'll be happy to review patches though.

Markus Mützel <mmuetzel>
Group administrator
Mon 17 Jan 2022 07:51:28 AM UTC, comment #8: 

I am very sorry Hg200.  I think this problem still exists in MS Windows 10 (21H2) with Octave 6.4.0 and 7.0.91.  I am no regular MS Windows user, thus maybe in comment #4 I made a mistake and was not able reproduce it and lowered the interest in this item.


The crash seems to be related to special chars, copied with this special selection.  However, on my system the pasted content in Notepad looks more asian, maybe due to my locale...


@mmuetzel: can you (or another Octave with recent MS Windows user) check if the copy&paste as outlined in the screenshot of comment #3 (exact start and end) crashes the GUI?

Kai Torben Ohlhus <siko1056>
Group Member
Wed 22 Dec 2021 11:51:35 AM UTC, comment #7: 

I only have this old Windows 7, so i unfortunately can't test with newer windows versions. The problem has never happened to me under Linux. IMO, if you see the "garbage" in the editor, you did the test correctly. So since Octave does not crash on Windows 10 i agree to close the issue.

Hg200 <hg200>
Wed 22 Dec 2021 01:48:00 AM UTC, comment #6: 

Thanks for coming back to this 👍

@op: Does this crash happen on MS Windows 10 or 11 too?

Another year later, MS Windows 7 is now strongly discouraged to use for almost two years

https://www.microsoft.com/en-us/windows/windows-7-end-of-life-support-information

Unless this crash happens on MS Windows 10 or 11, do you agree it is not worth spending effort in this and close it?

Kai Torben Ohlhus <siko1056>
Group Member
Mon 20 Dec 2021 08:09:48 PM UTC, comment #5: 

Sorry for replying a year later. I tried Octave 6.4.0 x86_64-w64-mingw32 (according to "ver" it is hg id 8d7671609955) from the octave ftp server with same old Windows 7. Still crashes.

Hg200 <hg200>
Mon 26 Oct 2020 05:02:51 AM UTC, comment #4: 

Browsing the remaining items for the Octave 6 release let me stumble over this one.

@OP: can you confirm a crash for Octave 6.0.92 (2nd release candidate)?  For me the garbage appears in the editor, but no crash after about 10 repetitions.

os: MS Windows 10 Home (version 2004)

Kai Torben Ohlhus <siko1056>
Group Member
Mon 26 Oct 2020 04:49:51 AM UTC, comment #3: 

Just to display the graphics...

Upload content of stepstoreproduce.tar (file #49561)






Kai Torben Ohlhus <siko1056>
Group Member
Wed 29 Jul 2020 03:59:35 PM UTC, comment #2: 

I was able to reproduce on mxe-octave-stable. Clipboard as well as segfault.

GNU Octave Version: 6.0.1 (hg id: af1a9c1db88e)
MINGW32_NT-6.1 Windows 7  x86_64
mxe-octave hg id is be0a7ce498e6

Attached backtrace looks similar.

Maybe we should track in two different reports?

(file #49574)

Hg200 <hg200>
Tue 28 Jul 2020 09:59:33 PM UTC, comment #1: 

Attached the backtrace, although no debug infos are available. Anyway - maybe we can do a scintilla update?!?

- MXE is based on fb50ae69121c including some bugfixes planned for the release
- GNU Octave Version is based on hg id: 43c285a20829
- Operating System: MINGW32_NT-6.1 Windows 7  x86_64

The 64 bit seems to be more vulnarable than the 32 bit version.

Also a copy of some example clipboard data content that sometimes forces the segfault.


(file #49562, file #49563)

Hg200 <hg200>
Tue 28 Jul 2020 07:59:25 PM UTC, original submission:  

Hello,

during the MXE-Octave on Windows 7 tests i came across the following two observations. The first issue is that some extra "binary" content can be unintentionally copied into the clipboard and the second issue that Octave can crashes if that content is pasted into the Octave's Editor.

- The problem appears only on MXE Windows. Not on Linux.
- I'm on the development branch of Octave.
- I haven't tested on stable (so far).

In order to reproduce it is necessary to repeat the steps as follows:

1.)
Start octave --gui with it's "default" settings (i.e. no .config file). The command window is then docked.

2.)
On the command window put the cursor to the position at bottom right and start marking the text. For reference see attached "01_copy.png"

3.)
Move the mouse cursor to the position on the top left as shown in "01_copy.png". Then release the touchpad button / mouse button. Text remains marked. Note: It is important to set the cursor "outside" the command-area, somewhat above and to the left of the word "GNU". Otherwise you will not see the issue. The amount of binary content copied to the clippboard seems to depend on the cursor-position.

4.)
Press Ctrl-c to copy the selection.

5.)
Move to notepad (external editor) or switch to the Octave Editor Tab and paste the clipboard content with Ctrl-V

6.)
Result can be seen in the picture "02_paste.png". If the step is repeated more often Octave can crash as the contend is pasted into the editor ("03_crash.png"). When pasted to notepad you can also see the unwanted content. So it is copy / clipboard problem.

The problem is: I tried again to reproduce the crash with gdb but with the current executable i can't force the crash. Have to try later again. Sorry ;-(



Hg200 <hg200>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #50101:  01_copy.png added by siko1056 (32KiB - image/png)
file #50102:  02_paste.png added by siko1056 (64KiB - image/png)
file #50103:  03_crash.png added by siko1056 (14KiB - image/png)
file #49574:  segfault_3.txt added by hg200 (6KiB - text/plain)
file #49562:  segfault_2.txt added by hg200 (7KiB - text/plain)
file #49563:  clipboardcontent.txt added by hg200 (2KiB - text/plain)
file #49561:  stepstoreproduce.tar added by hg200 (120KiB - application/x-tar)

 

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 siko1056 (MS Windows expert)
  • -email is unavailable- added by siko1056 (Updated the item)
  • -email is unavailable- added by hg200 (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 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-01-17 siko1056 Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low
        StatusNeed Info Postponed
    2022-01-17 siko1056 Carbon-Copy- Added mmuetzel
    2020-10-26 siko1056 StatusNone Need Info
    2020-10-26 siko1056 Attached File- Added 01_copy.png, #50101
        Attached File- Added 02_paste.png, #50102
        Attached File- Added 03_crash.png, #50103
    2020-07-29 hg200 Attached File- Added segfault_3.txt, #49574
    2020-07-28 hg200 Attached File- Added segfault_2.txt, #49562
        Attached File- Added clipboardcontent.txt, #49563
    2020-07-28 hg200 Attached File- Added stepstoreproduce.tar, #49561

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code