Menu

#1783 [Composition] dtor: WARNING: 4 observers still extant:

None
open
nobody
None
5
4 hours ago
6 days ago
musewhirl
No

Not a bug, but also not a feature. It's been around for a while though.

Session Open/Close
If I open a session, I get the following. If I close a session, I get something similar again. It conveys very little helpful information to me?

[Composition] dtor: WARNING: 4 observers still extant:
[Composition]    0x562c8cfb66e0 : N10Rosegarden17TrackParameterBoxE
[Composition]    0x562c8cba5c90 : N10Rosegarden20CompositionModelImplE
[Composition]    0x562c8d655278 : N10Rosegarden12TrackButtonsE
[Composition]    0x562c8cd119d8 : N10Rosegarden15TransportDialogE

NotationEditor
However, the following seems recent on master [538ef9]. If I close the NotationEditor, I get 295 lines of the following filling the log every time?

[Segment] dtor: Warning:  1  observers still extant
[Segment] Observers are:
[Segment]   0x562c8de1bf68  [ N10Rosegarden11StaffHeaderE ]
[Segment] dtor: Warning:  1  observers still extant
[Segment] Observers are:
[Segment]   0x562c8de1bf68  [ N10Rosegarden11StaffHeaderE ]
[Segment] dtor: Warning:  1  observers still extant
[Segment] Observers are:
[Segment]   0x562c8de1bf68  [ N10Rosegarden11StaffHeaderE ]
[Segment] dtor: Warning:  1  observers still extant
[Segment] Observers are:
[Segment]   0x562c8de1bf68  [ N10Rosegarden11StaffHeaderE ]
[Segment] dtor: Warning:  1  observers still extant
[Segment] Observers are:
[Segment]   0x562c8de1bf68  [ N10Rosegarden11StaffHeaderE ]
......

MatrixEditor
The MatrixEditor, when closed isn't so bad, but still the information does not seem useful to a general user?

[matrix]  MatrixTool::createMenu()  "matrixpainter.rc"  -  "MatrixPainter"
[MatrixToolBox] MatrixToolBox::~MatrixToolBox()
[matrix]  MatrixTool::~MatrixTool()
[matrix]  MatrixTool::~MatrixTool()
[matrix]  MatrixTool::~MatrixTool()

EventEditor

The EventEditor both opens and closes cleanly. No log pollution at all. I think the NotationEditor and MatrixEditor should behave similarly under these circumstances.

Related

Commit: [538ef9]

Discussion

  • Philip Leishman

    I get some of the warnings above - but not all of them - and I would also consider these as "unwanted"
    I believe with some clean up code the problem can be avoided.
    However I do not get the warning for the TransportDialog and I don't get the notation editor warnings.
    The matrix editor messages are only for debug and can be suppressed quite easily.
    Can you provide a step by step example - starting from a new document - for getting the TransportDialog and notation editor warnings ?

     
  • Philip Leishman

    Philip Leishman - 13 hours ago

    OK I found the TransportDialog warning - on new document.
    I have used the documentAboutToChange signal to clean up the observers. That seems to work OK,
    Also cleaned up the matrix editor.
    I still can't reproduce the warnings from the notation editor !!
    See merge request.
    Just to try it I have made the merge request on codeberg - if this causes probelms I can try a different way !

     
  • musewhirl

    musewhirl - 4 hours ago

    This is one of the rare occasions that I skipped my usual steps to reproduce, because the first set of 4 observers has been happening for so long, in all sessions, that I just thought everyone saw all four. And since they were harmless no one could not be bothered to mention them.

    It was the apparently new set of 300+ lines which got to me, and I thought everyone saw those too. But now I know why you can't see them. They have particular circumstances. So, here are the missing steps to reproduce:

    • I believe any session, old or new can be used
    • Create an empty segment at measure 1
    • Select the segment
    • Open the NotationEditor
    [NotationTool] NotationTool::findActionInParentView: Can't find ActionFileClient in parent widget hierarchy
    [NotationTool] NotationTool::invokeInParentView: No action " "no_accidental" " found in parent view
    
    • Now close the NotationEditor

    [notation] NotationTool::~NotationTool()

    • Now a little magic dance: Shift-Control-R to repeat the segment
    • Open the NotationEditor
    [NotationTool] NotationTool::findActionInParentView: Can't find ActionFileClient in parent widget hierarchy
    [NotationTool] NotationTool::invokeInParentView: No action " "no_accidental" " found in parent view
    
    • Now close the NotationEditor and 323 lines starting with [Segment].
    [Segment] dtor: Warning:  1  observers still extant
    [Segment] Observers are:
    [Segment]   0x55ad1c7856d8  [ N10Rosegarden11StaffHeaderE ]
    [Segment] dtor: Warning:  1  observers still extant
    [Segment] Observers are:
    [Segment]   0x55ad1c7856d8  [ N10Rosegarden11StaffHeaderE ]
    [Segment] dtor: Warning:  1  observers still extant
    .....
    [notation]  NotationTool::~NotationTool()
    

    Why 323? No idea at first. The repeating segment started at measure 1 and the composition is the default 100 measures. If the segment is moved to measure 2, then there are 320 lines, so three lines less. Hmmm! 100 measures? I jumped to measure 98 and there are only two repeats to end of composition, and now only two lines of [Segment].. And finally, at measure 100, no lines output since there can't actually be any repeats from there. So,obviously three lines per repeated measure. And none would be nice to keep the logs for interesting information :-)

    As for the reference to codeberg, the problem I see is that your request does not appear on the usual Merge Request tab under the Code tab where I am writing this post. Why wouldn't the request appear wherever RG has the code, since when the code is merged it presumably ends up wherever RG has master, assuming RG can only have one master?

     

Log in to post a comment.