4 ms·
Elsewhere on this thread there is the suggestion that this could have to do with improper use of message pumps... Message pumps as a concept has equivalents in
by asveikau 13y ago
Elsewhere on this thread there is the suggestion that this could have to do with improper use of message pumps... Message pumps as a concept has equivalents in pretty much every UI framework I've looked at. (Some examples: run loops in Cocoa, g_main_loop in glib/Gtk+) If you violate the run loop's threading requirements it's not totally inconceivable that a mouse event could affect behavior.
I suggest it might be helpful to learn how the system works before you bash it.
- lisper 13y agoI am familiar with the design of message queues, though not specifically with the design of Windows message pumps. > If you violate the run loop's threading requirements it's not totally inconceivable that a mouse event could affect behavior. That's true. But the possibility remains that the design of Windows message queues is so byzantine and imposes so many arcane requirements on the developer that it is easy to miss something. In which case the question of fault is still arguable even if the immediate bug is in Oracle's code. I have a very hard time imagining any circumstances under which an OS could allow a mouse event to impact a database driver -- even if the database driver is buggy -- and still be considered well (or even reasonably) designed. But I'm certainly open to the possibility that I've overlooked something.
- lafar6502 13y agoYou overlooked the fact that programming model of windowed/GUI applications is quite complex and very sensitive to non-cooperative code - a thread that frequently blocks for 100 ms can cause very unpleasant hiccup. Introduction of OLE/COM interprocess communication mechanism made things worse as one unresponsive application could block other programs and halt their message loops. But it was quite efficient and you didn't have to spin up multiple threads to have multitasking in your application.
- lisper 13y ago> You overlooked the fact that programming model of windowed/GUI applications is quite complex and very sensitive to non-cooperative code - a thread that frequently blocks for 100 ms can cause very unpleasant hiccup. No, I didn't overlook this. But this is 2013. IMO, a multitasking architecture that is "sensitive to non-cooperative code" ought to be considered broken, and so if that's the cause of this problem, that still counts as Microsoft's fault in my book.
- nknighthb 13y agoIt's now 2014, actually, and you're talking about a problem from 1997, in an OS where backwards compatibility has been an extremely high priority since the 1980s.
- lisper 13y ago> It's now 2014, actually Is that really the kind of discussion you want this to be? > you're talking about a problem from 1997, The last revision of the article is 2002. But your point is well taken. I had assumed this was a current issue. (Maybe it is. I don't have time to dig into those details right now.) > in an OS where backwards compatibility has been an extremely high priority since the 1980s OS X was introduced in 2001, and it could run OS 9 applications, so these kinds of problems can be solved if a company decides it is worthwhile to solve them.
- nknighthb 13y ago> Is that really the kind of discussion you want this to be? Yes. If you're going to chastise people based on what year it is, you damn well better be right about what year it is. > OS X was introduced in 2001, and it could run OS 9 applications OS X booted a modified copy of OS 9 to accomplish that. It didn't fix anything about OS 9. It also wasn't present on Intel Macs, nor on Leopard, the last PowerPC-compatible version of OS X. Nor was it fully compatible -- I always had trouble with it, and have kept older System 7 and OS 9 Macs around rather than put up with it.
- asveikau 13y ago
- to3m 13y agoIt looks more to me that there's some problem with the background polling mechanism in the app, as implied by solution #1. Presumably something in the mouse event handler does something that prods the polling code into life, perhaps because something somewhere is trying to update the list of things on screen in order to handle hovering. Kind of hard to say without looking at the code, though... (The Windows message queue is actually fairly straightforward, and if you read the documentation then it's simpler still. The somewhat magical WM_PAINT message is a bit ugly, but aside from that it's actually quite difficult to get things massively wrong. Which is probably why this sort of freakish bug is rather rare.)
- lisper 13y agoThat sounds like a very plausible theory.
- userbinator 13y agoAs someone who has worked with Win32 for a long time, I think the problem is quite simple; in the message loop body someone put something like if(dataAvailable()) fetchData(); and assumed regular window messages to drive execution of this process. If you don't move the mouse or do anything else with the window, no messages are sent to it (unless a timer or something else does) and the message loop just waits for the next message, so that code doesn't get run. If you move the mouse around in the window a constant stream of WM_MOUSEMOVE will drive the loop. Polling really shouldn't be done in the main message loop; one way to fix this is to move to a completely event-driven system where dataAvailable() sends a message that causes the main loop to run fetchData().