[kde-solaris] KURLRequester problem on Solaris 2.6
Albert Chin
kde-solaris at mlists.thewrittenword.com
Fri Feb 4 06:42:28 CET 2005
On Thu, Feb 03, 2005 at 10:50:01PM -0500, Stefan Teleman wrote:
> On Thursday 03 February 2005 22:31, Michael Lambrellis wrote:
> > When running any application that contains a KURLRequester or
> > KURLComboRequester widget, if I click in the widget and start
> > typing, the application will crash on (what seems like) the first
> > keystroke. I didn't build my kde with debug flags so I get no
> > useful info from the crash. I have checked the diff between
> > kdelibs/kio/kfile/kurlrequester.h/.cpp between 3.2.3 (which I have
> > and which runs OK) and 3.3.2 and I can't see anything significant.
>
> this is a known bug for which i have submitted a patch to
> kde-core-devel, but it would seem that the patch did not make it into
> 3.3.2.
>
> so, here's the patch (attached), it belongs to
> kdelibs/kio/kio/kurlcompletion.cpp
>
> --Stefan
>
> --
> Stefan Teleman 'Nobody Expects the Spanish Inquisition'
> steleman at nyc.rr.com -Monty Python
> --- kurlcompletion.cpp.kde.orig Tue Jun 22 13:36:41 2004
> +++ kurlcompletion.cpp Wed Oct 27 22:31:20 2004
> @@ -219,10 +238,11 @@
>
> // Loop through all directory entries
>
> - struct dirent dirPosition;
> + size_t direntSize = sizeof (struct dirent) + size_t(MAXPATHLEN) + sizeof(char);
> + struct dirent* dirPosition = (struct dirent *) malloc (direntSize);
> struct dirent *dirEntry = 0;
> while ( !terminationRequested() &&
> - ::readdir_r( dir, &dirPosition, &dirEntry ) == 0 && dirEntry )
> + ::readdir_r( dir, dirPosition, &dirEntry ) == 0 && dirEntry )
> {
> // Skip hidden files if m_noHidden is true
>
> @@ -269,11 +289,9 @@
> continue;
> }
> }
> -
> addMatch( file );
> }
> }
> -
> // chdir to the original directory
>
> QDir::setCurrent( path );
> @@ -280,6 +298,7 @@
>
> ::closedir( dir );
> dir = 0;
> + free (dirPosition);
> }
>
> done();
This is the part that's crashing.
Stefan Teleman has other patches that might be useful on Solaris for
you.
--
albert chin (china at thewrittenword.com)
More information about the kde-solaris
mailing list