kf5 port(olivier)

Olivier Churlaud olivier at churlaud.com
Sun Sep 13 09:21:53 UTC 2015


Hi,

Le 13/09/2015 10:44, RISHABH GUPTA a écrit :
>      Changes
>
>     -------
>
>     Work more, and reduce segfaults
>
>
>     Repository: amarok
>
>
>     Description (updated)
>     -------
>     Port of main.cpp and App
>
>
>     It compiles 100%, and there is a segmentation fault after the end
>     of the App::continueInit().
>     I'm not able to trace it further.
>
>     Please help me to port well the main + App class so that the play,
>     pause (and so one) commands are well read and to deal correctly
>     with the unique/multiple instance.
>
>
>     Diffs (updated)
>     -----
>
>       src/App.h 2089981
>       src/scripting/scriptmanager/ScriptManager.cpp bb62be1
>       src/scanner/AbstractDirectoryWatcher.cpp 168c68a
>       src/org.kde.amarok.desktop PRE-CREATION
>       src/main.cpp 385e047
>       src/core/support/Components.cpp 9f97eb6
>       src/configdialog/dialogs/ScriptsConfig.cpp bbec667
>       src/amarok.desktop 433c757
>       src/browsers/filebrowser/FileBrowser.cpp 3d40d9b
>       src/TrayIcon.cpp be25497
>       src/PluginManager.cpp a9a1c47
>       src/CMakeLists.txt afeef4a
>       src/MainWindow.cpp d3bbc0b
>       src/App.cpp 6028bc8
>
>     Diff: https://git.reviewboard.kde.org/r/125126/diff/
>
>
>     Testing (updated)
>     -------
>
>     It compiles 100%, and there is a segmentation fault after the end
>     of the App::continueInit().
>
>     I'm not able to trace it further.
>
>
>
> hello olivier,
>
> I can try to help you out but could you please explain the last 
> changes that you have made . Just a brief explanation about what was 
> causing the seg fault and what did you do  to solve it . I understood 
> the changes that involved changing of Kuniqueapplication to 
> Qapplication but the one's you made after that,i have just applied 
> them ,so right now i am getting the same error as you are. You have 
> alreay ported much of the main and app class what else needs to be done?
Fair enough, I didn't say a word about this :)

So my goal was to port the main and the App class to KF5/Qt5. So as you 
said, it involve mostly to move from KUniqueApplication to QApplication. 
I did this. You have to know that KUniqueApplication is just an 
extension of QApplication (through KAppplication) which does a DBus 
registration in order to know how many instance are or can be started. 
So I added also a KDBusService to register the instance.

The porting seems to work well BUT I didn't take in account the fact 
that you might want to use the --play --pause (and so on) CLI commands. 
This should be put in the activateRequested() slot, but I'm not really 
sure how this should be done.

The second thing is that I'm not sure if I ported everything right, or 
not, since I don't have an deep knowledge of KDBus and all this process.

Then, when it compiled well, I started to track the segfault. Basically, 
you start amarok with --debug and you track where it stops. But it's not 
enough, so I added qDebug() << "a recognizable comment" everywhere to 
know where it stops (first in the main then in App::App(), then in 
App::continueEdit() and so on recursively.

My last segfault (with the patch I send) occurs after the end of 
App::continueEdit(), meaning it might come from a slot somewhere, called 
by one of all the signal that could be sent.

Now you know as much as I do. Pleas ask further if I'm not clear enough :)
> here's the output
> http://pastebin.com/5StyEUth
Huuu.... Wait, it's not possible. My segfault doesn't happen in 
handleCliArgs() but way after... It means that I left a bug, that works 
on my system but not yours OR that something is wrong on your side. 
Please investigate why this happen, I'll do this on my side too.

Cheers,
Olivier
>
>
>
>     Thanks,
>
>     Olivier Churlaud
>
> thanks,
> rishabh
>
>
>
>
>
> _______________________________________________
> Amarok-devel mailing list
> Amarok-devel at kde.org
> https://mail.kde.org/mailman/listinfo/amarok-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/amarok-devel/attachments/20150913/dc84fd7b/attachment-0001.html>


More information about the Amarok-devel mailing list