python in background uses too much cpu

Bug #71085 reported by Stanislaw Pitucha
20
Affects Status Importance Assigned to Milestone
gDesklets
Fix Released
High
gDesklets Core Team
Nominated for 0.3x by Rhett Trappman
gdesklets (Ubuntu)
In Progress
Undecided
gDesklets Core Team

Bug Description

I'm running gdesklets on edgy and python cpu usage goes up to 18% with minimum 10% all the time.
Also this is visible in log console every second (3 addresses in a loop):

<exceptions.ValueError instance at 0x897648c>
<exceptions.ValueError instance at 0x897648c>
<exceptions.ValueError instance at 0xb620c20c>
<exceptions.ValueError instance at 0xb620c20c>
<exceptions.ValueError instance at 0x89689cc>
<exceptions.ValueError instance at 0x89689cc>

Revision history for this message
Christian Meyer (chrisime) wrote :

Basic fix is in bzr.

Changed in gdesklets:
assignee: nobody → chrisime
status: New → In Progress
Revision history for this message
Christian Meyer (chrisime) wrote :

Reassigning...

Changed in gdesklets:
assignee: chrisime → gdesklets-core-team
Revision history for this message
Bjoern Koch (h.humpel) wrote :

Still got the same problem here with the plotter(s) (see duplicate bug #125262).
The only thing different is the output as now it says (many many times):

==========================================================[09/16/07-13:25:22]===
Error: Desklet contains errors. Please contact the author!

Well... of course I could contact myself ;) but I am pretty sure that there is a bug in the core about the plotter element (see duplicate bug).

Revision history for this message
Christian Meyer (chrisime) wrote :

I know, it hasn't been fixed yet, because I'm lazy. Lauri has a good idea how to do it. Won't be fixed in our next beta release.

Revision history for this message
Christian Meyer (chrisime) wrote :

assigning to me

Changed in gdesklets:
assignee: nobody → chrisime
importance: Undecided → Medium
status: New → In Progress
assignee: gdesklets-core-team → chrisime
Changed in gdesklets:
assignee: chrisime → gdesklets-core-team
Revision history for this message
MarioGonzalez (gonzalemario) wrote :

Should we mark this as INVALID? This is a old report.

Revision history for this message
Bjoern Koch (h.humpel) wrote :

AFAIK the output hasn't changed yet and the log file is still flooded when you use a plotter element.
But this might be fixed when we implement the new logging system.

Revision history for this message
Bjoern Koch (h.humpel) wrote :

Any news on this one ?

Changed in gdesklets:
assignee: Christian Meyer (chrisime) → gDesklets Core Team (gdesklets-core-team)
Revision history for this message
Bjoern Koch (h.humpel) wrote :

OK, this one has been bugging me too long now and it is still driving me nuts ;).

AFAIK there IS a bug in the plotter element (TargetPlotter.py) that is throwing the error message, but I just can't find it.
It is *heavily* flooding the log with one entry for every value you are adding to a plotter element.

Marking it HIGH and for the next release.

Changed in gdesklets:
importance: Medium → High
milestone: none → release-of-0.36.3
Revision history for this message
Bjoern Koch (h.humpel) wrote :

FINALLY I figured out what caused all the flooding in the logs when writing data to the plotter element.

In TargetPlotter.py the plotter element "generates" an SVG like this:
<svg><rect width="100" height="100" ... /></svg>
and passes it to TargetCanvas.py to render it.

But in TagetCanvas.py the root element of the SVG needs to have a width and a height attribute, otherwise the famous UserError (Error: Desklet contains errors. Please contact the author!) is raised. And as the root element is <svg> and it didn't have a width and a height attribute...

So now TarbetPlotter.py generates an SVG like this:
<svg width="100" height="100"><rect width="100" height="100" ... /></svg>
and the plotter element seems to be working fine without errors in the log ;).

Fix committed in rev. #144.

Changed in gdesklets:
status: In Progress → Fix Committed
Bjoern Koch (h.humpel)
Changed in gdesklets:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.