[XForms] mouse wheel in browser crashes whole app
jac4 at mindless.com
Mon Mar 14 00:16:20 EST 2005
> It well might be a code bug. As I said before, the crashes are random
> and my guess to link them to the number of lines in the browser and/or
> the speed of rotating the mice wheel may be wrong. Unfortunately it is a
> kind of "production" application, controlling real hardware, so I cannot
> make too many experiments.
> "A lot of lines" may be several thousand. The browser gets the messages
> from the telescope control system, I would estimate this to 1600-1800
> lines per night and the program can run several weeks if everything is
> going fine.
Not related to XForms, but here's a design hint: If your application crashes, and that's really bad, write another program that constantly watches your application to see if it crashes, and restarts it if it does. For example, a program that fork+exec's your program, then waitpid's for it to terminate. I also write software to control/automate a lot of hardware stuff, and I speak from many unpleasant experiences. ;( Not much worse than coming back to work on Monday only to find your software crashed sometime Saturday morning.
Alternatively, if you don't trust your toolkit, I might also recommend taking more of a client/server approach where your "server" is always controlling/logging telescope data and your "client" is a separate process that is just a GUI that you can monitor the server with. That way, if XForms hiccups, the GUI will crash but you won't lose any data/control.
Anyways I made a browser with 30000 lines in it just for grins and moved the wheel up and down for about 5 whole minutes with no problems, I'd look into other areas to find the problem. Disabling the mouse wheel may solve one of the symptoms but if it's a weird bug then you don't know what other problems may be going on behind the scenes.
Well, good luck with your application. Sounds interesting. :)
More information about the Xforms