Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#126 Console freezes if you double click during a screen update

closed
nobody
None
7
2007-04-22
2007-01-02
Anonymous
No

It seems that the application locks up if I double click while the screen is being updated.

I'm able to reproduce using the following:

Using bash as a shell, run the following script

while(true)
do
echo `date`
done

As the date scrolls up, double click repeatedly in the main window. After a few clicks, the whole application will be unresponsive.

This has burned me several times over the last few days, especially while tailing a log file or something along those lines.

I have reproduced this using both 128 and 129 and on two different machines, both Win XP SP2, one is a dual core box and the other is not.

I have also seem the problem occur when using cmd.exe instead of bash.

Discussion

  • Logged In: NO

    To be accurate, it doesn't actually take a double click, just a well timed single click in the window as it is changing will lock it up.

     
  • Logged In: NO

    This bug seems to have been introduced between versions 127 and 128. I cannot reproduce the bug in version 127 or earlier.

     
  • Logged In: NO

    I can confirm this bug as well. I agree that it was introduced after b127. I never had this problem before. Specifically this happens when I do a continuous ping (ping -t) and then go to another window. Sometimes just trying to get back to the console window will cause it to freeze at which point I have to kill it and start a new instance.

     
  • Logged In: NO

    I have this problem as well. It also happens when selecting text in a scrolling/updating terminal.

     
  • neddyfreddy
    neddyfreddy
    2007-02-17

    Logged In: YES
    user_id=1705120
    Originator: NO

    I too am having this issue and it is not just double-clicks. Happens to me with continuous pings when I try to click and select the text, it locks up the entire Console and I have to force shutdown and restart.

     
  • Logged In: NO

    Patch/solution:

    In Console/SelectionHandler.cpp line 246

    -> Change the INFINITE to 500 (or any other number you want)

    Short exaplanation:
    The shell (bash) doesn't answer to the copy selection event (it is busy executing the command) and console is blocking 'INFINITE' on a semaphore hence the hanging. Changing INFINITE to 500ms avoids this. The selection doesn't work but at least console doesn't freeze.

     
  • Logged In: NO

    Same problem here. Also don't have any scrollbars anymore in b128 and b129. Went back to b127 and everything worked fine.

     
    • priority: 5 --> 7
     
  • Logged In: YES
    user_id=16767
    Originator: NO

    I managed to recreate this: I do a 'dir /s' in a root directory of a large disk, select some text and try to copy. Console locks up every time.

    There's one thing you can try if you can build source: in ConsoleView::Copy function, line 986, remove

    SharedMemory<CHAR_INFO>& consoleBuffer = m_consoleHandler.GetConsoleBuffer();
    SharedMemoryLock memLock(consoleBuffer);

    This helps a bit: if I select text, do a copy during 'dir /s' command, Console will hang, but once 'dir' is done, it will copy the text.

    I'd like to find a better solution, though.

     
    • status: open --> closed