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

 
 

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

Submitted by:  Jeremiah Benham <jjbenham>
Submitted on:  Tue 14 Feb 2012 05:08:48 PM UTC  
 
Category: NoneSeverity: 4 - Important
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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>
Project 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>
Project 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>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup