Re: Application runs slowly, crashes when wiggling the mouse quickly



I just thought of something else.  I'm using asynchronous IO, which means
that data coming into my serial port (caught via a kernel signal) can
interrupt the gui and call some other code, which in turn tells the GUI to
update various parts of it.  Is it possible that I'm interrupting the GUI
from doing something important, and when I try to make changes I'm
breaking things?  If so, how would I avoid this?

I'm writing an application that makes fairly heavy use of the serial port.
 While testing this app, things seem to be running fine, until I wiggle
the mouse quickly over a treeview (a list) or over a few checkboxes in the
window.  Sometimes I have to wiggle for a minute, sometimes just 5 seconds
will do, but the app crashes, with either a segfault, or GLib reporting a
corrupted doubly linked list.

Some thoughts:
1.  Wiggling the mouse anywhere besides over the treeview or the
checkboxes causes no problems.

2.  Processor usage goes up significantly when wiggling the mouse over the
treeview or the checkboxes.

3.  The problem can be completely avoided by making the offending widgets
non-sensitive (dimmed out).

4.  I'm running on an old computer, a Celeron, at around 400Mhz or so :(

Could number 4 be the culprit?  Perhaps wiggling the mouse over some
widgets (and thus causing GTK to redraw them, presumably) slows down the
system so much (70% processor usage at the time of death sometimes) that
some routines or signals interrupt themselves and do something naughty?

When I modify the program (skipping key routines) to drastically lower the
processor usage, the problem goes away.

I would like to chalk this up to a weak computer... but it seems unlikely
to me that GTK simply blows up on old computers (with very busy apps).

For reference:
  400 Mhz Celeron
  128 Megs ram
  Debian Linux
  GTK 2.6

Any advice is appreciated!






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]