Opened 14 years ago

Closed 14 years ago

#7909 closed defect (wontfix)

Pausing playback in Windows frontend pegs cpu freezing app & machine

Reported by: anonymous Owned by: Nigel
Priority: minor Milestone: 0.23
Component: Ports - Windows Version: 0.22-fixes
Severity: medium Keywords: windows
Cc: Ticket locked: no

Description

Pausing the display during recording playback (or similarly, going into cutlist editing)causes the frontend to suck 99% of cpu power on my XP Laptop bringing the machine to its knees.

I don't see any error messages in the terminal.

Mythfrontend otherwise runs surprisingly smoothly despite connecting to my linux backend over wireless G and despite the laptop itself being underpowered (old Celeron 1600MHz, single core). When playing back HD video, it uses only about 40% of CPU (though going up to 99% when I pause video ;)

I am running 0.22-fixes r22787.

Change History (5)

comment:1 Changed 14 years ago by mythtv@…

Sorry for not including email address - added above

comment:2 in reply to:  description Changed 14 years ago by Jeff Lu <jll544@…>

Replying to anonymous:

Pausing the display during recording playback (or similarly, going into cutlist editing)causes the frontend to suck 99% of cpu power on my XP Laptop

This behavior is caused by a faulty usleep implementation that was fixed upstream five months ago in mingwrt-3.16. Update mingw, make clean, and rebuild.

N.B. for devs: Same issue exists for VS2008 version of usleep in compat.h (line 129) - it incorrectly rounds down. Correct version would be "Sleep ( (us + 999) / 1000 );"

comment:3 Changed 14 years ago by Stuart Auchterlonie

Milestone: unknown0.23

comment:4 Changed 14 years ago by markk

(In [23302]) Fix a rounding error for vs2008 compilation. Refs #7909.

comment:5 Changed 14 years ago by markk

Resolution: wontfix
Status: newclosed

As explained by Jeff, incorrect rounding in the usleep macro will cause unintended behaviour.

There are, however, still numerous calls to usleep with values below 1000 throughout libmythtv (and no doubt elsewhere in the code) and rather than trawl through and 'fix' those, the sensible approach here is to use a recent version of mingw.

Note: See TracTickets for help on using tickets.