Ticket #251 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

TxDemo uses 99% of CPU while idle

Reported by: ttsou Owned by: cdietric
Priority: major Milestone: 0.7.x
Component: component Version: 0.7.x
Keywords: TxDemo, 0.7.1, ossie-demo Cc:

Description

When the thread is "stopped," the main loop spins uncontrollably - which is not cool. Among other things, this may cause the ossie-demo waveform to become dysfunctional.

Change History

Changed 4 years ago by balister

This is kind of curious. I suspect someone made a bad decision when they copied/created the files for 0.7....

This is the oldest version I found of TxDemo?:

http://ossie.wireless.vt.edu/trac/browser/waveforms/ossie_demo/trunk/ossie_demo/TxDemo/TxDemo.cpp?rev=932

does not have this problem. You can get the fix from this code. The code in the components directory is also OK.

Changed 4 years ago by balister

I knew this problem sounded familiar. I apologize for leaving this in the email list to get lost, instead of creating a ticket when I first noticed the problem:

 http://listserv.vt.edu/cgi-bin/wa?A2=ind0810&L=OSSIE-DISCUSS&P=R6197&I=-3&X=6ABBD71D6570334D9A&Y=balister%40vt.edu

In case that link is broken, the email is dated 10 OCT 2008. I can easily be found in the ossie-discuss archive.

Changed 4 years ago by caguayog

  • status changed from new to closed
  • resolution set to fixed

Moved the processing thread creation to the start() method. The processing thread is terminated when stop() is called. The fix, included in rev 8583, was tested with version 0.6.2.

Changed 4 years ago by balister

That's r8583.

Changed 4 years ago by balister

  • status changed from closed to reopened
  • resolution fixed deleted

I reviewed r8583 and it looks like if you start, stop, and re-start the waveform, you create a new thread each time you call start, and do not free the old thread. This is probably not a good thing :)

Changed 4 years ago by mcarrick

  • status changed from reopened to closed
  • resolution set to fixed

I've spoken with Carlos and confirmed that this issue has been resolved.

Note: See TracTickets for help on using tickets.