bugDenemo - Bugs: bug #35529, gui and menu become unresponsive...

 
 

bug #35529: gui and menu become unresponsive with jack+fluidsynth

Submitter:  Jeremiah Benham <jjbenham>
Submitted:  Tue 14 Feb 2012 05:08:48 PM UTC
   
 
Category:  None Severity:  4 - Important
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Originator Name:  Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 15 Feb 2012 12:29:32 PM UTC, comment #3: 

Reading examples on the web, it seems that surrounding the whole main loop is correct. The other gdk_enter/leave calls are in the event queue thread. They do not fire off until there is MIDI in or Playback, so this is all a red herring as far as the cpu hogging is concerned.

Richard Shann <rshann>
Group administrator
Wed 15 Feb 2012 12:08:30 PM UTC, comment #2: 

Well, I notice that the entire gtk main loop is surrounded by
gdk_threads_enter and leave.
And in audiointerface.c there are further calls surrounding the code to re-draw the display during playback and to respond to MIDI in.
The documentation for gdk_threads_enter() says:
This macro marks the beginning of a critical section in which GDK and GTK+ functions can be called safely and without causing race conditions. Only one thread at a time can be in such a critial section.

So the use of gdk_threads_enter() would seem to be erroneous - and indeed removing these from main.c does not seems to alter anything. It does not change the cpu hogging either :(

Richard Shann <rshann>
Group administrator
Wed 15 Feb 2012 11:35:56 AM UTC, comment #1: 


I think this is perhaps related to the cpu hogging I am seeing. When I run strace -p pid on a denemo that is hogging the cpu I get this:

read(3, 0x9c17fa0, 4096)                = -1 EAGAIN (Resource temporarily unavailable)

repeatedly. File descriptor 3 would seem to be something to do with gtk's interaction with (?) X as early on in the boot it writes "XKEYBOARD" to that fd, along with MIT_MAGIC_COOKIE and much else...

I do not get cpu hogging with earlier versions of the soc branch, but I have noticed that even later versions can on rare occasion(s?) run without hogging cpu.

I think this will be down to a threading issue with gdk (see gdk_threads_enter() etc).

If you can get your bug to show again find the pid of denemo (ps command) and then run strace -p pid and see what it is doing.

Richard Shann <rshann>
Group administrator
Tue 14 Feb 2012 05:08:48 PM UTC, original submission:  

This problem only exists when compiled with _HAVE_FLUIDSYNTH and using the jack backend. I justed tested with --disable-fluidsynth and the jack backend works fine on its own.

Here is how to reroduce it:
create a few bars of music
play it
play it again
then try to click on the staff (that is still visibile) and or any of the menu items. They won't respond. The keybindings still work though.

I ran it in gdb and hit ctrl-c and it broke at the main gtk_main() in view.c. I will recompile and send you the line number.

 

Jeremiah Benham <jjbenham>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rshann (Posted a comment)
  • -email is unavailable- added by jjbenham (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code