OhmNomNom / thyme

A fork of mintty, for the modern world
GNU General Public License v3.0
0 stars 0 forks source link

Crash on selecting extremely long line #217

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. cat a
2. double click on the lines

What is the expected output? What do you see instead?
expected: copy the text
instead: segv

What versions of mintty, Cygwin/MSYS, and Windows are you using?
CYGWIN_NT-6.1-WOW64 PC 1.7.7(0.230/5/3) 2010-08-31 09:58 i686 Cygwin
Windows 7 x64
mintty 0.83

Please provide any additional information below.
LANG=zh_CN.UTF-8

Original issue reported on code.google.com by xue...@gmail.com on 7 Sep 2010 at 12:03

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the report. I can produce an issue with this, but I'm not entirely 
sure it's the same you reported.

Have you got the 'Clicks place cursor' option enabled? Did you mean triple 
click rather than double click? Where do you see the SIGSEGV? Does it happen 
right away, or does it require a sequence of clicks?

I'm just getting an unresponsive window which does eventually unfreeze again. 
Meanwhile, bash uses 100% CPU. I think what's happening there is that mintty is 
sending thousands of cursor key presses to try to move the command line cursor 
to where you clicked. It's only supposed to do that though when clicking on the 
current command line rather than earlier output. 

Original comment by andy.koppe on 7 Sep 2010 at 5:10

GoogleCodeExporter commented 9 years ago
i'm sorry, to select the whole "line" (span across multiple lines) that just 
read from file a, it was "triple" not double click.
it happen right after the line (or lines) is selected

i assume it be SIGSEGV because it generated mintty.exe.stackdump
$ cat mintty.exe.stackdump
Exception: STATUS_ACCESS_VIOLATION at eip=75B1DB46
eax=0029402A ebx=7EFB0022 ecx=00000000 edx=00000000 esi=0029402A edi=004C2A40
ebp=0028C158 esp=0028C144 program=C:\app\cygwin\bin\mintty.exe, pid 4680, 
thread main
cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame     Function  Args
0028C158  75B1DB46  (004C2A40, 0029402A, 0029402C, 00000000)
0028C18C  75B1FB72  (00000000, 00000000, 0029402A, 00000001)
21529164 [main] mintty 4680 exception::handle: Exception: 
STATUS_ACCESS_VIOLATION
21537452 [main] mintty 4680 exception::handle: Error while dumping state 
(probably corrupted stack)

there's no bash 100% cpu issue here

Original comment by xue...@gmail.com on 7 Sep 2010 at 5:45

GoogleCodeExporter commented 9 years ago
Thanks for the extra information. So do you have 'Clicks place cursor' on the 
'Mouse' page of the options enabled? Also, what's the size of your mintty 
window, perhaps that's relevant.

Original comment by andy.koppe on 7 Sep 2010 at 5:49

GoogleCodeExporter commented 9 years ago
ah, i missed a question

'Clicks place cursor' -> no
size: 80cols * 40 rows
size from spyxx: rect: 747x796, client rect: 722x762
font: consolas, 12-point
smoothing: full
locale, charset: zh_CN, UTF-8

Original comment by xue...@gmail.com on 8 Sep 2010 at 2:29

GoogleCodeExporter commented 9 years ago
Thanks, that's definitely a separate issue from the one I saw then. 
Unfortunately I can't yet reproduce it, so here are more questions.

How did you install mintty 0.8.3? Through setup.exe, from the .zip download 
here, or from source? If the latter, which gcc version did you use?

And could you attach your .minttyrc with all the settings? Perhaps the issue 
depends on a particular combination of options.

Original comment by andy.koppe on 8 Sep 2010 at 5:48

GoogleCodeExporter commented 9 years ago
through setup.exe, reroduced in windows xp tooo
maybe its only reproduced with Chinese OS?
would it help if i try to reproduce it from a debug built source myself?

Original comment by xue...@gmail.com on 8 Sep 2010 at 7:26

Attachments:

GoogleCodeExporter commented 9 years ago
You're right, this is language-dependent. I've finally managed to reproduce it 
by changing the system default codepage to CP936.

Looks like it's the code for converting the copied text to RTF that's at fault 
here, because you can work around the issue by disabling the 'Copy as rich 
text' setting on the Mouse page of the options.

Original comment by andy.koppe on 8 Sep 2010 at 12:19

GoogleCodeExporter commented 9 years ago
Fixed in r1015 on trunk.

Original comment by andy.koppe on 8 Sep 2010 at 7:58

GoogleCodeExporter commented 9 years ago

Original comment by andy.koppe on 8 Sep 2010 at 7:58

GoogleCodeExporter commented 9 years ago
I've fixed the separate problem with 'Clicks place cursor' in r1016 on trunk.

Original comment by andy.koppe on 9 Sep 2010 at 5:41

GoogleCodeExporter commented 9 years ago

Original comment by andy.koppe on 3 Oct 2010 at 3:44