Bug 56635 - Focus -> find object dialog disappears immediately before one can change the selection to look for a different object
Summary: Focus -> find object dialog disappears immediately before one can change the ...
Status: RESOLVED FIXED
Alias: None
Product: kstars
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kstars
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-30 23:13 UTC by Dave Killick
Modified: 2003-04-05 01:44 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Killick 2003-03-30 23:13:51 UTC
Version:           1.0 (using KDE 3.1.0)
Installed from:    compiled sources
Compiler:          gcc version 3.2.2
OS:          Linux (i686) release 2.4.20

An object is selected in the  focus -> find object dialog box.
If one then wishes to look at a different object, One selects the Focus -> 'Find Object' menu item.
The dialog box appears, draws, and fills the list box and its data and all buttons etc.
The dialog box promptly disappears before any input can be made.

I am running on a stock Slackware-9.0 system, and this problem can be reproduced on both the KStars shipped with the distro, and with the cvs tree as of March 29 2003.
Comment 1 kstars 2003-03-31 01:49:55 UTC
Subject: Re:  New: Focus -> find object dialog disappears immediately before one can change the selection to look for a different object

Hello,

Thank you for the bug report.  You are the second person to report this 
problem (but yours is the first official bug report; the other person emailed 
me directly).  I cannot reproduce this bug, so I am going to need your help 
to track it down.

First, start kstars from the command line and then cause the bug to happen.  
Do you get any message on the console when the Find window disappears?

Next, open kstarsactions.cpp in a text editor, find the line in the slotFind() 
function that looks like this:
if ( findDialog->exec() == QDialog::Accepted && findDialog->currentItem() ) {

Directly after this line, insert the following debugging statement:
   kdDebug() << "Find dialog exited normally" << endl;

and recompile.  When you run kstars from the command line, and the bug occurs, 
do you see the debug statement output on the console?

Finally, you can try adding the following line directly before the above if 
statement:
clearCachedFindDialog();

Let me know if that solves the problem.

Comment 2 Dave Killick 2003-03-31 13:04:35 UTC
Subject: Subject:  Focus -> find object dialog disappears immediately
 before one can change the selection to look for a different object 

Thanks for getting back to me, I think KStars is fantastic, and am happy 
to help however I can.

Here is a dump of everything that appears in the terminal window. 
Nothing extra appears when the window disappears.
Comment 3 Dave Killick 2003-03-31 13:09:20 UTC
Subject:  Focus -> find object dialog disappears immediately before
 one can change the selection to look for a different object

Thanks for getting back to me, I think KStars is fantastic, and am happy 
to help however I can.

Here is a dump of everything that appears in the terminal window. 
Nothing extra appears when the window disappears.
Comment 4 Dave Killick 2003-03-31 13:40:02 UTC
Subject: Re:  Focus -> find object dialog disappears immediately
 before one can change the selection to look for a different object

Thanks for getting back to me, I think KStars is fantastic, and am happy 
to help however I can.

Here is a dump of everything that appears in the terminal window. 
Nothing extra appears when the window disappears.
=======
~$ kstars
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
glibc >= 2.1 detected.  Using GNU extension sincos()
WARNING: [bool KStarsData::readURLData(QString, int)] NGC 4826 not found
WARNING: [bool KStarsData::readURLData(QString, int)] NGC 205 not found
WARNING: [bool KStarsData::readURLData(QString, int)]  not found
Setting clock UTC = Mon Mar 31 01:04:15 2003 julian day = 2452729.54
ASSERT: "i <= nodes" in /usr/lib/qt-3.1.2/include/qvaluelist.h (372)
ASSERT: "i <= nodes" in /usr/lib/qt-3.1.2/include/qvaluelist.h (372)
ASSERT: "i <= nodes" in /usr/lib/qt-3.1.2/include/qvaluelist.h (372)
Daylight Saving Time active
Next Daylight Savings Time change (Local Time): Sun Oct 26 03:00:00 2003
Next Daylight Savings Time change (UTC): Sun Oct 26 02:00:00 2003
Setting clock UTC = Mon Mar 31 00:04:15 2003 julian day = 2452729.50
Starting the timer
========

Added the debug statement, but I only see it once, ie. the first time 
the dialog appears.

Added clearCachedFindDialog(); and got a SIGSEGV the first time the 
dialog box is requested.
gdb says that findDialog has been set to 0x0 (NULL pointer).

If I add the following lines between clearCachedFindDialog(); and the if 
statement, everything seems to work perfectly.
f ( !findDialog ) {
 findDialog = new FindDialog( this );
}

I see these lines are a repeat of some lines earler in the function, and 
moved the clearCachedFindDialog(); before them, and all works fine that 
way too.

Hope that helps,
Let me know if there's anything else I can do.

kstars@30doradus.org wrote:

>------- You are receiving this mail because: -------
>You reported the bug, or are watching the reporter.
>     
>http://bugs.kde.org/show_bug.cgi?id=56635     
>
>
>
>
>------- Additional Comments From kstars@30doradus.org  2003-03-31 01:49 -------
>Subject: Re:  New: Focus -> find object dialog disappears immediately before one can change the selection to look for a different object
>
>Hello,
>
>Thank you for the bug report.  You are the second person to report this 
>problem (but yours is the first official bug report; the other person emailed 
>me directly).  I cannot reproduce this bug, so I am going to need your help 
>to track it down.
>
>First, start kstars from the command line and then cause the bug to happen.  
>Do you get any message on the console when the Find window disappears?
>
>Next, open kstarsactions.cpp in a text editor, find the line in the slotFind() 
>function that looks like this:
>if ( findDialog->exec() == QDialog::Accepted && findDialog->currentItem() ) {
>
>Directly after this line, insert the following debugging statement:
>   kdDebug() << "Find dialog exited normally" << endl;
>
>and recompile.  When you run kstars from the command line, and the bug occurs, 
>do you see the debug statement output on the console?
>
>Finally, you can try adding the following line directly before the above if 
>statement:
>clearCachedFindDialog();
>
>Let me know if that solves the problem.
>  
>

Comment 5 kstars 2003-04-05 01:44:13 UTC
Implemented the bug reporter's workaround (calling clearCachedFindDialog() at 
beginning of slotFind()).  The problem seems to be that the FindDialog remembers 
it's QDialog::Accepted result-state, so that when exec() is called a second time, it 
immediately thinks the user has already pressed "Ok".  I can't figure out a way to 
reset the result-state to an "invalid" value, so for now the workaround will have to 
do. 
 
(clearCachedFindDialog() essentially deletes the existing instance of FindDialog, so 
that the slot can instantiate a new one that will actually work) 
 
We still don't know why this ony happens for some users.  Curiously enough, it 
started happening on my system right after I upgraded my Qt libs.  Hmm...