Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt and Tcl
Forum Updated to NodeBB v4.3 + New Features

Qt and Tcl

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    linoux
    wrote on 20 Jan 2011, 17:28 last edited by
    #1

    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

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on 20 Jan 2011, 18:39 last edited by
      #2

      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.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        linoux
        wrote on 20 Jan 2011, 18:54 last edited by
        #3

        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.

        1 Reply Last reply
        0

        1/3

        20 Jan 2011, 17:28

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved