Please read tips for efficient and successful posting and posting code
Please fill also the fields below. Note that root -b -q will tell you this info, and starting from 6.28/06 upwards, you can call .forum bug from the ROOT prompt to pre-populate a topic.
ROOT Version: 6.36.02
Platform: macosx64
Compiler: Not Provided
Hello…
I have used the following code for a while:
TClass *taskClass = TClass::GetClass(taskClassName);
**if** (!taskClass)
**throw** Exception();
Task * task = **static_cast**<Task*>(taskClass->New());
This usually works great! It enables me to create jobs based on a workflow file… But today I added a new class that inherits from my class Task. And I get the following message
Error in <TClass::New>: cannot create object of class CAP::ThermalModelTask
*** Break *** segmentation violation
\[/usr/lib/system/libsystem_platform.dylib\] \_sigtramp (no debug info)
\[/usr/local/Cellar/root/6.36.02/lib/root/libCling.so\] cling::TransactionPool::releaseTransaction(cling::Transaction\*, bool) (no debug info)\[/Users/aa7526/Documents/GitHub/CAP8.0/build/CAP\] main (no debug info)
\[/usr/lib/dyld\] start (no debug info)
The new class has a default constructor (with no argument), a copy constructor, as well as a virtual DTOR. It is defined in my own namespace CAP. The only difference is that this new class is a different folder and library built with cmake. But my other classes are all built that way. Is there a way to have a more verbose output that might identify why the instantiation fails?
As always, thanks in advance!!
Claude