contour icon indicating copy to clipboard operation
contour copied to clipboard

contour locked up when I catted a file of unknown (binary!) contents

Open cqexbesd opened this issue 2 years ago • 4 comments
trafficstars

Contour Terminal version

0.3.11-master-cd0aa937

Installer source

Github: source code cloned

Operating System

Arch Linux as of approx a week ago

Architecture

x86-64

Other Software

No response

Steps to reproduce

I cat'ed a file and I have no idea whats in there. I will try to save the file if I can but its not as simple as you might think.

Expected Behavior

something to appear on my screen

Actual Behavior

contour stopped responding. the mouse cursor disappears when inside the window. The window does redraw however. strace says it is constantly reading WW...not sure where that's coming from but see attached.

contour.strace.txt contour.lsof.txt

Additional notes

contour is taking over 100% of CPU time, not unsurprisingly.

cqexbesd avatar Mar 11 '23 01:03 cqexbesd

If you can not save the file that we can use to reproduce this behavior, output of contour debug all will help a lot Can be related to https://github.com/contour-terminal/contour/issues/980

Yaraslaut avatar Mar 11 '23 06:03 Yaraslaut

Here is example of a file which will crash contour crash.txt

tail -n 20 crash.txt is enough also head -n 10 crash.txt shows weird behavior as well

Yaraslaut avatar Apr 14 '23 18:04 Yaraslaut

tail -n 20 crash.txt is enough

~This file doesn't crash contour for me.~ I should've checked with debug build, now it crashes.

Utkarsh-khambra avatar Jul 28 '23 16:07 Utkarsh-khambra

Yeah i started working on this and u think I only fixed the lockup (in a branch), but what is missing is proper handling of arbitrary binary (invalid utf-8) data. This requires sissy a Twitter in libunicode sich I didn't finish yet

christianparpart avatar Jul 28 '23 19:07 christianparpart