[Konsole-devel] TerminalInterface possible bug?

Daniele Pighin daniele at www.dcs.it
Sun May 16 18:04:02 UTC 2004


Hi everybody,

I'm new to this list, I'm developing an application that uses
TerminalInterface.
Following the excellent documentation I was able to embed the Konsole KPart
in my application with 5 lines of code.
Anything goes fine, but when I try to call "startCommand" the application
just crashes.

This is what I do (it is copyed from kdelibs source tree:
interfaces/terminal/test/main.cc, I just commented out startProgram related
lines):


<snip>
KLibFactory* factory = KLibLoader::self()->factory( "libkonsolepart" );
assert( factory );
KParts::Part* p = static_cast<KParts::Part*>( factory->create( this,
"tralala", "QObject", "KParts::ReadOnlyPart" ) );
setCentralWidget( p->widget() );
TerminalInterface* t = static_cast<TerminalInterface*>( p->qt_cast(
"TerminalInterface" ) );
t->showShellInDir( QDir::home().path() );
QStrList l;
l.append( "python" );
t->startProgram( QString::fromUtf8( "/usr/bin/python" ), l );
</snip>


This is the best gdb data that I could gather (both kde and qt were not
compiled with debugging symbols):


<snip>
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1098351392 (LWP 21703)]
0x00000020 in ?? ()
(gdb) where
#0  0x00000020 in ?? ()
#1  0x40447f9f in QObject::connect(QObject const*, char const*, QObject
const*,                                            char const*) () from
/usr/lib/qt3/lib/libqt-mt.so.3
#2  0x0813a840 in ?? ()
#3  0x407b4bd0 in typeinfo name for QFontCache ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
</snip>


The KPart is embedded in a QFrame derived widget. I also tried to compile a
very basic KDE application (using KDevelop template) whose only widget was
the terminal, and I just get the very same behaviour: I can instantiate the
interface, I can call showShellInDir whithout a problem, but when I call
startProgram it crashes.

My system: MDK 10.0 Official, qt 3.2.3, KDE 3.2.

Thanks in advance, I really hope someone can help me :)

	Daniele



More information about the konsole-devel mailing list