Bug 103775

Summary: kontact --module XYZ crashes after minimizing to tray icon and maximizing back
Product: [Applications] kontact Reporter: Unknown <null>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: crash CC: faure, illogical1, molkentin, NewsAssi, torquil
Priority: NOR    
Version First Reported In: 1.1   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Unknown 2005-04-13 08:26:38 UTC
Version:           1.1 (using KDE KDE 3.4.0)
Installed from:    Unlisted Binary Package

Hi,

howto reproduce:
1) Start Kontact with some plugin as parameter, say 'kontact --module summaryplugin'
2) Minimize Kontact to _tray_ (by clicking on the tray icon of kmail/kontact)
3) Try to maximize it the same way
=> Tray icon disappears, kontact seems to close, no crash report

But running 'kontact --module summaryplugin' from konsole gives the error message:

kontact: Unbekannte Option "-module".
kontact: Benutzen Sie den Parameter "--help", um die verfügbaren Optionen zu sehen.

(translates to: unknown option "-module", use "--help" to get a list of available options)

This message appears in step 3).

BTW: Running kontact without a --module parameter it doesn't crash this way!

Martin
Comment 1 Stephan Binner 2005-04-14 10:55:32 UTC
backtrace at hand?
Comment 2 Unknown 2005-04-14 11:14:52 UTC
As I mentioned above: It's no real "crash" but kontact CLOSES with error message

 kontact: Unbekannte Option "-module".
 kontact: Benutzen Sie den Parameter "--help", um die verfügbaren Optionen zu sehen.

when being started out of konsole with some --module parameter (for message's rough translation see above). The point is: It says option "-module" unknown - although I passed "--module" to kontact. Also why should kontact complain about wrong command line parameter while being restored from tray icon?? Or did I get it wrong? How should I produce such a backtrace?

 gdb --args kontact --module summaryplugin

produced a 

 Program exited normally.

after kontact's startup. Doing the steps above only the error message mentioned above reappears - no backtrace!

(gdb) backtrace
No stack.

Martin
Comment 3 Teemu Rytilahti 2005-04-14 23:26:31 UTC
Yup, it just disappears/closes, and I can reproduce and confirm this on current HEAD.
Comment 4 Unknown 2005-06-07 10:16:38 UTC
this bug is still there in 1.1.1 (KDE 3.4.1) ... very annoying!!
Comment 5 Tobias Koenig 2005-08-16 16:17:05 UTC
Hi,

the problem is in the handling of the command line options.
David, we discussed it in Osnabrueck during the last kdepim meeting. Any idea how to solve it?

Ciao,
Tobias
Comment 6 Tobias Koenig 2005-08-16 17:27:27 UTC
*** Bug 109185 has been marked as a duplicate of this bug. ***
Comment 7 Will Stephenson 2006-10-28 11:08:38 UTC
Still present in KDE 3.5.5.  David, do you remember what was discussed?
Comment 8 Will Stephenson 2006-10-28 16:24:32 UTC
*** Bug 125810 has been marked as a duplicate of this bug. ***
Comment 9 David Faure 2006-12-11 15:01:12 UTC
SVN commit 612460 by dfaure:

loadAppArgs is called by KUniqueApplication to load the args coming from the other process,
so when it's called we certainly don't want to reparse the initial argc/argv again.
In most programs this made no difference, but in kontact this gave a failure since the
cmdline options got modified meanwhile (e.g. to load the kmail options instead).
BUG: 103775


 M  +2 -0      kcmdlineargs.cpp  


--- branches/KDE/3.5/kdelibs/kdecore/kcmdlineargs.cpp #612459:612460
@@ -263,6 +263,8 @@
 void
 KCmdLineArgs::loadAppArgs( QDataStream &ds)
 {
+   parsed = true; // don't reparse argc/argv!
+
    // Remove Qt and KDE options.
    removeArgs("qt");
    removeArgs("kde");
Comment 10 Thomas McGuire 2007-04-12 21:08:48 UTC
*** Bug 138269 has been marked as a duplicate of this bug. ***