[Kde-games-devel] crash in knights, dokumentation for libkdegames, etc.

Manoharan Sundaramoorthy ssmanoharan at gmail.com
Mon Mar 21 14:52:35 UTC 2016


On Mon, Mar 21, 2016 at 1:32 PM, Alexander Semke <alexander.semke at web.de>
wrote:

> > Tried to reproduce, works just fine here.
> > You're trying the kf5 build, right?
> Yes, kf5 build. Does it work for you if you select "Fritz look alike" (the
> board looks broken with this theme here) and then select another theme?
>
> > Do you have a valgrind trace or something?
> ==20236== Invalid read of size 4
> ==20236==    at 0x5143A93: KGameRendererClient::setRenderSize(QSize const&)
> (in /usr/lib64/libKF5KDEGames.so.7.0.0)
> ==20236==    by 0x4C79ED: Knights::Board::updateGraphics() (board.cpp:467)
> ==20236==    by 0x4C792D: Knights::Board::updateTheme() (board.cpp:462)
>
> and many other "invalid read of size"-errors initiated in
> Knights::Board::updateTheme()
>
> > BTW, the current master doesn't build
> >
> https://build.kde.org/job/knights%20master%20kf5-qt5/PLATFORM=Linux,compiler
> > =gcc/24/console
> I see. Those errors are because of the connect-statements with the new Qt
> signal-slog syntax introduced by Manoharan during his port to kf5. This
> never
> worked for me, neither with g++-4.8 nor with g++-5. We had a small
> discussion
> about this in the old thread "porting and the next release of knights".
> Currently, I deactivated those three connects to get knights compiled. I'll
> have a look at it again soon.
>
I dont think the reason for those errors are because of my changes. The
link quotes two errors:
1. klocale.h not found.
Looks a recent change  includes  of  "klocale.h" instead of
"KLocalizedString" in gamemanager.cpp

2. error: ‘void Knights::MainWindow::fileSave()’ is private
 This too a change in knights.h for fileSave() from public slot to private
slot.

With the below changes, it compiles for me:
-----------
diff --git a/src/gamemanager.cpp b/src/gamemanager.cpp
index 0f5aa97..2cafc15 100644
--- a/src/gamemanager.cpp
+++ b/src/gamemanager.cpp
@@ -36,7 +36,7 @@
 #include "knightsdebug.h"

 #include <KgDifficulty>
-#include <klocale.h>
+#include <KLocalizedString>

 #ifdef HAVE_SPEECH
 #include <QtTextToSpeech>
diff --git a/src/knights.h b/src/knights.h
index ad50c38..114f9c2 100644
--- a/src/knights.h
+++ b/src/knights.h
@@ -46,10 +46,12 @@ class MainWindow : public KXmlGuiWindow
 public:
     MainWindow();

+public Q_SLOTS:
+    void fileSave();
+
 private Q_SLOTS:
     void fileNew();
     void fileLoad();
-    void fileSave();
     void fileSaveAs();
     void pauseGame(bool);
     void undo();


>
> > BTW2, you have a valgrind warning just starting up
> > [...]
> There are for sure more of such problems in the code. I'm going through the
> bugs reported on bugs.kde.org now and do some cleanup in the code. Many of
> those errors/warning will be corrected during this cleanup. After that
> I'll do
> dedicated valgrding sessionis. I pushed a fix now for the unitialized
> members.
>
>
> --
> Alexander
> _______________________________________________
> kde-games-devel mailing list
> kde-games-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-games-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20160321/ba4183cc/attachment.html>


More information about the kde-games-devel mailing list