[Kde-java] KURLRequesterDlg.getURL() crashes with SIGSEGV
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Sun Jun 6 11:05:47 CEST 2004
On Saturday 05 June 2004 17:48, Maik Schulz wrote:
> Hi again,
>
> I just solved it, one is not supposed to pass null as the initial path. An
> empty String does the job...
This is a bug really - it should have converted a java null string to
QString::null, and instead it was converting to (QString*)0L. I've changed
the string conversion method so that a java null is now
(QString*)&QString::null, and KURLRequesterDlg.getURL() works fine with a
null first arg:
QString *
QtSupport::toQString(JNIEnv * env, jstring str, QString ** qstring)
{
const jchar * _jchar_str;
if (str == 0L) {
return (QString*) &QString::null;
}
...
>
> On Saturday 05 June 2004 17:07, Maik Schulz wrote:
> > Hi,
> >
> > I just started out using the KDE Java Bindings and ran into the following
> > problem:
> >
> > I use the application that KDevelop generates. After tweaking the code so
> > that it compiles I can start the application and everything seems to work
I haven't looked at KDevelop for a long time - it sounds as though the java
project template needs to be brought in line with the C++ one.
> > except for the "Open File..." command. I call it from a class that
> > extends KMainWindow via KURLRequesterDlg.getURL(null, this, tr("Open
> > Location") ). As soon as Java executes this line the KDE Crash Handler
> > pops up with a SIGSEV. The backtrace tab tells me that the backtrace is
> > meaningless.
More information about the Kde-java
mailing list