[Kde-java] Bug in KFileDialog

Felix Rodriguez kde-java@kde.org
Tue, 25 Feb 2003 07:53:08 -0500


I am currently using gentoo linux. Here is my build info.

Portage 2.0.46-r12 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r2)
=================================================================
System uname: 2.4.20 i686 AMD Athlon(tm) processor

I am willing to volunteer building the updated version of koala and qtjava on 
my machine to see if that makes a difference.




On Tuesday 25 February 2003 06:36 am, Richard Dale wrote:
> On Sunday 23 February 2003 11:31 pm, Felix Rodriguez wrote:
> >   I think I might have discovered a bug in the KFileDialog
> > getOpenFileName method. I am using QFileDialog instead and this seems to
> > be working fine. KFileDialog is supposed to be a dropin replacement for
> > QFileDialog.
>
> The problem is that dynamic casts don't appear to work properly when
> kdelibs is linked with a java app. I changed four dynamic casts in the
> dialog code to use qt_cast() instead and that worked (eg one in
> KComboBox::setLineEdit() caused the crash below).
>
> But when the code got as far as displaying the dialog, it crashed in the
> QDialog::exec() call to handle the modal dialog. I would expect QFileDialog
> to also use the exec() method, so I've no idea why that works fine.
>
> I'm using gcc 2.95 and glibc 2.2.5, I don't know if a newer compiler and
> associated libs would work ok - which version are you using? Perhaps if the
> app was compiled with gcj, rather than run under a jvm, it might work
> properly.
>
> However, I couldn't switch from gcc 2.95 to gcc 3.2.2 to use gcj because
> dynamic casts appeared to be crashing when I built KDE with it, and KDE
> wouldn't start properly - and that was nothing to do with java. So I'm
> feeling a bit stuck at the moment..
>
> -- Richard
>
> >  Here is the backtrace that is generated from gdb.
> >
> > #0  0x40511829 in wait4 () from /lib/libc.so.6
> > #1  0x4058da24 in __DTOR_END__ () from /lib/libc.so.6
> > #2  0x400308e3 in waitpid () from /lib/libpthread.so.0
> > #3  0x4c93401e in KCrash::defaultCrashHandler(int) ()
> >    from /usr/kde/3.1/lib/libkdecore.so.4
> > #4  <signal handler called>
> > #5  0x0820e610 in ?? ()
> > #6  0x4c77e52b in KComboBox::setLineEdit(QLineEdit*) ()
> >    from /usr/kde/3.1/lib/libkdeui.so.4
> > #7  0x4c77d93d in KComboBox::KComboBox(bool, QWidget*, char const*) ()
> >    from /usr/kde/3.1/lib/libkdeui.so.4
> > #8  0x4c50c91b in KURLComboBox::KURLComboBox(KURLComboBox::Mode, bool,
> > QWidget*, char const*) () from /usr/kde/3.1/lib/libkio.so.4
> > #9  0x4c4ed880 in KFileDialog::init(QString const&, QString const&,
> > QWidget*) () from /usr/kde/3.1/lib/libkio.so.4
> > #10 0x4c4f1dd0 in KFileDialog::getOpenFileName(QString const&, QString
> > const&, QWidget*, QString const&) () from /usr/kde/3.1/lib/libkio.so.4
> > #11 0x4be1b3c0 in
> > Java_org_kde_koala_KFileDialog_getOpenFileName__Ljava_lang_String_2Ljava_
> >la ng_String_2Lorg_kde_qt_QWidget_2Ljava_lang_String_2 ()
> >    from /usr/kde/3.1/lib/libkdejava.so.1.0.0
> > #12 0x0806254d in ?? ()
> > #13 0x0805fb29 in ?? ()
> > #14 0x4045a9de in StubRoutines::_code1 ()
> >
> > _______________________________________________
> > Kde-java mailing list
> > Kde-java@mail.kde.org
> > http://mail.kde.org/mailman/listinfo/kde-java
>
> _______________________________________________
> Kde-java mailing list
> Kde-java@mail.kde.org
> http://mail.kde.org/mailman/listinfo/kde-java