View Issue Details

IDProjectCategoryView StatusLast Update
0006609ardourbugspublic2020-04-19 20:17
Reportercolinf Assigned Totimbyr  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version4.X git (version in description) 
Fixed in Version4.7 
Summary0006609: Right-click in active track name box crashes
DescriptionIf the track name in the track header is active for editing (after a double-click), right-clicking in the text crashes ardour.
Additional InformationBacktrace attached.
TagsNo tags attached.

Activities

2015-09-27 17:41

 

track-name-right-click-bt (20,382 bytes)   

chaot

2015-09-28 10:39

reporter   ~0017387

Last edited: 2015-09-28 10:39

I cannot reproduce this (neither git nor ardour.org binary) but I get those gtk errors/warnings when trying to reproduce:

(ardour-4.2.393:9743): Gtk-CRITICAL **: IA__gtk_widget_get_settings: assertion 'GTK_IS_WIDGET (widget)' failed

(ardour-4.2.393:9743): GLib-GObject-CRITICAL **: g_object_get: assertion 'G_IS_OBJECT (object)' failed

colinf

2015-09-28 13:14

updater   ~0017393

Nightly 4.2.428 doesn't crash for me either. On right-clicking an active track name box, a menu momentarily pops up, and then immediately disappears, and the track name goes back to the 'inactive for editing' state.

I think this is still a bug, albeit not as serious: in my opinion, right-clicking an active track name box should pop up a standard text context menu, as other text entries do.

x42

2015-09-28 21:42

administrator   ~0017395

I dimly recall seeing those with ancient gtk.
Right-click shows a copy/cut/paste context-text for the gtk entry. If the text-entry widget is removed while the menu is visible old gtk crashes. Meanwhile fixed in gtk upstream.

colinf

2015-09-29 13:56

updater   ~0017399

So it's a gtk bug, not an ardour one?

elgoun

2016-01-15 03:33

reporter   ~0017788

It's not a Gtk bug, problem is in TimeAxisView class.

When right-clicking in the text entry, popup menu grab focus. Consequently, the "focus out" handler is called, destroy the text entry and replace it by the label name of the track.
When menu pop up, it try to access to a widget no longer available.

Attached a patch that fix this issue.

elgoun

2016-01-15 03:34

reporter  

fix-6609.patch (2,024 bytes)   

colinf

2016-01-15 10:49

updater   ~0017790

Ah, seems very plausible. I'll give the patch a try when I have a few moments later...

colinf

2016-01-16 18:53

updater   ~0017800

Right, that mostly works...

Right-clicking in an active track name edit box with the patch applies now pops up the standard GTK text context menu, and 'Cut/Copy/Paste' seem to work as expected. However, the appearance of the selected text reverts to that of unselected text when the menu is showing, so it's difficult to know exactly what 'Cut/Copy/Paste' will act upon. Also, 'Select All' doesn't appear to do anything.

timbyr

2016-02-02 02:42

developer   ~0017863

I can confirm the patch fixes the crash. If the context menu is going to be shown then I guess it should also work as expected but I think that could also be fixed later.

The other option is to handle the button press event on the entry and not show the menu.

elgoun

2016-02-02 10:04

reporter   ~0017867

The appearance of the selected text is a theme related problem.

Attached a patch that fix that.

elgoun

2016-02-02 10:07

reporter  

colinf

2016-02-02 16:35

updater   ~0017868

Ah, thank you, that all works fine for me now (with both patches applied). 'Select all' seems to work as expected now too: I must have just got confused by not being able to actually see the selection before.

timbyr

2016-02-10 00:53

developer   ~0017893

I tried with the additional fix-selected-text*.patch and it does not seem to be an improvement as now the text cursor is not displayed when editing the text.

As the first patch fixes a crashing bug I think it is acceptable as is for the moment and if you could open a pull request on github with the fix-6609.patch then myself or one of the other developers will apply/merge it.

elgoun

2016-02-10 23:33

reporter   ~0017900

Hmm even with the fix-selected-text*.patch I can see the cursor when editing the text... I'll submit a pull request for fix-6609

timbyr

2016-02-11 12:10

developer  

timbyr

2016-02-11 12:12

developer   ~0017909

I uploaded a little video of what it looks like on my system with your second fix-selected-text* patch applied.

As you may notice it is quite hard to see the location of the text cursor. Let me know if it looks different for you.

elgoun

2016-02-11 12:51

reporter   ~0017910

Curious, my text entry background is black and cursor is blue.
I tested it under gnome3(my daily desktop env), xfce4 and cinnamon.

Did you change some color parameters in Preferences->Theme->Items (I don't know if this is relevant)

I uploaded a little video too.

elgoun

2016-02-11 12:52

reporter  

timbyr

2016-02-13 03:26

developer   ~0017927

I committed this first patch(via PR#202) to ardour master as revision 1fbe4253aa or nightly >= 4.6.331

The difference we are seeing in the behaviour of the second patch may be due to the library versions on my system. If the second patch works correctly with the official library versions(nightly build) then I'll commit it also.

timbyr

2016-02-14 01:26

developer   ~0017930

I just committed the second patch to ardour master as revision fc011e752a and will be in a nightly build >= 4.6.345

If you can confirm fix that would be appreciated and I'll mark bug as resolved, thanks.

colinf

2016-02-14 01:35

updater   ~0017931

Last edited: 2016-02-14 01:37

I think it's good now.

There is one oddity, but I'm not sure whether it's a side-effect of the patch or just some anomalous behaviour I haven't noticed before: after the context menu has popped up, clicking outside the menu without selecting an item leaves the name entry box visible (as it should), but keyboard focus is no longer in the box, so the typed keys don't go into renaming the track as expected but are instead treated as normal keyboard shortcuts.

Given that this whole mechanism is likely to be rendered obsolete when the tabbed branch is merged into master, it's maybe not worth worrying about, but I thought I ought to at least mention it here.

timbyr

2016-02-14 10:58

developer   ~0017932

Yes, your right that is a bit odd and not what I would expect. Perhaps it is something to keep in mind when implementing/testing a new implementation of track renaming if/when that happens.

system

2020-04-19 20:17

developer   ~0023536

Issue has been closed automatically, by Trigger Close Plugin.
Feel free to re-open with additional information if you think the issue is not resolved.

Issue History

Date Modified Username Field Change
2015-09-27 17:41 colinf New Issue
2015-09-27 17:41 colinf File Added: track-name-right-click-bt
2015-09-28 10:39 chaot Note Added: 0017387
2015-09-28 10:39 chaot Note Edited: 0017387
2015-09-28 13:14 colinf Note Added: 0017393
2015-09-28 21:42 x42 Note Added: 0017395
2015-09-29 13:56 colinf Note Added: 0017399
2016-01-15 03:33 elgoun Note Added: 0017788
2016-01-15 03:34 elgoun File Added: fix-6609.patch
2016-01-15 10:49 colinf Note Added: 0017790
2016-01-16 18:53 colinf Note Added: 0017800
2016-02-02 02:42 timbyr Note Added: 0017863
2016-02-02 02:42 timbyr Status new => confirmed
2016-02-02 10:04 elgoun Note Added: 0017867
2016-02-02 10:07 elgoun File Added: fix-selected-text-not-visible-on-track-name-entry.patch
2016-02-02 16:35 colinf Note Added: 0017868
2016-02-10 00:53 timbyr Note Added: 0017893
2016-02-10 23:33 elgoun Note Added: 0017900
2016-02-11 12:10 timbyr File Added: 6609-fix-selected-patch.webm
2016-02-11 12:12 timbyr Note Added: 0017909
2016-02-11 12:51 elgoun Note Added: 0017910
2016-02-11 12:52 elgoun File Added: ardour-6609-selected-text-and-cursor.webm
2016-02-13 03:26 timbyr Note Added: 0017927
2016-02-14 01:26 timbyr Note Added: 0017930
2016-02-14 01:26 timbyr Assigned To => timbyr
2016-02-14 01:26 timbyr Status confirmed => feedback
2016-02-14 01:35 colinf Note Added: 0017931
2016-02-14 01:35 colinf Status feedback => assigned
2016-02-14 01:37 colinf Note Edited: 0017931
2016-02-14 10:58 timbyr Note Added: 0017932
2016-02-14 10:58 timbyr Status assigned => resolved
2016-02-14 10:58 timbyr Fixed in Version => 4.7
2016-02-14 10:58 timbyr Resolution open => fixed
2020-04-19 20:17 system Note Added: 0023536
2020-04-19 20:17 system Status resolved => closed