[Marble-bugs] [Bug 254000] New: MarbleWidget and Slider for the zoom causes the application to use 100% CPU.

Miguel Chavez Gamboa miguel.chavez.gamboa at gmail.com
Tue Oct 12 20:21:02 CEST 2010


https://bugs.kde.org/show_bug.cgi?id=254000

           Summary: MarbleWidget and Slider for the zoom causes the
                    application to use 100% CPU.
           Product: marble
           Version: unspecified
          Platform: unspecified
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: marble-bugs at kde.org
        ReportedBy: miguel.chavez.gamboa at gmail.com


Version:           unspecified (using Devel) 
OS:                Linux

Using marble (library) from SVN (revision r1184939) in my application.
My application is doing a programatically zoom in to an area (animated) at the
begining.

Placing a slider bar for controling the zoom in/out, and making the connections
for syncing both widgets, specially the next connection is causing the problem:

connect(theMap, SIGNAL(zoomChanged(int)), this, SLOT(changeSlider(int)) );

Instead of directly connecting the signal to the setValue()slot of the Slider,
I used a intermediary slot (changeSlider), and i noted that the 

ui->zoomSlider->setValue(x);

code is what is causing the app to freeze for some moments (using 100% CPU) and
repeated times.

The code was working for some days without the freeze, but at some point i did
some updates (ubuntu, and marble's code from svn) and it appeared. 

Reproducible: Didn't try

Steps to Reproduce:
described above



Im not sure if the bug/problem is marble related or qt related, because the
problem happens with qt code (slider->setValue()).

If I filter the number of times the slider->setValue() is executed, the problem
minimizes but it does not disappears:

void MainWindow::changeSlider(int x)
{
    if ((x>1000 && x<1005) || (x>2397))
        ui->zoomSlider->setValue(x);
}

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Marble-bugs mailing list