Bug 283479 - cannot start ktimetracker
Summary: cannot start ktimetracker
Status: RESOLVED FIXED
Alias: None
Product: ktimetracker
Classification: Applications
Component: general (show other bugs)
Version: Git (master)
Platform: Ubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Thorsten Staerk
URL:
Keywords:
: 284557 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-06 16:07 UTC by John Tamoras
Modified: 2012-08-17 12:26 UTC (History)
17 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.1
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Tamoras 2011-10-06 16:07:32 UTC
Version:           Git (master) (using KDE 4.7.1) 
OS:                Linux

Try to start ktimetracker I get a nice window saying
"Could not create the KTimeTracker part."
and then gives me a nice empty ktimetracker window. If I open it from the console:
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setCompositionMode: Painter not active
QPainter::begin: Paint device returned engine == 0, type: 2
Object::connect: No such slot TimetrackerWidget::updateTabs()
Object::connect: No such slot ktimetrackerpart::keyBindings()
Object::connect: (sender name: 'options_configure_keybinding')

Reproducible: Always

Steps to Reproduce:
just start the application in ubuntu oneiric


Expected Results:  
see the applications windows
Comment 1 Thorsten Staerk 2011-10-06 21:28:47 UTC
How did you install this?
Comment 2 John Tamoras 2011-10-06 23:52:24 UTC
fresh installation of (k)ubuntu oneiric from the official ubuntu repositories, actually this is a "cross" report from my bug report in oneiric

https://bugs.launchpad.net/ubuntu/+source/kdepim/+bug/864975

problem still exists in 4.7.2 (ubuntu version)
Comment 3 Thorsten Staerk 2011-10-07 04:08:04 UTC
The right location for this bug report is bugs.launchpad.net because you do not get this problem if you compile from sources. The background of this bug is that ktimetracker just displays a kpart in its mainwindow. The same kpart is used for the kontact plugin. However I want to reproduce this bug - where can I download Ubuntu oneiric and what do I download (e.g. is it called "Ubuntu 11.10" or how?)?
Comment 4 Thorsten Staerk 2011-10-07 04:10:06 UTC
I see you have kdepim-runtime installed, but not kdepim. Never seen that. Can you try to install ktimetracker using
 sudo apt-get install kdepim
 sudo apt-get install ktimetracker
Comment 5 John Tamoras 2011-10-07 09:08:18 UTC
You can install Kubuntu directly (recommended)
http://cdimage.ubuntu.com/kubuntu/daily-live/current/

actually kdepim is a metapackage in ubuntu that depends on the programs (and requirements) of kdepim suite... so installing it really did nothing..

In the latest package of ktimetracker though I only get the second three warnings about Object:Connect
Comment 6 Thorsten Staerk 2011-10-07 10:54:28 UTC
so does the problem occur on Ubuntu or KUbuntu? And what happens if you apt-get install ktimetracker?
Comment 7 John Tamoras 2011-10-07 16:50:31 UTC
ok... kubuntu is ubuntu like fedora kde spin is fedora and the debian kde cd installs kde, nothing changes, just the "targeted" desktop and some settings.

ktimetracker installs fine, no warning, really nothing exciting..
Comment 8 John Tamoras 2011-10-07 16:58:23 UTC
also an opensuse user on the forum has all the other problems I have and the same warnings in console:
Object::connect: No such slot ktimetrackerpart::keyBindings()
Object::connect: (sender name: 'options_configure_keybinding')

but not this line I have
Object::connect: No such slot TimetrackerWidget::updateTabs()


and the programs seems to run "fine"

http://forum.kde.org/viewtopic.php?f=20&t=97021
Comment 9 Thorsten Staerk 2011-10-08 07:34:58 UTC
what is your problem? What functionality does not work for you? Does ktimetracker start now for you, or has it never? If you read the bug report above, it does not clarify these questions.
Comment 10 John Tamoras 2011-10-08 11:17:45 UTC
ktimetracker starts but doesn't have any menus or buttons or whatever, just an empty window
Comment 11 Thorsten Staerk 2011-10-08 12:03:56 UTC
yes your kPart is missing. How did you install ktimetracker? Did you use kubuntu or ubuntu? Where did you download it? What did you download? How can I reproduce what you see?
Comment 12 John Tamoras 2011-10-09 03:49:28 UTC
Just install kubuntu from the daily live cd
http://cdimage.ubuntu.com/kubuntu/daily-live/current/
this should install kde plasma desktop and setup an appropriate repository for you...
after you have logged in to the desktop you can open a terminal and do
sudo apt-get install kdepim
which will, of course, download and install as you know all dependencies, amongst them and ktimetracker, 
then start from the same terminal ktimetracker
Comment 13 Thorsten Staerk 2011-10-09 09:33:00 UTC
ok, I am downloading the ia32 architecture disk.
Comment 14 Thorsten Staerk 2011-10-09 10:52:36 UTC
I can reproduce your problem now in a virtual KUbuntu machine. Thanks for the report. I installed with the latest updates.
Comment 15 Andreas Kilgus 2011-10-17 20:13:00 UTC
> I can reproduce your problem now in a virtual KUbuntu machine. Thanks for the
> report. I installed with the latest updates.

FTR: Same problem exists in openSUSE 11.3/11.4 with activated additional repository to obtain current KDE Releases:

http://download.opensuse.org/repositories/KDE:/Extra/KDE_Release_47_openSUSE_11.3/ (respectively [...]_11.4/)

The packaging bug for ktimetracker in these repositories is handled at
https://bugzilla.novell.com/show_bug.cgi?id=724044
Comment 16 Stephan Kulow 2011-10-18 19:39:31 UTC
the bug in the kde repo is hopefully soon gone, with the packaging bug fixed, the problem looks on opensuse just like in the first comment.
Comment 17 Thorsten Staerk 2011-10-19 06:02:56 UTC
Coolo, this is not a KDE bug in my opinion. When I compile, link and install ktimetracker from sources, it works perfectly.
Comment 18 Stephan Kulow 2011-10-19 08:26:23 UTC
that's only an indication not a proof. There are many things in between working fine when compiled by the developer and a packaging bug.

Just to name one example: you most likely use debug mode while packages are built with RELEASE.

I verified your claim now and took kdepim-4.7.2 and ran make install in ktimetracker - which goes into /usr/local

/usr/local/bin/ktimetracker will give the same result - the part could not be created.
Comment 19 Thorsten Staerk 2011-10-19 08:27:39 UTC
Thanks for fixing the SUSE bug!
What bug is in the KDE repo?
Comment 20 Thorsten Staerk 2011-10-19 08:29:02 UTC
yes of course - I was told on irc strictly not to do make install inside of kdepim/ktimetracker, but inside of kdepim itself
Comment 21 Thorsten Staerk 2011-10-19 08:30:27 UTC
ok, I think you gave me a way how to reproduce this error. Run make install inside of ktimetracker, not inside of ktimetracker/...
Comment 22 Thorsten Staerk 2011-10-21 16:51:21 UTC
*** Bug 284557 has been marked as a duplicate of this bug. ***
Comment 23 Andreas Kilgus 2011-11-07 12:52:59 UTC
Bug still present in ktimetracker-4.7.3-5.2.i586 (openSUSE 11.4).
Comment 24 Andreas Kilgus 2011-11-15 14:47:37 UTC
So, as time goes by ... are we stuck in some "it's _your_ bug <-> no, it's _your_ bug" ping pong? If I look at my desktop - for almost every application I seriously rely on I keep using the 3.5.10 version (or have switched to some non-KDE application already resp. am looking for such an alternative), karm adding another entry to this list. :-/
Comment 25 Stephan Kulow 2011-11-15 15:41:29 UTC
compile from sources if you really care. If you only want to troll, go on with your life.
Comment 26 Andreas Kilgus 2011-11-15 18:38:06 UTC
Saved our time, went on with my life and work, installed Baralga and Charm. Thanks for 10 years of KDE, despite the lack of a happy end. Bye.
Comment 27 Jörg von Frantzius 2011-11-29 17:24:59 UTC
Seeing this with KDE 4.7.3 on Kubuntu 11.10 Oneiric, after launch a dialog says "Could not create the KTimeTracker part.", and upon dismissing the dialog, a tiny empty window opens.
Comment 28 Jörg von Frantzius 2011-11-29 17:29:54 UTC
For Kubuntu this is tracked in https://bugs.launchpad.net/ubuntu/+source/kdepim/+bug/864975
Comment 29 Karl Ove Hufthammer 2012-01-03 08:51:11 UTC
I observe the same problem in a brand new installation of openSUSE 12.1 (64-bit), using the official repositories. So it seems like this is indeed not a Ubuntu-specific bug.
Comment 30 Jerry L Kreps 2012-01-19 15:29:22 UTC
I added KTimeTracker from the Kubuntu repository to my fully updated 12.04 ALPHA install and got the following errors:


Object::connect: No such slot ktimetrackerpart::keyBindings()
Object::connect:  (sender name:   'options_configure_keybinding')
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 20 (X_GetProperty)
  Resource id:  0x320001e

A blank window was created.
Comment 31 Philip Muškovac 2012-02-18 21:33:36 UTC
After spending some time to debug this today, I think I've bisected this down to the -Wl,-Bsymbolic-functions linker option that's on by default in ubuntu package builds.
Build with it: kpart fails to be created
Build without it: kpart is created fine
Comment 32 Martin Bříza 2012-04-26 07:41:41 UTC
The same problem appeared in Fedora 17 RC4.1 with both KDE SC 4.8.1 and 4.8.2.
It is reported on https://bugzilla.redhat.com/show_bug.cgi?id=813257 .
Comment 33 Diego Viola 2012-08-03 01:22:52 UTC
I have this same problem:

"Could not create the KTimeTracker part."

I'm on Arch Linux x86_64, KDE 4.8.4.
Comment 34 regi.hops 2012-08-03 16:32:31 UTC
openSUSE 12.1 x86_64
4.7.x not working
4.8.x not working
4.9.0 not working
Comment 35 Diego Viola 2012-08-03 17:24:40 UTC
Any plans to fix this?
Comment 36 Petr Běhan 2012-08-06 14:10:33 UTC
I have been plagued for a few months by this problem, or at least a problem with the same symptoms: ktimetracker pops modal dialog saying "could not create ktimetrackerpart" and then opens empty window. For me, it's 100% correlated with compiler used. I first noticed it after upgrading to gcc-4.7-alpha, and it's been that way ever since. If I rebuild my system (gentoo x86_64) using gcc-4.7.anything, ktt is broken. If I then switch compiler to 4.6.3 and rebuild ktimetracker package, it works again (rest of system can stay built with 4.7).

Here is my attempt to poke at it a bit with gdb, but without any real QT knowledge, I have no idea what to try next:

KTimeTracker compiled with gcc-4.7.2_pre9999 (snapshot of gcc-4_7-branch from Sat Aug 4 00:17:53, but been the same since 4.7.0 release):
(gdb) frame
#0  qobject_cast<ktimetrackerpart*> (object=0x5b5360) at /usr/include/qt4/QtCore/qobject.h:380
380         return static_cast<T>(reinterpret_cast<T>(object)->staticMetaObject.cast(object));
(gdb) bt
#0  qobject_cast<ktimetrackerpart*> (object=0x5b5360) at /usr/include/qt4/QtCore/qobject.h:380
#1  0x000000000043eff6 in KPluginFactory::create<ktimetrackerpart> (this=0x523310, parent=0x652b00, args=...) at /usr/include/kpluginfactory.h:509
#2  0x000000000043da02 in MainWindow::MainWindow (this=0x652b00, icsfile=..., __in_chrg=<optimized out>, __vtt_parm=<optimized out>)
    at /usr/src/debug/kde-base/ktimetracker-4.9.0/ktimetracker-4.9.0/ktimetracker/mainwindow.cpp:68
#3  0x0000000000422adc in main (argc=1, argv=0x7fffffffd868) at /usr/src/debug/kde-base/ktimetracker-4.9.0/ktimetracker-4.9.0/ktimetracker/main.cpp:128
(gdb) print reinterpret_cast<T>(object)
$15 = (ktimetrackerpart *) 0x5b5360
(gdb) print reinterpret_cast<T>(object)->staticMetaObject.cast(object)
$16 = (QObject *) 0x0 <====== This 0x0 is then returned and causes message box to appear.

Similar session when compiled with 4.6.3:
(gdb) bt
#0  qobject_cast<ktimetrackerpart*> (object=0x555000) at /usr/include/qt4/QtCore/qobject.h:380
#1  0x000000000043f3b8 in KPluginFactory::create<ktimetrackerpart> (this=0x54c910, parent=0x671d20, args=...) at /usr/include/kpluginfactory.h:509
#2  0x000000000043de27 in MainWindow::MainWindow (this=0x671d20, icsfile=..., __in_chrg=<optimized out>, __vtt_parm=<optimized out>)
    at /usr/src/debug/kde-base/ktimetracker-4.9.0/ktimetracker-4.9.0/ktimetracker/mainwindow.cpp:68
#3  0x00000000004230ce in main (argc=1, argv=0x7fffffffd868) at /usr/src/debug/kde-base/ktimetracker-4.9.0/ktimetracker-4.9.0/ktimetracker/main.cpp:128
(gdb) print reinterpret_cast<T>(object)
$17 = (ktimetrackerpart *) 0x555000
(gdb) print reinterpret_cast<T>(object)->staticMetaObject.cast(object)
$18 = (QObject *) 0x555000 <====== now it works

CXXFLAGS=-O0 -ggdb
-Bsymbolic-function mentioned earlier is not enabled
Comment 37 Diego Viola 2012-08-08 12:39:16 UTC
I still have this problem with KDE 4.9.0, I'm on archlinux x86_64.

*sigh*
Comment 38 Ryan Rix 2012-08-11 08:06:44 UTC
I am seeing this issue in Fedora 18 running KDE 4.9 as well.
Comment 39 Sergio Martins 2012-08-15 12:11:49 UTC
Git commit bb773366167af50fc99025473dc20ab5ab41e1cc by Sergio Martins.
Committed on 15/08/2012 at 14:01.
Pushed by smartins into branch 'KDE/4.9'.

Make KTimeTracker start.

By using a dynamic_cast<> instead of a qobject_cast<>.

A proper fix would be fixing the CMakeLists.txt file:

ktimetrackerpart.cpp is defined twice, one in the ktimetracker
binary, and one in the plugin, this will make qobject_cast fail
somewhere in KPluginLoaded/KPluginFactory code.

I tried fixing CMakeLists.txt but it's not trivial, there's
a interdependency between stuff and couldn't get it to work with
the little time I have for it.
Related: bug 291258, bug 285434

M  +1    -1    ktimetracker/mainwindow.cpp

http://commits.kde.org/kdepim/bb773366167af50fc99025473dc20ab5ab41e1cc
Comment 40 Diego Viola 2012-08-17 05:21:51 UTC
Thanks a lot for fixing this issue, is Bug 255183 also fixed with this patch/fix? or that's a different problem?

Thanks.
Comment 41 Sergio Martins 2012-08-17 12:26:09 UTC
(In reply to comment #40)
> Thanks a lot for fixing this issue, is Bug 255183 also fixed with this
> patch/fix? or that's a different problem?
> 
> Thanks.

It's a different problem.