Qt and Tcl
-
HI, i'm using tcl in a qt windows programm. I have a console which can handle tcl scripts and custom tcl scripts. I'm also using the xml handler of qt (QDom). When i enter the command "exit", my application crashes with a segmentation fault indicating the class QDomElement.
Thanks
-
Do you have some code to look at?
With the little information you provided I can not really provide any help. It might be an issue with deleting something that was already deleted before. This can happen because e.g. Qt already having taken care of something via the parent/child relationship that is also explicitly deleted.
-
i thougth so. But when tracing the code i couldn't see any call to delete or terminate any object this is how far i traced the code:
@QString QtclConsole::interpretCommand(const QString &command, int *res)
{
if (!mutex.tryLock())
{
*res = 1;
return "Command cannot be executed!";
}
QString result;
if (!command.isEmpty())
{
//Do the Tcl evaluation
*res = Tcl_Eval( interp, qPrintable(command) );
//Get the string result of the executed command
result = Tcl_GetString(Tcl_GetObjResult(interp));
//Call the parent implementation
QConsole::interpretCommand(command, res);
}
mutex.unlock();
return result;
}@When at line 12 (*res = Tcl_Eval( interp, qPrintable(command) );) i try to step in the fonction but since the code isn't available i get the segmentation fault error.