Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 May 2018 16:00:39 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 228199] [patch] graphics/okular: fix crash when opening files
Message-ID:  <bug-228199-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D228199

            Bug ID: 228199
           Summary: [patch] graphics/okular: fix crash when opening files
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: kde@FreeBSD.org
          Reporter: tijl@FreeBSD.org
             Flags: maintainer-feedback?(kde@FreeBSD.org)
          Assignee: kde@FreeBSD.org

Created attachment 193330
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D193330&action=
=3Dedit
patch

Okular crashes when opening a PDF attachment in Kmail.  It also crashes when
starting Okular, opening a first file and then opening a second file.  The
crashes happen because some dynamic_cast calls return NULL.  The attached p=
atch
replaces these with qobject_cast.  I'm not familiar enough with C++ to
understand why dynamic_cast fails.  The object is actually of type Okular::=
Part
and the casts are side casts from one parent class to another, not up or do=
wn
casts.  I thought dynamic_cast could handle this though.  Another way to fix
the crash was to down cast to Okular::Part, but then the linker complained =
that
the typeinfo wasn't available and okular had to be linked to okularpart.so =
to
fix that.  So, the problem may be that the side cast needs the typeinfo of
Okular::Part at runtime and that it isn't available?  Using qobject_cast fi=
xes
it because it doesn't rely on typeinfo.

Can someone reproduce this, because maybe this is some toolchain problem?

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-228199-7788>