Problems while exiting root .q with canvas (3)

@couet @axel Can you reproduce the problem (can be either GUI or cling related)?

Hi,

I noticed:

  • when I close one of the two canvases, in the list of canvases it is “substituted” by another one:
bozzo@MacBook-Pro:BDTRICHEle> root
Style set
root [0] TCanvas a
(TCanvas &) Name: c1 Title: c1
root [1] TCanvas c
(TCanvas &) Name: c1_n2 Title: c1_n2
root [2] gROOT->GetListOfCanvases()->ls()
OBJ: TList	Canvases	Doubly linked list : 0
 Canvas Name=c1 Title=c1 Option=
  TCanvas fXlowNDC=0 fYlowNDC=0 fWNDC=1 fHNDC=1 Name= c1 Title= c1 Option=
   OBJ: TList	TList	Doubly linked list : 0
 Canvas Name=c1_n2 Title=c1_n2 Option=
  TCanvas fXlowNDC=0 fYlowNDC=0 fWNDC=1 fHNDC=1 Name= c1_n2 Title= c1_n2 Option=
   OBJ: TList	TList	Doubly linked list : 0
root [3] //I close c1 via the "x" button
root [4] gROOT->GetListOfCanvases()->ls()
OBJ: TList	Canvases	Doubly linked list : 0
 Canvas Name=c1_n3 Title=c1 Option=
  TCanvas fXlowNDC=0 fYlowNDC=0 fWNDC=1 fHNDC=1 Name= c1_n3 Title= c1 Option=
   OBJ: TList	TList	Doubly linked list : 0
 Canvas Name=c1_n2 Title=c1_n2 Option=
  TCanvas fXlowNDC=0 fYlowNDC=0 fWNDC=1 fHNDC=1 Name= c1_n2 Title= c1_n2 Option=
   OBJ: TList	TList	Doubly linked list : 0
root [5] .q
2020-06-10 08:25:37.407 root.exe[76938:4383288] Fatal error: requested non-existing drawable 49
2020-06-10 08:25:37.407 root.exe[76938:4383288] This window not found among allocated/deleted drawables
Assertion failed: (winIter != fDrawables.end() && "GetWindow, non-existing window requested"), function GetWindow, file /Volumes/CaseSensitive2/amssw_cold/duranti/root-6.20.04/graf2d/cocoa/src/CocoaPrivate.mm, line 127.

to me is this new “fake” canvas (right title “c1” but wrong name “c1_n3”) that is later tried to be destroyed causing a crash…

  • for me doesn’t matter which canvas I close, I always have the crash:
bozzo@MacBook-Pro:BDTRICHEle> root
Style set
root [0] TCanvas a
(TCanvas &) Name: c1 Title: c1
root [1] TCanvas c
(TCanvas &) Name: c1_n2 Title: c1_n2
root [2] gROOT->GetListOfCanvases()->ls()
OBJ: TList	Canvases	Doubly linked list : 0
 Canvas Name=c1 Title=c1 Option=
  TCanvas fXlowNDC=0 fYlowNDC=0 fWNDC=1 fHNDC=1 Name= c1 Title= c1 Option=
   OBJ: TList	TList	Doubly linked list : 0
 Canvas Name=c1_n2 Title=c1_n2 Option=
  TCanvas fXlowNDC=0 fYlowNDC=0 fWNDC=1 fHNDC=1 Name= c1_n2 Title= c1_n2 Option=
   OBJ: TList	TList	Doubly linked list : 0
root [3] //I close c1_n2 via the "x" button
root [4] gROOT->GetListOfCanvases()->ls()
OBJ: TList	Canvases	Doubly linked list : 0
 Canvas Name=c1 Title=c1 Option=
  TCanvas fXlowNDC=0 fYlowNDC=0 fWNDC=1 fHNDC=1 Name= c1 Title= c1 Option=
   OBJ: TList	TList	Doubly linked list : 0
 Canvas Name=c1_n3 Title=c1_n2 Option=
  TCanvas fXlowNDC=0 fYlowNDC=0 fWNDC=1 fHNDC=1 Name= c1_n3 Title= c1_n2 Option=
   OBJ: TList	TList	Doubly linked list : 0
root [5] .q
2020-06-10 08:28:43.405 root.exe[76998:4389192] Fatal error: requested non-existing drawable 99
2020-06-10 08:28:43.405 root.exe[76998:4389192] This window not found among allocated/deleted drawables
Assertion failed: (winIter != fDrawables.end() && "GetWindow, non-existing window requested"), function GetWindow, file /Volumes/CaseSensitive2/amssw_cold/duranti/root-6.20.04/graf2d/cocoa/src/CocoaPrivate.mm, line 127.
  • closing both the canvas still shows a list of canvases that is strange, but no crash:
bozzo@MacBook-Pro:BDTRICHEle> root
Style set
root [0] TCanvas a
(TCanvas &) Name: c1 Title: c1
root [1] TCanvas c
(TCanvas &) Name: c1_n2 Title: c1_n2
root [2] gROOT->GetListOfCanvases()->ls()
OBJ: TList	Canvases	Doubly linked list : 0
 Canvas Name=c1 Title=c1 Option=
  TCanvas fXlowNDC=0 fYlowNDC=0 fWNDC=1 fHNDC=1 Name= c1 Title= c1 Option=
   OBJ: TList	TList	Doubly linked list : 0
 Canvas Name=c1_n2 Title=c1_n2 Option=
  TCanvas fXlowNDC=0 fYlowNDC=0 fWNDC=1 fHNDC=1 Name= c1_n2 Title= c1_n2 Option=
   OBJ: TList	TList	Doubly linked list : 0
root [3] //I close both via the "x" button
root [4] gROOT->GetListOfCanvases()->ls()
OBJ: TList	Canvases	Doubly linked list : 0
 Canvas Name=c1_n3 Title=c1 Option=
  TCanvas fXlowNDC=0 fYlowNDC=0 fWNDC=1 fHNDC=1 Name= c1_n3 Title= c1 Option=
   OBJ: TList	TList	Doubly linked list : 0
 Canvas Name=c1 Title=c1_n2 Option=
  TCanvas fXlowNDC=0 fYlowNDC=0 fWNDC=1 fHNDC=1 Name= c1 Title= c1_n2 Option=
   OBJ: TList	TList	Doubly linked list : 0
root [5] .q
  • if I close via the Close() method, the list of canvases seems reasonable:
bozzo@MacBook-Pro:BDTRICHEle> root
Style set
root [0] TCanvas a
(TCanvas &) Name: c1 Title: c1
root [1] TCanvas c
(TCanvas &) Name: c1_n2 Title: c1_n2
root [2] a.Close()
root [3] gROOT->GetListOfCanvases()->ls()
OBJ: TList	Canvases	Doubly linked list : 0
 Canvas Name=c1_n2 Title=c1_n2 Option=
  TCanvas fXlowNDC=0 fYlowNDC=0 fWNDC=1 fHNDC=1 Name= c1_n2 Title= c1_n2 Option=
   OBJ: TList	TList	Doubly linked list : 0
root [4] .q
  • for me even with the semicolon the crash occurs:
bozzo@MacBook-Pro:BDTRICHEle> root
Style set
root [0] TCanvas c;
root [1] TCanvas a;
root [2] //I close c1_n2 via the "x" button
root [3] gROOT->GetListOfCanvases()->ls()
OBJ: TList	Canvases	Doubly linked list : 0
 Canvas Name=c1 Title=c1 Option=
  TCanvas fXlowNDC=0 fYlowNDC=0 fWNDC=1 fHNDC=1 Name= c1 Title= c1 Option=
   OBJ: TList	TList	Doubly linked list : 0
 Canvas Name=c1_n3 Title=c1_n2 Option=
  TCanvas fXlowNDC=0 fYlowNDC=0 fWNDC=1 fHNDC=1 Name= c1_n3 Title= c1_n2 Option=
   OBJ: TList	TList	Doubly linked list : 0
root [4] .q
2020-06-10 08:32:36.418 root.exe[77044:4393961] Fatal error: requested non-existing drawable 99
2020-06-10 08:32:36.418 root.exe[77044:4393961] This window not found among allocated/deleted drawables
Assertion failed: (winIter != fDrawables.end() && "GetWindow, non-existing window requested"), function GetWindow, file /Volumes/CaseSensitive2/amssw_cold/duranti/root-6.20.04/graf2d/cocoa/src/CocoaPrivate.mm, line 127.

Thanks,
Matteo

Yes I a crash even with the 2nd canvas opened with a “;”

root [0] TCanvas a;
root [1] TCanvas b;

>>>> close "b" via GUI ("close" red button on Mac)

root [2] .q
2020-06-10 08:50:34.240 root.exe[48047:6522471] Fatal error: requested non-existing drawable 99
2020-06-10 08:50:34.240 root.exe[48047:6522471] This window not found among allocated/deleted drawables

 *** Break *** segmentation violation
[/usr/lib/system/libsystem_platform.dylib] _sigtramp (no debug info)
[<unknown binary>] (no debug info)

Oooooh you had to close the second canvas?? :man_facepalming:

If it’s reproducible, @bozzochet you can open a bug report at https://sft.its.cern.ch/jira/projects/ROOT with step by step instructions to reproduce the problem.

Cheers,
Enrico

Ok,

the problem is that in my case doesn’t matter which canvas I close and if I put or not the ;: I always have the crash if I have N (with N>1) canvases opened and I close any number, between 1 and N-1, of them before closing (.q or Browser->Quit Root)…

Matteo

Well now we know what other people need to do to see the problem :smile: Keep it into account when opening the bug report! :smiley:

Hi everybody,

ticket open

https://sft.its.cern.ch/jira/browse/ROOT-10836

Thanks,
Matteo

1 Like

This PR should fix the crash:

1 Like

Ciao,

unfortunately this is not fixing my problem…

root [2] .q
2020-06-13 22:53:59.940 root.exe[39902:8502694] Fatal error: requested non-existing drawable 723
2020-06-13 22:53:59.940 root.exe[39902:8502694] This window not found among allocated/deleted drawables
2020-06-13 22:53:59.948 root.exe[39902:8502694] Fatal error: requested non-existing drawable 867
2020-06-13 22:53:59.948 root.exe[39902:8502694] This window not found among allocated/deleted drawables
bozzo@MacBook-Pro:BDTRICHEle> which root
/amssw/duranti/root_couet_install/bin/root
bozzo@MacBook-Pro:BDTRICHEle> 

where:

bozzo@MacBook-Pro:root_couet> git log -1
commit 07cb3c3219354b7485d86bb390077720017b772c (HEAD -> crash-when-only-part-of-open-canvases-has-been-closed-fix, origin/crash-when-only-part-of-open-canvases-has-been-closed-fix)
Author: Olivier Couet <Olivier.Couet@cern.ch>
Date:   Fri Jun 12 14:11:35 2020 +0200

    Fix crash when only part of the open canvases has been closed

Matteo

Ciao,

no I want to clarify: essentially there’s NOT a crash:

2020-06-15 12:05:35.672 root.exe[43945:9988442] Fatal error: requested non-existing drawable 579
2020-06-15 12:05:35.672 root.exe[43945:9988442] This window not found among allocated/deleted drawables
2020-06-15 12:05:35.672 root.exe[43945:9988442] Fatal error: requested non-existing drawable 627
2020-06-15 12:05:35.672 root.exe[43945:9988442] This window not found among allocated/deleted drawables
2020-06-15 12:05:35.673 root.exe[43945:9988442] Fatal error: requested non-existing drawable 675
2020-06-15 12:05:35.673 root.exe[43945:9988442] This window not found among allocated/deleted drawables
2020-06-15 12:05:35.673 root.exe[43945:9988442] Fatal error: requested non-existing drawable 723
2020-06-15 12:05:35.673 root.exe[43945:9988442] This window not found among allocated/deleted drawables
2020-06-15 12:05:35.673 root.exe[43945:9988442] Fatal error: requested non-existing drawable 819
2020-06-15 12:05:35.673 root.exe[43945:9988442] This window not found among allocated/deleted drawables
2020-06-15 12:05:35.674 root.exe[43945:9988442] Fatal error: requested non-existing drawable 867
2020-06-15 12:05:35.674 root.exe[43945:9988442] This window not found among allocated/deleted drawables

there’s this message ( I think referred to any already closed Canvas) but actually is not a crash.

Matteo

Yes the message is kept. But the crash is fixed.

Ok, thanks.

Do you plan to keep the message also on the “stable” ROOT version when this commit will be merged?

Matteo

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.