qbektrix / textroom

Automatically exported from code.google.com/p/textroom
Other
0 stars 0 forks source link

High CPU Usage #35

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open textroom
2. Input text.
3. Save (optional)
4. Attempt to close textroom.

What is the expected output? What do you see instead?
- After any new input in the window/buffer, CPU usage goes to about 50%.
- After exiting the program, CPU usage goes to about 100% and the process
doesn't exit.

What version of the product are you using? On what operating system?
- version 0.5.4
- Arch Linux 2.6.30 x86_64

strace attached. ends where I pkilled textroom

Please provide any additional information below.

Original issue reported on code.google.com by rambaldi...@gmail.com on 2 Nov 2009 at 2:27

Attachments:

GoogleCodeExporter commented 8 years ago
the ldd:
$ ldd /usr/bin/textroom
    linux-vdso.so.1 =>  (0x00007fff481ff000)
    libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0x00007f6354a97000)
    libSDL_mixer-1.2.so.0 => /usr/lib/libSDL_mixer-1.2.so.0 (0x00007f6354829000)
    libQtGui.so.4 => /usr/lib/libQtGui.so.4 (0x00007f6353c8a000)
    libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00007f6353a62000)
    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f63537cb000)
    libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007f6353588000)
    libSM.so.6 => /usr/lib/libSM.so.6 (0x00007f6353380000)
    libICE.so.6 => /usr/lib/libICE.so.6 (0x00007f6353165000)
    libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007f6352f5c000)
    libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f6352d2b000)
    libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f6352b19000)
    libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f63527df000)
    libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0x00007f63523ae000)
    libz.so.1 => /usr/lib/libz.so.1 (0x00007f6352199000)
    libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x00007f6351f95000)
    librt.so.1 => /lib/librt.so.1 (0x00007f6351d8d000)
    libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f6351aca000)
    libdl.so.2 => /lib/libdl.so.2 (0x00007f63518c6000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x00007f63516ab000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f635139b000)
    libm.so.6 => /lib/libm.so.6 (0x00007f6351119000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f6350f03000)
    libc.so.6 => /lib/libc.so.6 (0x00007f6350bb0000)
    libpcre.so.0 => /lib/libpcre.so.0 (0x00007f6350980000)
    libuuid.so.1 => /lib/libuuid.so.1 (0x00007f635077c000)
    libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f6350553000)
    libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f6350351000)
    libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f6350135000)
    /lib/ld-linux-x86-64.so.2 (0x00007f6354d2e000)
    libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f634ff30000)

Original comment by rambaldi...@gmail.com on 2 Nov 2009 at 2:34

GoogleCodeExporter commented 8 years ago
Having the same problem with Ubuntu 9.10, ver. 0.5.4

Original comment by daniel.s...@gmail.com on 3 Nov 2009 at 2:25

GoogleCodeExporter commented 8 years ago
Same issue on Ubuntu 9.10 32-bit using textroom 0.5.4

Original comment by haris.sa...@gmail.com on 4 Nov 2009 at 2:52

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Same issue on Kubuntu 9.10 64-bit using textroom version 0.2.5. (though it is 
0.5.4
I installed).

Edit 1: I should also mention that I don't have to enter anything for it to 
jump up
to
around 95% cpu. I have it set to load the previous file, so maybe that is the 
reason
on my side. Either way, no need to enter text.

Edit 2: I just install the .bin, and I reproduced the same problem as the OP. It
didn't jump to around 95% until I closed it.

Original comment by CupofD...@gmail.com on 4 Nov 2009 at 9:25

GoogleCodeExporter commented 8 years ago
Same problem in Jolicloud (Ubuntu 9.04) on an Asus EeePC1005HA-M. It's 
constantly at
around 95-100% after starting the program. It doesn't make a difference if I 
have a
file open or text inserted. Closing textroom works fine and everything else 
seems to
work as well. The high CPU usage happens with the .deb and with the compiled 
source
of version 0.5.4.

On Gentoo on a 64bit AMD system I don't have this problem. It stays at 4-5% 
even with
a larger file open.

Original comment by MauriceG...@googlemail.com on 5 Nov 2009 at 2:28

GoogleCodeExporter commented 8 years ago
I think I have found a solution to this bug. It seems to be related to 
pulseaudio and
SDL. If I comment out the lines for sdl-mixer (especially Mix_OpenAudio) in
textroom.cpp I don't get a high CPU usage any longer.

I could not find any solution to this problem without deactivating the sound 
(maybe
initializing the mixer should only be done if typing sounds are enabled). 
However I
did find a solution for Ubuntu. Installing libsdl1.2debian-pulseaudio (or 
switching
to something better then pulseaudio) helps.

Original comment by MauriceG...@googlemail.com on 7 Nov 2009 at 12:19

GoogleCodeExporter commented 8 years ago
[8] Installing libsdl1.2debian-pulseaudio did not help on Ubuntu 9.10 64bit.

Original comment by lukas.ma...@gmail.com on 23 Feb 2010 at 3:25

GoogleCodeExporter commented 8 years ago
I will try to fix it. Thank you for the report. 

Original comment by gordebak on 16 Apr 2010 at 10:43

GoogleCodeExporter commented 8 years ago
Will you try the 0.6.1 version. Cpu usage issue should have been fixed.

Original comment by gordebak on 16 Apr 2010 at 11:11

GoogleCodeExporter commented 8 years ago
[11] Tried on Ubuntu 9.10. Seems to be working well. Thank you very much :-)

Original comment by lukas.ma...@gmail.com on 19 Apr 2010 at 8:08