Bug 85601 - kst needs an "i'm busy" indicator
Summary: kst needs an "i'm busy" indicator
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: RedHat Enterprise Linux Linux
: HI wishlist
Target Milestone: ---
Assignee: kst
URL:
Keywords:
: 88078 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-07-21 06:00 UTC by Matthew Truch
Modified: 2004-10-26 05:02 UTC (History)
1 user (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 Matthew Truch 2004-07-21 06:00:47 UTC
Version:           0.99-devel (using KDE KDE 3.2.1)
Installed from:    RedHat RPMs
OS:                Linux

Now that kst is (partially?) threaded, the user interface continues to run when kst is busy (ie when you click 'next page' when your data has ~1000000 points per page), which is confusing.  There should be some kind of visual indicator (busy cursor, or better, an indicator on the status bar (which normally just says "Ready")) letting one know when things are being worked on in the background.  When looking at live data, this indicator should pulse as new data arrives (and is processed).
Comment 1 George Staikos 2004-07-21 07:22:50 UTC
On Wednesday 21 July 2004 00:00, Matthew Truch wrote:
> Now that kst is (partially?) threaded, the user interface continues to run
> when kst is busy (ie when you click 'next page' when your data has ~1000000
> points per page), which is confusing.  There should be some kind of visual
> indicator (busy cursor, or better, an indicator on the status bar (which
> normally just says "Ready")) letting one know when things are being worked
> on in the background.  When looking at live data, this indicator should
> pulse as new data arrives (and is processed).

  We agree.  It's part of our "TODO" list.

Comment 2 Andrew Walker 2004-08-26 01:12:19 UTC
*** Bug 88078 has been marked as a duplicate of this bug. ***
Comment 3 Andrew Walker 2004-08-31 20:08:43 UTC
We now have the ability to display status messages and a progress indicator to denote that Kst is busy. Just need to call it in the appropriate places.
Comment 4 Netterfield 2004-10-19 18:42:37 UTC
Are there race condition issues here?  are they repairable? Can we just use the existing hooks, or is this un-fixable in the near term...
Comment 5 Andrew Walker 2004-10-25 20:30:54 UTC
Kst now has an "I'm busy" indicator.
Bug 91693 has some examples of where it should be used.
Comment 6 George Staikos 2004-10-25 20:43:00 UTC
Why aren't you reading the comments?  The existing solution is broken.
Comment 7 Andrew Walker 2004-10-25 21:19:07 UTC
Could you explain which comments you are talking about? 
The ones from Barth, which ask if there are problems, and which received no response?
What is broken about the existing solution?
Comment 8 George Staikos 2004-10-26 02:42:42 UTC
Re: [Kst] kdeextragear-2/kst/kst


From: George Staikos <staikos@kde.org>
To: kst@kde.org
Date: 08/11/04 15:38
On Wednesday 11 August 2004 14:50, Andrew Walker wrote:
> CVS commit by arwalker:
>
> Added a progress bar and progress string indicator to the status bar.
> Use the aforementioned to display the progress of the data wizard.

  This is exactly why we shouldn't include this code in CVS yet.  
processEvents() is going to cause us huge nightmares because we will receive 
update events from the threads, among other things.  I spent lots of time 
removing these because of the crashes and bugs they introduced in the past.

+void KstApp::slotUpdateProgress(int iTotal, int iStep, const QString &msg) {
+  if (iStep > 0) {
+    if (!_progressBar->percentageVisible()) {
+      _progressBar->setPercentageVisible(true);
+    }
+    if (iTotal != _progressBar->totalSteps()) {
+      _progressBar->setTotalSteps(iTotal);
+    }
+    _progressMsg->setText(QString::null);
+    _progressBar->setProgress(iStep);
+    _progressMsg->setText(msg);
+  } else {
+    _progressBar->setPercentageVisible(false);
+    _progressMsg->setText(msg);
+    _progressBar->reset();
+  }
+
+  while (kapp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput));
+}
+
+
Comment 9 Netterfield 2004-10-26 03:00:21 UTC
Lets see if I can get the story correct:

At the end of [Data Wizard] we start doing something slow, which we keep track 
of with the progress bar.

The progress bar calls exec() on each progress bar update, which processes 
events.

The loading is slow.  While the loading is going on, the user does something 
(eg, deletes a vector which is being loaded, but which has not yet been made 
into a curve).  

Since exec() is being called, the event gets processed, which puts us into an 
inconsistent state.  BadThings(tm) happen.

Is this possible?  Is this what was causing trouble?

Comment 10 Andrew Walker 2004-10-26 04:39:41 UTC
All well and good. But the code snippet that George included is out of date and does not have a call processEvents() any longer, and hasn't for some time. The necessity for this call was removed by my addition of KstQuickProgressBar.

I'm not sure what Barth means when he refers to a call to exec.

So, do we still have a problem?
Comment 11 George Staikos 2004-10-26 04:58:09 UTC
Ah great, it was changed while I was away and I never received a response to that email so I had no idea.  Looks fine to me now.  What remains is to remove the other two progress dialogs and their event processing which is equally dangerous though perhaps less likely to cause a crash since they are for much shorter operations than, ex, the data wizard.
Comment 12 Andrew Walker 2004-10-26 05:02:40 UTC
So can this bug be closed now and any remaining changes moved to bug #91693?