Bug 353965 - ktimetracker hits addCmcLineOptions() assertion
Summary: ktimetracker hits addCmcLineOptions() assertion
Status: RESOLVED WORKSFORME
Alias: None
Product: ktimetracker
Classification: Applications
Component: general (other bugs)
Version First Reported In: Git (master)
Platform: Compiled Sources macOS
: NOR normal
Target Milestone: ---
Assignee: Zoltan Gyarmati
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-16 15:38 UTC by RJVB
Modified: 2025-07-23 03:47 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RJVB 2015-10-16 15:38:19 UTC
KTimeTracker (git v4.14.10-14-g58c6ada) has developed a new issue on OS X. It aborts because an ASSERT in KCkdLineArgs::addCmdLineOptions() is hit:

   Q_ASSERT( s->parsed == false ); // You must add _ALL_ cmd line options
                                   // before accessing the arguments!

This was not the case with ktimetracker from KDE PIM 4.13.3 which I ran until recently.

Backtrace:
 Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
 0   libsystem_kernel.dylib        	0x00007fff92a46866 __pthread_kill + 10
 1   libsystem_pthread.dylib       	0x00007fff8d2c535c pthread_kill + 92
 2   libsystem_c.dylib             	0x00007fff91a78b1a abort + 125
 3   QtCore                        	0x0000000104a09bdc qt_message_output(QtMsgType, char const*) + 316
 4   QtCore                        	0x0000000104a0afaa qt_message(QtMsgType, char const*, __va_list_tag*) + 506
 5   QtCore                        	0x0000000104a0964f qFatal(char const*, ...) + 159
 6   libkdecore.5.dylib            	0x00000001046098cf KCmdLineArgs::addCmdLineOptions(KCmdLineOptions const&, KLocalizedString const&, QByteArray const&, QByteArray const&) + 2079
 7   libkdeui.5.dylib              	0x0000000103185551 KUniqueApplication::addCmdLineOptions() + 337
 8   libkdeui.5.dylib              	0x0000000103185733 KUniqueApplication::start(QFlags<KUniqueApplication::StartFlag>) + 67
 9   libkdeui.5.dylib              	0x00000001031856e8 KUniqueApplication::start() + 24
 10                                	0x00000001024816aa main + 4538 (main.cpp:127)
 11  libdyld.dylib                 	0x00007fff8ddb45fd start + 1


Reproducible: Always

Steps to Reproduce:
1. State ktimetracker


Actual Results:  
aborts with the message

ASSERT: "s->parsed == false" in file kdelibs4-4.14.git/kdecore/kernel/kcmdlineargs.cpp, line 528



Expected Results:  
app starts correctly

as far as I can tell, no additional CmdLineOptions are injected on OS X.

I have tried removing the unique application check, but the abort remains. When I add an explicit KCmdLineArgs::reset() followed by addCmdLineOptions(options) before the unique app check, another assert is hit instead.

What does allow the application to start correctly is removing all the checks that can set `konsolemode=true`, and moving the `KCmdLineArgs *args` declaration to after the declaration of `KUniqueApplication myApp`.
Comment 1 Andrew Crouthamel 2018-09-04 18:53:15 UTC
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years so I will be closing this bug.
Comment 2 Christoph Cullmann 2025-06-23 18:59:11 UTC
That is still maintained, but large parts are re-written compared to the state of this bug report.

https://invent.kde.org/pim/ktimetracker

Please try a recent release, thanks!
Comment 3 Bug Janitor Service 2025-07-08 03:47:40 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2025-07-23 03:47:03 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.