Re: Calligrastage 2.9.8/Mac : dynamic_cast error message

2015-10-27 Thread René J . V . Bertin
On Monday October 19 2015 00:05:35 Friedrich W. H. Kossebau wrote:

> Please commit to calligra/2.9 and master. Can cherry-pick to master myself, 
> if 
> you do not have that branch present.

Done (commit ff0f7766), and indeed please do the cherry pick to master yourself.

BTW, I noticed that `git describe` in the 2.9 branch returns 
"v2.9.7-151-g0b4834c", is that intentional?

Cheers,
René
___
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel


Re: Calligrastage 2.9.8/Mac : dynamic_cast error message

2015-10-27 Thread Friedrich W. H. Kossebau
Am Dienstag, 27. Oktober 2015, 19:54:39 schrieb René J.V. Bertin:
> On Monday October 19 2015 00:05:35 Friedrich W. H. Kossebau wrote:
> > Please commit to calligra/2.9 and master. Can cherry-pick to master
> > myself, if you do not have that branch present.
> 
> Done (commit ff0f7766), and indeed please do the cherry pick to master
> yourself.

Will do.

> BTW, I noticed that `git describe` in the 2.9 branch returns
> "v2.9.7-151-g0b4834c", is that intentional?

Rather not. Thanks for the hint, 2.9.8 tag should appear soon.

Cheers
Friedrich
___
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel


Re: Calligrastage 2.9.8/Mac : dynamic_cast error message

2015-10-18 Thread Friedrich W. H. Kossebau
Am Freitag, 16. Oktober 2015, 21:54:50 schrieb René J.V. Bertin:
> On Friday October 16 2015 01:17:50 Friedrich W. H. Kossebau wrote:
> > On my system with gcc version 5.1.1 it seems that does not result in a
> 
> Not, I've never seen this kind of error with gcc. Nor very often with clang,
> fortunately...
> > A workaround/fix might be to make KoSharedLoadingData a normally exported
> > class with implementation of constructor/destructor inside libflake?
> 
> It would seem so. I've had to do a similar fix with KDE PIM's ktimetracker;
> there, the issue was not a mysterious error message in the logs, but
> downright failure of a dynamic_cast.

By that error I assume it fails to do the dynamic_cast in Calligra as well, 
due to missing typeinfo? Just that the unsucessful cast might be error-
handled, so does not result in a crash.

Your patch not tested, but looks fine to me, especially this brings 
KoSharedLoadingData now on par with KoSharedSavingData :)

Please commit to calligra/2.9 and master. Can cherry-pick to master myself, if 
you do not have that branch present.

Cheers
Friedrich
___
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel


Re: Calligrastage 2.9.8/Mac : dynamic_cast error message

2015-10-16 Thread René J . V . Bertin
On Friday October 16 2015 01:17:50 Friedrich W. H. Kossebau wrote:

> On my system with gcc version 5.1.1 it seems that does not result in a 

Not, I've never seen this kind of error with gcc. Nor very often with clang, 
fortunately...


> A workaround/fix might be to make KoSharedLoadingData a normally exported 
> class with implementation of constructor/destructor inside libflake?

It would seem so. I've had to do a similar fix with KDE PIM's ktimetracker; 
there, the issue was not a mysterious error message in the logs, but downright 
failure of a dynamic_cast.


R.diff --git a/libs/flake/CMakeLists.txt b/libs/flake/CMakeLists.txt
index 7a97edc..b927d1d 100644
--- a/libs/flake/CMakeLists.txt
+++ b/libs/flake/CMakeLists.txt
@@ -102,6 +102,7 @@ set(flake_SRCS
 KoSnapData.cpp
 SnapGuideConfigWidget.cpp
 KoShapeShadow.cpp
+KoSharedLoadingData.cpp
 KoSharedSavingData.cpp
 KoViewConverter.cpp
 KoInputDeviceHandler.cpp
diff --git a/libs/flake/KoSharedLoadingData.cpp b/libs/flake/KoSharedLoadingData.cpp
new file mode 100644
index 000..4af8dc2
--- /dev/null
+++ b/libs/flake/KoSharedLoadingData.cpp
@@ -0,0 +1,28 @@
+/* This file is part of the KDE project
+   Copyright (C) 2007 Thorsten Zachmann 
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Library General Public
+   License as published by the Free Software Foundation; either
+   version 2 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public License
+   along with this library; see the file COPYING.LIB.  If not, write to
+   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+*/
+
+#include "KoSharedLoadingData.h"
+
+KoSharedLoadingData::KoSharedLoadingData()
+{
+}
+
+KoSharedLoadingData::~KoSharedLoadingData()
+{
+}
diff --git a/libs/flake/KoSharedLoadingData.h b/libs/flake/KoSharedLoadingData.h
index 0d9ed71..ce0372c 100644
--- a/libs/flake/KoSharedLoadingData.h
+++ b/libs/flake/KoSharedLoadingData.h
@@ -20,16 +20,18 @@
 #ifndef KOSHAREDLOADINGDATA_H
 #define KOSHAREDLOADINGDATA_H
 
+#include "flake_export.h"
+
 /**
  * The KoSharedLoadingData class is used to share data between shapes during loading.
  * These data can be added to the KoShapeLoadingContext using KoShapeLoadingContext::addSharedData().
  * A different shape can then get the data from the context using KoShapeLoadingContext::sharedData().
  */
-class KoSharedLoadingData
+class FLAKE_EXPORT KoSharedLoadingData
 {
 public:
-KoSharedLoadingData() {}
-virtual ~KoSharedLoadingData() {}
+KoSharedLoadingData();
+virtual ~KoSharedLoadingData();
 };
 
 #endif /* KOSHAREDLOADINGDATA_H */
___
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel


Re: Calligrastage 2.9.8/Mac : dynamic_cast error message

2015-10-15 Thread Friedrich W. H. Kossebau
Am Donnerstag, 15. Oktober 2015, 22:43:14 schrieb René J.V. Bertin:
> Hi,
> 
> Running a quick test of CalligraStage 2.9.8 on OS X 10.9, I see this error
> in my system.log:
> 
> Oct 15 22:35:09 Portia.local calligrastage[80756]: dynamic_cast error 1:
> Both of the following type_info's should have public visibility.  At least
> one of them is hidden. 19KoSharedLoadingData, 23KoTextSharedLoadingData.
> 
> Demangling:
> 19KoSharedLoadingData -> "KoSharedLoadingData"
> 23KoTextSharedLoadingData -> "KoTextSharedLoadingData"
> 
> I've been seeing similar messages for some Akonadi classes, but have never
> been able to figure out neither how to fix the code, nor if anything
> actually doesn't work because of this.
> 
> Maybe someone here has an idea?

No idea, but curious now.

KoSharedLoadingData is a header only class in libflake, not tagged for symbol 
export, with virtual destructor.
KoTextSharedLoadingData is a normal class in libkotext with separate source 
file compiled into libkotext, with class tagged for symbol export.

Quick googling hints OSX/LLVM* see some issue here.
http://stackoverflow.com/questions/27878186/dynamic-cast-fails-depending-on-os-version

*Message seems to be from 
https://llvm.org/svn/llvm-project/libcxxabi/trunk/src/private_typeinfo.cpp

As you said you saw this with Stage, while there are also dynamic_casts 
between both in libkotext, there is also one in 
KPrPlaceholderTextStrategy::loadOdf().

On my system with gcc version 5.1.1 it seems that does not result in a 
problem, e.g. libcalligrastageprivate has the typeinfo for KoSharedLoadingData 
created locally (and gets the one for KoTextSharedLoadingData from the linked 
libkotext):

koder@klux:~> nm -C 
System/opt/calligra3/lib64/libcalligrastageprivate.so.15.0.0 | grep 
SharedLoadingData
 U KoTextSharedLoadingData::paragraphStyle(QString const&, 
bool) const
00326298 d typeinfo for KoSharedLoadingData
 U typeinfo for KoTextSharedLoadingData
000e8e10 r typeinfo name for KoSharedLoadingData

Possibly LLVM treats things differently here, e.g. by not creating the 
typeinfo locally for the header-only class. No idea if that is right or wrong.

A workaround/fix might be to make KoSharedLoadingData a normally exported 
class with implementation of constructor/destructor inside libflake?

Cheers
Friedrich
___
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel


Calligrastage 2.9.8/Mac : dynamic_cast error message

2015-10-15 Thread René J . V . Bertin
Hi,

Running a quick test of CalligraStage 2.9.8 on OS X 10.9, I see this error in 
my system.log:

Oct 15 22:35:09 Portia.local calligrastage[80756]: dynamic_cast error 1: Both 
of the following type_info's should have public visibility.  At least one of 
them is hidden. 19KoSharedLoadingData, 23KoTextSharedLoadingData.

Demangling:
19KoSharedLoadingData -> "KoSharedLoadingData"
23KoTextSharedLoadingData -> "KoTextSharedLoadingData"

I've been seeing similar messages for some Akonadi classes, but have never been 
able to figure out neither how to fix the code, nor if anything actually 
doesn't work because of this.

Maybe someone here has an idea?

R.
___
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel