Error in <DrawPolyLineAux> when drawing TCutG in editor


I sometimes get this error Error in <DrawPolyLineAux>: invalid pad's geometry while drawing a graphical cut with the editor. It happens when I try to finalize (close) the cut with double click. This is quite annoying, since afterwards the pad is not drawn anymore, and I need to restart my lengthy interactive procedure.

I wasn’t able to figure out the reason, why this happens. Is there a way to prevent it, or to recover the pad after this happend?


Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

I just tried to create several cuts interactively. I did not get the invalid pad message.
On which machine are you working?
Do you have some reproducer ? a sequence of cut creation which reproduce the problem ?

Could be that it happens when you move the mouse pointer while double clicking. But it’s really hard to reproduce. Probably one needs to do forensic about the conditions the error is thrown in the code.

I do not know… interactive behavior are always hard to reproduce.
May be you have some histogram on which the error shows ?

In principle I have a TH2F where it happens, but even there I’m not able to reproduce it. It feels quite random.

This seems to be the location in the code, in line 869 of TPadPainter:

template<typename T>
void DrawPolyLineAux(TVirtualPad *pad, unsigned nPoints, const T *xs, const T *ys)
  std::vector<TPoint> xy;
   const Int_t threshold = Int_t(TMath::Min(pad->GetWw() * pad->GetAbsWNDC(),
                                            pad->GetWh() * pad->GetAbsHNDC())) * 2;
   if (threshold <= 0) {//Ooops, pad is invisible or something really bad and stupid happened.
      ::Error("DrawPolyLineAux", "invalid pad's geometry");

Yes that’s the code… on of the parameter used to compute threshold should be wrong. May be pad itself is not correct depending how/where you click

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