Opened 15 years ago
Closed 15 years ago
#124 closed defect (wontfix)
QSynth makes CPU load 99.9%
Reported by: | KO Myung-Hun | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | Qt Enhanced |
Component: | General | Version: | 4.5.1 GA |
Severity: | low | Keywords: | |
Cc: | komh@… |
Description
Hi/2.
I've ported QSynth, which is a front-end of fluidsynth.
BTW when I launching QSynth, CPU load is 99.9% all the time even though I don't do anything.
What should I provide you with to analyze this problem ?
Change History (19)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Cc: | added |
---|
Hi/2.
Something changed with 4.5.1GA. But 99.9 problem still exist.
- click '+' button on bottom-left corner
- click 'Soundfonts' tab
- click 'Open' button
- Click 'Computer'
- Now CPU load peaks to 99.9
I've uploaded to your incoming directory.
comment:3 by , 15 years ago
Seems that you simply sent me a source zip while I asked for a complete pack (including the required fluidsynth library or how it's called) that just builds given I only have gcc and Qt4. Sorry, I don't have the autoconf environment and such and don't have time to set it all up.
Anyway this seems to be a known problem: the current QFileSystemWatcher implementation uses the polling method which will certainly give you this delay if there are a lot of files (50-100)in the current directory. See #6.
Please try to reduce the number of files in the CWD and report back.
follow-up: 5 comment:4 by , 15 years ago
Okay, I see that fluidsynth is pre-built so I may actually adjust qsynth.pro.in manually and try to build. But still please try to experiment with the number of files on your side.
comment:5 by , 15 years ago
Thanks for your efforts.
It's regardless of the numbers of files.
When I click 'Computer', just drives should be displayed. This causes CPU load to peak to 99.9 ?
Anyway I'll try again with reduced files.
BTW, cc seems not to work. I cannot received any notification email. hmm...
follow-up: 9 comment:7 by , 15 years ago
Does it ever drop the CPU load to normal if you don't do anything? Does it drop if you select anything else but Computer? What happens if you just dismiss the file dialog?
follow-up: 10 comment:9 by , 15 years ago
Replying to dmik:
Does it ever drop the CPU load to normal if you don't do anything? Does it drop if you select anything else but Computer?
If I do so, CPU load is not high. But subdirs are not displayed for a long time. After a long time, about 30 seconds ?, subdir are displayed. And CPU load peaks to 99.9.
What happens if you just dismiss the file dialog?
Once CPU load peaks to 99.9, QSynth does not respond even though I dismiss the file dialog. I should kill it with Watch Cat.
comment:10 by , 15 years ago
Replying to komh:
Replying to dmik:
Does it ever drop the CPU load to normal if you don't do anything? Does it drop if you select anything else but Computer?
If I do so, CPU load is not high. But subdirs are not displayed for a long time. After a long time, about 30 seconds ?, subdir are displayed. And CPU load peaks to 99.9.
What happens if you just dismiss the file dialog?
Once CPU load peaks to 99.9, QSynth does not respond even though I dismiss the file dialog. I should kill it with Watch Cat.
Ah, this is regardless of the numbers of files.
comment:11 by , 15 years ago
Just to clarify: does it ever give 99% CPU load if you don't go to My Computer in the file dialog?
comment:13 by , 15 years ago
This is probably not related to the file dialog at all; I will try to compile and run it locally.
comment:14 by , 15 years ago
BTW, please try the current trunk if possible. There was a number of fixes that *might* be related.
comment:16 by , 15 years ago
Ok. I've confirmed this is not a issue related to 'File Dialog'.
Instead, it's a problem of QSocketNotifier for stdout/stderr.
When I disable this feature, QSynth works as expected.
comment:17 by , 15 years ago
I see, good that you found it. Do you think it's a specific bug of Qt for OS/2? If so, could you please give more details on that?
PS. I didn't manage to compile QSynth locally due to being busy with other tasks ATM.
comment:18 by , 15 years ago
Maybe true for Win32 as well.
The following is the codes which I disabled.
#if !defined(WIN32) && !defined(Q_OS_OS2) // Check if we can redirect our own stdout/stderr... if (m_pOptions->bStdoutCapture && ::pipe(g_fdStdout) == 0) { ::dup2(g_fdStdout[QSYNTH_FDWRITE], STDOUT_FILENO); ::dup2(g_fdStdout[QSYNTH_FDWRITE], STDERR_FILENO); m_pStdoutNotifier = new QSocketNotifier( g_fdStdout[QSYNTH_FDREAD], QSocketNotifier::Read, this); QObject::connect(m_pStdoutNotifier, SIGNAL(activated(int)), SLOT(stdoutNotifySlot(int))); } #endif
and
// Own stdout/stderr socket notifier slot. void qsynthMainForm::stdoutNotifySlot ( int fd ) { #if !defined(WIN32) && !defined(Q_OS_OS2) char achBuffer[1024]; int cchBuffer = ::read(fd, achBuffer, sizeof(achBuffer) - 1); if (cchBuffer > 0) { achBuffer[cchBuffer] = (char) 0; appendStdoutBuffer(achBuffer); } #endif }
comment:19 by , 15 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I found the exact reason for the freeze. Please see http://svn.netlabs.org/qt4/ticket/119#comment:17. In other words, it's not a Qt bug.
Please prepare a zip that contains all the involved sources, headers and libraries so that I can rebuild it locally -- then I will be able to look at the problem. You may download the zip to ftp://ftp.dmik.org/incoming.