dolphin crashing MacOS

Frank Reininghaus frank78ac at googlemail.com
Sat Jun 22 08:14:37 BST 2013


Hi Kurt,

thanks for your message and for your efforts to debug this crash!

This looks like https://bugs.kde.org/show_bug.cgi?id=316209. The
latest backtrace already looked like there was an infinite recursion
going on, but I had been too busy with lots of other things to look
into this (and moreover, it's also kind of hard to debug issues that
are not reproducible on Linux).

2013/6/21 Kurt Hindenburg:
> Hi,
>   On MacOSX, dolphin crashes upon startup.  It appears that with
> GlobalViewProps=true it will run OK.
>
> Looking at the code dolphin/src/views/viewproperties.cpp
>
> @@ -103,8 +103,8 @@ ViewProperties::ViewProperties(const KUrl& url) :
>
>
> commenting out these 2 lines allows dolphin to work
>
> +            //ViewProperties defaultProps(url);
> +            //setDirProperties(defaultProps);
>
> I don't understand what dolphin is trying to do with those lines.  The crash
> is that ViewProperties() is called again and again until it crashes.

It is in "GlobalViewProps=false" mode, i.e., it tries to read the view
properties from a .directory file in the current directory. However,
if we end up in the lines that you've commented out, it seems that the
.directory file could not be found, and therefore, we try to use the
"global view properties" for this directory.

To do this, we do "settings->setGlobalViewProps(true)" and initialize
a new ViewProperties instance. In its constructor, the line

const bool useGlobalViewProps = settings->globalViewProps();

should make sure that 'useGlobalViewProps' is true (remember that we
changed the setting), and thus, the "const bool useDefaultProps"
should get the value "false" just before we arrive at the
commented-out lines again. Therefore, we cannot reach the
commented-out lines.

I'm not really sure why that fails on MacOS, but it looks like
changing the "GlobalViewProps" setting to true the first time the
constructor is called and then retrieving the "true" value from the
settings object during the second call of the constructor fails.

Looking at the generated function "static void setGlobalViewProps(
bool v )" in dolphin_generalsettings.h,

    static
    void setGlobalViewProps( bool v )
    {
      if (!self()->isImmutable( QString::fromLatin1( "GlobalViewProps" ) ))
        self()->mGlobalViewProps = v;
    }


I get the impression that one reason why this could fail is that the
setting is immutable.

To confirm my theory, could you apply the attached patch and see what
output it generates in that function? Here I get

# Check 1: settings->globalViewProps() returns false
# Check 2: settings->globalViewProps() returns true

when entering a folder without .directory file, but I would guess that
it always returns false on MacOS.

Thanks for your help.

Best regards,
Frank
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DebugViewPropertiesCrash.diff
Type: application/octet-stream
Size: 778 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20130622/50a74e30/attachment.obj>


More information about the kfm-devel mailing list