GNOME Bugzilla – Bug 388692
dynamically generated extremely long titles in gnome-terminal-2.16.1 cause the term to momentarily freeze
Last modified: 2008-11-29 08:35:17 UTC
Please describe the problem: I have a script that generates a long command (wc output = 1 164 4520). gnome-terminal tries to put the entire string into the terminal title bar and causes the terminal to freeze. Steps to reproduce: 1. Generate a really long command e.g. one with 4500+ characters or bytes 2. It causes gnome-terminal to dynamically put that command into the title bar of the window Actual results: the gnome-terminal window freezes for a few seconds. Expected results: the gnome-terminal shouldn't freeze Does this happen every time? yes Other information: Why not put a limit on the length of string that is malloc'd and put into the title bar of the gnome-terminal rather than trying to shove everything into it?
This is the command I am using to try and replicate this: # time python -c 'print "\033]0;Test:", ("a"*100000), "\007"' real 0m0.021s user 0m0.012s sys 0m0.008s [The titlebar does flash with "Test: aaaaa...".] Can you please try this test to see if it is valid or your script against vte SVN. Thanks.
Still occurs in 2.18.1 with your python test. It doesn't take long for the command to finish (1-2 seconds) but it's even worse in this version since it hangs the entire X display. I have to ctrl+alt+f1 (this takes a while) and kill the shell, ctrl+alt+f7 then xorg is again responsive.
This is no slower on my machine, so I wonder if it is a bug in either xorg or the window manager. Another possibility is if we cause the system to swapout. What does free say when you're on the console and who are the memory hogs (if any)?
xorg-x11-7.2 fluxbox-1.0_rc3_p4983 xf86-video-i810-1.7.4 mesa-7.0.1 I can't do anything until after i get into the ptty. By then gnome-terminal uses less than 1% of mem and no cpu. Other applications are using much more memory.
i'm going to have to be ssh'd in and run the test. i'll let you know what is happening.
This works momentarily for me now. Because we now set title in a differed callback. Moreover, metacity ellipsizes the title. /me marks as fixed.