Live data from Hacker News

If you move your mouse continually the query may not fail. Do not stop moving

support.microsoft.com

91–100 of 168 posts

Re: If you move your mouse continually the query may not fail. Do not stop moving

#91
post #81
post #69

Earlier quoted context omitted.

When was the last time you saw a mutext deadlock that could be worked around by moving the mouse? You're right that this discussion is light on details, but there is one relevant detail from which reasonable conclusions can be drawn: there is a workaround that involves moving the mouse around continuously. I can't think of any plausible scenario that could produce that behavior that does not involve some blatantly ho…

It seems clear that the window message pump was being used by the Oracle driver in a way that made it break when hosted in a GUI application. Message pumps are not atypical of event-driven GUIs on many different platforms, and problems with multithreading abound everywhere shared memory is the default. IMO it's a big stretch to try and blame MS for this.

> It seems clear that the window message pump was being used by the Oracle driver in a way that made it break when hosted in a GUI application.

It's not clear to me, but maybe you know something I don't. What is it exactly that makes this clear? And what is the "way" in which the message pump is being used that makes it break in a GUI app?

Re: If you move your mouse continually the query may not fail. Do not stop moving

#92
post #69

Earlier quoted context omitted.

When was the last time you saw a mutext deadlock that could be worked around by moving the mouse? You're right that this discussion is light on details, but there is one relevant detail from which reasonable conclusions can be drawn: there is a workaround that involves moving the mouse around continuously. I can't think of any plausible scenario that could produce that behavior that does not involve some blatantly ho…

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 hel…

I 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.

Re: If you move your mouse continually the query may not fail. Do not stop moving

#93
post #21

Can you imagine how crazy you'd think the customer was if you were giving technical support and they insisted they had to do this?

Anecdotally, I find customers are fine with (enjoy?) any physical / mechanical solution to a computer problem. It's in usually putting them back in their comfort zone. Wiggling the mouse is easier to explain than control panel anyway...

Re: If you move your mouse continually the query may not fail. Do not stop moving

#94
post #19

This made me laugh out loud in the old school sense of this phrase.

"in the old school sense of this phrase" You mean it made you actually laugh out loud?

You bet. A loud laughing noise came out of my vocal cords. I felt like I'm in IRC in the early 90s. Remember that feeling? Laughing, out loud? Feels great. Kids today with their loling will never know....

Re: If you move your mouse continually the query may not fail. Do not stop moving

#95
post #5

I had this bug once about 10ish years ago when I was still a windows dev. Creating a 2nd window on a thread with a window already but then pumping it's main loop on a background thread can cause this. If you do that the loops get hooked to each other regardless of the thread pumping it. The child window has to wait until the parent window forwards the event for the second thread to pop it off. A mouse move will send…

The rule of thumb as I always heard it is that a window is "owned" by the thread that created it. You can send and post messages from a different thread, but do much else and you're asking for trouble. (And Send instead of Post is often problematic since it will block until the target thread processes it.) Draining the message queue from a thread that doesn't own it makes absolutely no sense to me ... Does that actua…

COM hates MTA threading, most of the Office object model actually insists on STA single-threads sitting in the main UI thread to even work (i.e. you cannot use BackgroundWorker() )! Some guy @ MS even released this byzantine code to deal with the situation (http://blogs.msdn.com/b/andreww/archive/2008/11/19/implement...) which unfortunately doesn't work. It's completely nuts how bad the object model is.

Re: If you move your mouse continually the query may not fail. Do not stop moving

#96

Earlier quoted context omitted.

I'm always fascinated by how tightly bound various software is with UI code in Windows. It's the equivalent of random shell scripts having Xlib or Gnome dependencies just to show a progress meter. I guess if it's an event loop thing one could also alternate 'z' and 'x' as fast as possible :-)

In your experience, is OSX or Linux graphical software any better? Genuinely curious. I feel like interface freezes happen on all major platforms, and always assumed it had more to do with the applications than with the platforms. I mean, writing interfaces that never block is a lot more work. But I don't have a lot of cross-platform experience to know if some platforms make it easier than others.

Not in my experience. I use IntelliJ IDEA (and previously used Eclipse) on OS X and Linux on a daily basis.

Anytime they start indexing or re-indexing a huge code base in a "background" thread, they end up locking the machine to varying extents. Linux is not as bad, as it only tends to lock up instances of the offending application... But that maybe because the Linux PC is a beefy workstation. OS X is on a much less powerful MacBook Pro, and freezes tend to lock up the whole system, or at least most of the other apps, especially Chrome.

I've also had problems with Chrome, and especially Flash, on OS X. Spinning beachballs on every page load. Click-to-flash was such a lifesaver, but I can now sorta see why Steve Jobs wanted Flash dead.

The spinning beachball has grown to be a frequent source of rage for me over the last 5 years. I'm surprised nobody else complains about it more. Maybe it only happens for heavy Java GUI-based apps?

Re: If you move your mouse continually the query may not fail. Do not stop moving

#97
post #88
post #21

Can you imagine how crazy you'd think the customer was if you were giving technical support and they insisted they had to do this?

I don't think it's as crazy as telling them to pick their computer up and drop it on the desk: http://en.wikipedia.org/wiki/Apple_III#Design_flaws

Or baking your laser printer in the oven: http://h30434.www3.hp.com/t5/Other-Printing-Questions/Has-HP...

Re: If you move your mouse continually the query may not fail. Do not stop moving

#98
post #95

Earlier quoted context omitted.

The rule of thumb as I always heard it is that a window is "owned" by the thread that created it. You can send and post messages from a different thread, but do much else and you're asking for trouble. (And Send instead of Post is often problematic since it will block until the target thread processes it.) Draining the message queue from a thread that doesn't own it makes absolutely no sense to me ... Does that actua…

COM hates MTA threading, most of the Office object model actually insists on STA single-threads sitting in the main UI thread to even work (i.e. you cannot use BackgroundWorker() )! Some guy @ MS even released this byzantine code to deal with the situation ( http://blogs.msdn.com/b/andreww/archive/2008/11/19/implement... ) which unfortunately doesn't work. It's completely nuts how bad the object model is.

As much as I make fun of java developers for over complicated solutions, I've never quite seen anything as over-engineered and byzantine as COM. I remember at my last job we had legacy COM objects that inherited from about 5-7 different templated objects, and that was... normal. COM is the worst.

I actually like windows as a user, but I'm amazed that it won as much developer mindshare as it did considering how much the win32 api sucks. It's brutal.

Re: If you move your mouse continually the query may not fail. Do not stop moving

#99
post #21

Can you imagine how crazy you'd think the customer was if you were giving technical support and they insisted they had to do this?

The customer? didn't you mean the developer?

The dumbest customer will guess that a "solution" like that from support can only come from a design that sucks.

If it were a refrigerator instead of a spreadsheet it would be like support telling you that you have to keep petting the door of your refrigerator to keep it cooling.

Who is the crazy there?

Re: If you move your mouse continually the query may not fail. Do not stop moving

#100

Whenever I am waiting for something to happen, I tend to move my mouse pointer around in circles on the screen - this always caught peoples attention and I've been asked plenty of times over the years if there was a reason for it. I always joked that it helped make things go faster by making the computer know I was still there and waiting - I guess I wasn't lying.

On my old 486 or first Pentium, when the computer would slow down and start trashing/swapping, the screensaver would enable itself while I waited... further crashing the computer. So moving the mouse did indeed make the computer faster ;)

Later I became lazy and just pressed the ctrl or shift key. I still do it when watching movies with mplayer or in something browser-based (that does not disable the screenlock automatically).

Post reply on HN