MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006609ardourbugspublic2015-09-27 10:412016-02-14 02:58
Reportercolinf 
Assigned Totimbyr 
PrioritynormalSeveritycrashReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.X git (version in description) 
Target VersionFixed 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.
Attached Files? file icon track-name-right-click-bt [^] (20,382 bytes) 2015-09-27 10:41 [Show Content]
patch file icon fix-6609.patch [^] (2,024 bytes) 2016-01-14 19:34 [Show Content]
patch file icon fix-selected-text-not-visible-on-track-name-entry.patch [^] (421 bytes) 2016-02-02 02:07 [Show Content]
? file icon 6609-fix-selected-patch.webm [^] (91,426 bytes) 2016-02-11 04:10
? file icon ardour-6609-selected-text-and-cursor.webm [^] (106,292 bytes) 2016-02-11 04:52

- Relationships

-  Notes
(0017387)
chaot (reporter)
2015-09-28 03:39
edited on: 2015-09-28 03: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

(0017393)
colinf (updater)
2015-09-28 06:14

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.
(0017395)
x42 (administrator)
2015-09-28 14:42

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.
(0017399)
colinf (updater)
2015-09-29 06:56

So it's a gtk bug, not an ardour one?
(0017788)
elgoun (reporter)
2016-01-14 19:33

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.
(0017790)
colinf (updater)
2016-01-15 02:49

Ah, seems very plausible. I'll give the patch a try when I have a few moments later...
(0017800)
colinf (updater)
2016-01-16 10:53

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.
(0017863)
timbyr (developer)
2016-02-01 18:42

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.
(0017867)
elgoun (reporter)
2016-02-02 02:04

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

Attached a patch that fix that.
(0017868)
colinf (updater)
2016-02-02 08:35

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.
(0017893)
timbyr (developer)
2016-02-09 16:53

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.
(0017900)
elgoun (reporter)
2016-02-10 15:33

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
(0017909)
timbyr (developer)
2016-02-11 04:12

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.
(0017910)
elgoun (reporter)
2016-02-11 04:51

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.
(0017927)
timbyr (developer)
2016-02-12 19:26

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.
(0017930)
timbyr (developer)
2016-02-13 17:26

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.
(0017931)
colinf (updater)
2016-02-13 17:35
edited on: 2016-02-13 17: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.

(0017932)
timbyr (developer)
2016-02-14 02:58

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.

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


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker