file crashes

I already use the interaction mode ( python -i ), but it still crashes.
It seems ROOT.gClient.GetRoot() causes the problem.
Do I miss something? Thank you very much in advance.

Traceback (most recent call last):
File “”, line 65, in
window = pMainFrame( ROOT.gClient.GetRoot(), 200, 200 )
SystemError: const TGWindow* TGClient::GetRoot() =>
problem in C++; program state has been reset

ROOT Version : 6.12/04
Platform, compiler: Ubuntu 14.04, gcc 4.8.4
Python 2.7.6

Seems a bunch of things wrong with gClient, which of course is no such thing: it’s a macro. I don’t know how it is bound or found, but it exists as a TGClient object thinking it is None, then is used as an ObjectProxy. Or something like that, as the odd bit is that that should be fine, just raise a ReferenceError, not crash, but apparently a nullptr check is missing somewhere.

Anyway, just by-pass all that:

window = pMainFrame( ROOT.TGClient.Instance().GetRoot(), 200, 200 )

Thank you very much wlav. It works.

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