16 ms·
If you move your mouse continually the query may not fail. Do not stop moving
- croisillon 13y agoAnybody remembers the same used to happen with youtube? Sometimes you had to keep moving the pointer in order to load the video correctly...
- stormbrew 13y agoI wonder if this is just feel-good nonsense for the user or if it's actually because moving the mouse causes the message loop to pump and thus prevents something or other from timing out...
- lampe3 13y agoMethod4: just turn off the screensaver/standby?
- delinka 13y agoSeems it's more about incorrect implementation of an event loop rather than a change in active processes. I assume the purpose of the screensaver is to save the screen, not to sleep other processes when it is activated. I further assume that hardware interrupts and event creation are the things happening while moving the mouse continuously. Based on these assumptions, I'm almost certain the screensaver isn't the problem.
- buremba 13y agonice way to say "it's not a bug, it's a feature".
- zbowling 13y agoI 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 a WM event and keep the child windows loop on the other thread spinning. My WM_TIMER on the child window was stuck as well. It happened to me because I had a hidden window on the background thread to get WM events for USB disconnect and reconnect messages from the system. The bug report was funny. "Connecting USB data collection probe doesn't work unless the user moves the mouse after connecting." and the follow up bug "Data collection only works when moving the mouse."
- asveikau 13y agoThe 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 actually work? Wouldn't you see the messages on the original thread's pump too? I thought the way it worked is each thread with ui objects has a queue, and SendMessage et al. will insert into the owning thread's queue. It took me a while to parse what you are saying, did you pass the hwnd into GetMessage from the other thread and that somehow convinced it to peek at another thread's queue?
- zbowling 13y agoPumping from the wrong thread is undefined behavior and it results in the bug above. It's a fairly common bug.
- pea 13y agoCOM 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/implementing-imessagefilter-in-an-office-add-in.aspx?Redirected=true 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.
- overgard 13y agoAs 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.
- deleted 13y ago[deleted]
- LinaLauneBaer 13y agoThis reminds me a bit of how networking works on OS X and iOS (at least if you are using the "standard APIs" the way they are supposed to be used: The networking that is going on is tied to a runloop. Some apps tie the networking stuff to the main run loop. You can see which apps do that by simply opening a context menu in the app somewhere or open a regular menu from the app's main menu. The run loops will be "halted" for as long the menu is open and thus your networking will stop. As soon you dismiss the menu the networking will continue. At first this may seem totally bullshitty: Imagine a download manager. Do you really want the download to pause every time you open a context menu? Well it turns out it is not such a bad idea in many cases: What if the context menu allows you to cancel the download? If the download were to go on in the background you would have to explicitly take care of that. If you tie the networking callbacks to your main runloop this simply can't happen. Of course there are also a lot of use cases where you want your networking code to not have anything to do with your main runloop...
- zbowling 13y agoThis isn't really correct. Runloops have modes. Often networking happens in a mode that is not restricted (see NSRunLoopCommonModes here https://developer.apple.com/library/ios/documentation/cocoa/reference/foundation/Classes/NSRunLoop_Class/Reference/Reference.html https://developer.apple.com/library/ios/documentation/cocoa/... ). If you are running your network code in default mode on the main thread (problematic doing that and it's probably better to use async methods these days) then yes that can happen but it's usually programmer error. On Mac, entering a modal window will usually put the runloop in a context that regular events won't fire and only those that mater to the modal window will fire. Commons mode almost always fires though. I work on Apportable (YC2011) and we have reimplemented CFRunLoop/NSRunLoop down to the bare metal. A lot of misconceptions on how it works we find.
- LinaLauneBaer 13y agoThanks for the clarification. I am aware of what you mention in your answer. In my statement I simplified quite a bit. I know that runloops have different modes. What I was saying is that if you just use the "defaults" then you will see the phenomenon that I described. And I don't think that it is a programmer error if you use the defaults... but sure: These days you would probably just use a framework or take care of these details... May I know why you have reimplemented CFRunLoop?
- tszming 13y ago>> This problem has been reported when querying an ORACLE 7.3 data source by using the following ODBC drivers. Sqo32_73.dll is manufactured by Oracle Corporation. Microsoft makes no warranty, implied or otherwise, regarding this product's performance or reliability. Maybe not the fault of Microsoft?
- foobarian 13y agoI'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 :-)
- weland 13y agoThis was a major culture clash for me when I ended up working at a company that mainly sells Windows software. I do my best to stay objective about it and not jump to the conclusion that it's incredibly broken because of its hairiness.
- Joeri 13y agoMicrosoft agrees that it's broken, which is why they're trying to get rid of the windows desktop and its legacy API's.
- asveikau 13y agoI think you are jumping to too many conclusions here, or maybe just not being precise about what "it" refers to. It may surprise you that it will still be possible to write poorly coupled code and create bugs with the WinRT APIs.
- vidarh 13y agoIt's possible to do that for any system. My distaste for Microsoft is deep, but the ability to write crappy software does not say anything about Windows itself.
- stefan_kendall 13y agoWhen I was a kid, Windows ME would hang on startup unless I kept moving the mouse. My friend's dad, a Math/CS teacher, did not believe me until I showed him.
- 11thEarlOfMar 13y agoMicrosoft and mice seem to have an odd relationship. The first versions of Windows NT would crash if you moved the mouse while shutting down. Like a child throwing a tantrum because it's bed time...
- RexRollman 13y agoI ran NT 3.1 and I don't remember that at all. Of course, I also don't know if I ever tried to move the mouse while shutting down.
- olgeni 13y agoSome version of OS/2 used to crash at boot if you randomly pressed a few keys...
- Freestyler_3 13y agoHow does this work? What makes mouse movement relevant to this... this is computers, not magic.
- resonator 13y agoIt's probably running out of entropy. If windows is anything like Linux, it will use certain random events like mouse movements, keystrokes, boot time etc. to generate randomness.
- finnw 13y agoProbably not in this case. Windows' RNG does not block when it runs low on entropy. AFAIK only Linux does that. And the task is a database query so probably does not use the RNG. But yes, I have seen a similar case involving linux /dev/random - the user reported that outgoing emails were sometimes delayed for hours and that moving a mouse over a VNC window would sometimes speed it up. I did not believe that at first, but it was exim4 running out of entropy when generating TLS session keys. Worse, it was on a VPS with about 20 exim4 processes competing for the entropy.
- InclinedPlane 13y agoOther folks have answered. I'll try to summarize: It's an impedance mismatch, you have a long-running background operation (sql query) that is running within the context of an event driven system (a windowing GUI). In this case the problem is that the sub-system that runs the query will only receive cycles when the main thread for the app fires mouse events. This is due to poor application design, of course, though not necessarily to the extent that it may seem, sometimes this sort of thing can be a harder problem than it may seem.
- Shog9 13y agoThe exact cause would be a question for (old, probably retired) members of the Excel team at MS, but bugs like this were fairly common when working with Windows apps that mixed interprocess communication with UI updates. Raymond Chen has a great example of a similar bug here: http://blogs.msdn.com/b/oldnewthing/archive/2005/02/17/375307.aspx http://blogs.msdn.com/b/oldnewthing/archive/2005/02/17/37530...
- LeIrony 13y agoBug ridden horde of elephants...
- hrish2006 13y agoWth?!
- harel 13y agoThis made me laugh out loud in the old school sense of this phrase.
- igravious 13y ago"in the old school sense of this phrase" You mean it made you actually laugh out loud?
- harel 13y agoYou 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....
- ck2 13y agoCan you imagine how crazy you'd think the customer was if you were giving technical support and they insisted they had to do this?
- lawtguy 13y agoI 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 http://en.wikipedia.org/wiki/Apple_III#Design_flaws
- cases 13y agoOr baking your laser printer in the oven: http://h30434.www3.hp.com/t5/Other-Printing-Questions/Has-HP-solved-the-P2015-formatter-problem/td-p/124711 http://h30434.www3.hp.com/t5/Other-Printing-Questions/Has-HP...
- TeMPOraL 13y agoReflowing stuff in an baking oven seems to be an increasingly common method of fixing electronics. Hell, my friend reflowed an RF dongle for TI Chronos watch with a heat gun the other day.
- BlackDeath3 13y agoXbox 360 towel trick, anybody?
- aplummer 13y agoAnecdotally, 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...
- sebastianconcpt 13y agoThe 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?
- kamimeow 13y agoAnd if you do not have a mouse ? :D
- Sanddancer 13y agoJust a wild guess given a post describing why the problem happens, but this being windows 95, you use the alt key to bring up the window management drop down, choose move, and just move around the modal window with the keys. You cause the window refresh event to fire, and the conflicting threads continue to fire properly.
- gionn 13y agoI clearly remember old times with Windows 98/ME, where if you keep moving mouse, long-running operations like directory coping would be faster, thanks to CPU power savings not kicking-in.
- frik 13y agoTrue, but back then there was no "CPU power saving" mode. The CPU was slow and it always run at full speed (power was cheap back then). In the Windows NT series (4, 2000, XP, etc.) the sheduler gives the forground application an higher priority. It runs a longer CPU time than all other applications. This was probably also similar with Win 3 and 9x series but probably with many hacks and glue code on top of DOS. Moving the mouse also prevented the screensaver, an application that would "save" the screen by drawing fancy graphics to prevent static phosphore burns on CRT monitor and slowed down the system
- cnvogel 13y agoNot completely true, there was some kind of power saving starting in those days: If I remember correctly, one of the first moves towards power-saving in the stock-OS was Win 95/98/ME (one of those) to start using the HLT instruction (stop processor up to next interrupt) in the main OS, was a busy loop until then. Notebook manufacturers (I worked with machines from Toshiba and Compaq in the 90s...) provided DOS TSRs and windows applications and drivers to control the CPU speed and display brightness.
- sheng 13y agothat's the reason why win9x in emulators like qemu and vbox will cause those emulators to eat up the entire CPU.
- ialex 13y agoIt still happens, i have seen here in Mexico in the Gov Agency that collects taxes when they send something to print/export pdf's they keep moving the mouse or their progress bar doesn't move at all. But they made this natural i think it is part of the training they receive, maybe some devs there tough it was the only way to get the rid of that bug, JUST KEEP MOVING THE MOUSE!. Agency url: http://www.sat.gob.mx/sitio_internet/home.asp http://www.sat.gob.mx/sitio_internet/home.asp
- umanwizard 13y agoSounds like they do their long-running process in the event loop. It's an easy mistake to make for someone writing a Windows app for the first time.
- danso 13y agoSo back in the early-mid 90 days of terminals and 24.4K baud modems...I would FTP into a university server to download game demos...and in many cases, in order to get the progressbar moving beyond a slow crawl, I would have to move the mouse around (this was on Windows 95 or something similar)...and the faster I moved it, the faster the download seemed to go. Looking back, I think of it as one of those times when I was just dumb and didn't know how computers worked. But maybe it really was mouse powered...
- heyIdidthat 13y agoIt may look weird or stupid, but it makes sense to publish it because it actually works. I don't know what causes this kind of issue but I remember using this workaround at times since windows 95. It somehow prevented freezes of either application or windows from happening. On the other hand, jiggling the mouse around can also trigger the adverse effect of crashing some other apps under others conditions such as loading screen during games.
- undoware 13y agoMy pet theory about Microsoft is that worse-is-better provides an overwhelming first-mover advantage, and an even more overwhelming second-mover advantage in the longer term (provided the first mover followed the WiB strategy.) I call this 'technical living-beyond-your-means' (rhymes with 'technical debt'). The flame that burns twice as high burns half as long, yada yada. Eventually, you will be kicking yourself for not having made it right the first time. The corollary is that eventually we will all be running Plan 9, so there are probably other factors at play as well, which I will quietly brush under the carpet, like air friction in a high school physics question. ;)
- brianmcdonough 13y agoI have spent the past two years learning this lesson. It's so much more work to maintain a project that was not put together correctly in the beginning.
- PythonicAlpha 13y agoNothing new for Microsoft: There is a reason, they had to drop Office 95 and completely re-implemented it. I guess, the day will come, that the current implementation must be abandoned too. The trouble with today's computing is: Just to much complexity around (starting from the OS, and that is also valid for Linux, I must say!) and to few really good programmers that make things better (and not worse). I see also in the Linux world to much complexity and to few real professionals. Real professionals don't try to handle complexity -- they try to minimize it!
- jamon51 13y agoThe issue with simplicity is that computing is a complex problem. It's all well and good to say "Just keep it simple!" It's another to implement that. I built and maintain a fairly popular RubyMotion library. It's goal is pretty simple: DSL out the ViewController hierarchy management and make it manageable for the application developer. Every bit of code I add to what is now a fairly mature and full featured system pains me. But every bit of code addresses some edge case that we didn't think of, but which is quite valid. An OS (like Linux, Unix, Windows) has orders of magnitude more issues to deal with than I do. In order to keep the system simple for users, they often have to add complexity to their code. Simple for users just isn't the same as simple under the hood.
- PythonicAlpha 13y ago>Simple for users just isn't the same as simple under the hood. Right, and exactly that is the reason, why we are in desperate need for really professional computer scientists (or programmers, how you want to name it). But the trend is the other way around. Everybody is searching for the quick solution and the cheapest programmers, or hackers (I even see many job offers that go in the direction hacker rather than professionals). It takes a real professional to cope with the complexity and reduce it to the minimal value. But in our current trend, we will thinks getting worse and worse, because we have far to much coding and far to less professionals (and even they can't afford to make a clean job oftentimes).
- kyberias 13y agoThis is a 11 year old knowledge base article for a bug in a product (Excel 97) that saw the light in 1997, that is 17 years ago. Yes, the second workaround is kind of hilarious, but let's not draw too many far-fetching conclusions from it. I believe many of us have seen crazier bugs.
- PythonicAlpha 13y ago>I believe many of us have seen crazier bugs. Might be, but is it a good sign for computer industry as a whole?
- TeMPOraL 13y agoIt's a sign we're having trouble in handling the complexity of our computer systems. Programming is mostly human-mind-bound now (and has been for many years); we need better tools and better abstractions.
- clarry 13y agoI think we need to remove that complexity and find a simpler approach to things, not just "better" (more complex) tools to layer even more complexity on top of complex.
- PythonicAlpha 13y agoI also would recommend that approach! The problem is, that you need more professional and better programmers that are aware of the problem and do reduce the complexity. Many self indulgent programmers, that think they are smart, won't. But the trend is more to hire more and more novice programmers (because they are cheaper) ... so we get more into trouble in the future!
- userbinator 13y agoAgree completely. I think that contemporary CS education is really responsible for this "more complexity is better" mentality, by encouraging overly general and abstracted solutions, and that abstraction should really be applied only when it's necessary and not as a "just because we can" thing. Aspiring programmers could learn a lot from the demoscene, where astonishingly impressive things are done with very little code and complexity.
- elwell 13y agoOh, so this actually works? How wrong I was all those times I scoffed at people moving their mouse around while waiting for a program. On a related note: isn't it interesting how this meme (mostly a placebo) traveled to the majority of computer users in a pre-internet age?
- frik 13y agoExcel codebase is very old, most is still in recent versions. Excel 2010 still relies on WinAPI's Fibers [1] (lightweight threads). In recent years the idea got popular again with Lua's co-routines and GO's goroutines. So it is manually scheduled by the application, instead of relying on the OS. In 2014, there is a lot of code in Excel that dates back to Excel 3 (1990). Excel 2010 still relied on the outdated MDI concept [2] that had been introduced with Win 3 and only one Excel instance/main window can run. One can embed the Excel OLE component in one app [3]. As soon as the component get the focus it replaces the traditional menu bar with the custom drawn "ribbon bar". It looks weird out of place (Win9x style OLE app with ribbon bar). Office apps started with custom drawn UI objects with Office 97. It had these fancy toolbars and a italic window title [4] instead of the boring Win95 look that WinAPI provided. [1] http://msdn.microsoft.com/en-us/library/windows/desktop/ms682661(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/ms68... ; http://msdn.microsoft.com/en-us/library/windows/desktop/ms682402(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/ms68... [2] http://en.wikipedia.org/wiki/Multiple_document_interface http://en.wikipedia.org/wiki/Multiple_document_interface [3] e.g. using the sample apps that come "Inside OLE 2nd" book. [4] http://www.cheresources.com/economics.shtml http://www.cheresources.com/economics.shtml
- aestra 13y agoA few years ago I had to look at two Excel spreadsheets fullscreen side by side each open in their own window (two monitor setup) and this was...not easy!!! I eventually found some hack online to open up multiple instances of Excel at once. Still was bizarre that is a simple use.
- corin_ 13y agoAgreed that it's dumb behaviour, but it's not exactly a complicated hack - just run excel again (from start menu, from win+R, etc.) and it creates a new instance.
- Someone 13y agoIIRC, older versions of Excel didn't work that way. The OP talks about "a few years ago", so it may have been with an older version that didn't work that way. I have never been able to remember how Excel and Word for Windows handle multiple windows, as it changed in subtle ways (can you alt-tab between Excel documents. Between Word ones? Do documents appear in the taskbar, or windows, or just Excel?) between versions, as Word and Excel within an Office version do not appear to behave 100% the same, and I as I tended to encounter different versions, for example when helping a friend, or when using RDP to a different server (yes, we had servers with Office installed, and we didn't even use them for COM controls) at work.
- Aaronneyer 13y agoWhen I was working in my college IT department, I had a computer come in once that was refusing to load things. I started up firefox and nothing was really moving, then I started moving the mouse around and all of a sudden it worked. I took a look at some other things and noticed even the system clock didn't move until I moved the mouse. Never did find out what the cause was, just reimaged it and called it a day.
- elliottcarlson 13y agoWhenever 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.
- logotype 13y agohehe, same here!
- mgbmtl 13y agoOn 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).
- topbanana 13y agoIf I see a wall of text, I highlight it as I read through it. People think that's really odd too!
- dreen 13y agoI do that all the time, even for small amounts of text, but only when using a mouse and not, say, a touchpad. I know other people who do it too.
- cben 13y agoSame here. I've always told myself that it helps my eye keep the position in the text. (Especially helpful I'm distracted and turn away from the screen.) But if I really belived that, I'd be doing it consciously, whereas I becoming aware that I'm doing it usually makes me stop... P.S. I'm also slightly(?) OCDish in preferring selections that are integer fractions of the paragrah length. E.g. in a paragraph of 6.3 lines I'll tend to select 2.1 lines at a time (not _that_ precisely of course).
- yial 13y agoI actually had a similar problem installing a copy of windows 2000 years ago - the only way to get the install to complete was to sit there moving the mouse.
- atmosx 13y agoI thought that was a joke... :-/ I don't if it's hilarious or just sad...
- joelhaasnoot 13y agoCoworker had this at a dayjob recently - it involved a full screen Windows Remote Desktop run from a Citrix Remote Desktop, on a bad day run from another remote desktop. If you didn't move the mouse enough: the connection did indeed fail. The connection took 4-5 minutes anyway, so quite annoying.
- runjake 13y agoAn aside of historical trivia: On an Amiga 1000, you used to be able to wiggle the mouse "too fast" and cause the machine to crash with its infamous "GURU MEDITATION ERROR"[1]. 1. http://simhq.com/forum/files/usergals/2013/02/full-4656-50913-amiga_guru_meditation_error.jpg http://simhq.com/forum/files/usergals/2013/02/full-4656-5091...
- gmjosack 13y agoI wrote an ncurses frontend to the the ticketing system used at a job one time. One of the users complained that if they resized their terminal window rapidly, larger and smaller, that is would crash. The fix was telling them to stop doing that. :)
- userbinator 13y agoI guess both of these were related to nested interrupts somehow?
- dmbortz 13y agoMany moons ago I had a dual Pentium Pro and had installed Slackware with one of the early linux kernels to include SMP. And, when clicking on a link in mozilla (or it might have been netscape back then), the new website would only be rendered after I jiggled the mouse. I just figured it was some race condition with the SMP kernel that got broken when the PS2 interrupt fired. It went away with some kernel upgrade, but I still jiggle the mouse every now and then in the hopes a page will render faster...
- amasad 13y agoHow random workarounds are reminds of a joke that made the rounds on the internet more than a decade ago: "If Cars Were Built Like Computers" and the best line is: > Occasionally for no reason whatsoever, you car would lock the door and refuse to let you in until you simultaneously lifted the door handle, turned the key, and grabbed hold of the radio antenna.
- maerF0x0 13y agolol! " it may take several minutes "
- dewiz 13y agoInternet Explorer (v2 or v3 I can't remember) suffered a similar bug, basically pages would load or load faster if you "gave more cpu" to the thread, by moving your mouse over the window. Noone ever believed me but now I feel a bit less crazy for thinking that worked.
- frik 13y agoI remember that too with IE 4 on Win95. IE has still the same UI mouse feeling of Spyglass Mosaic. IE 1 started with its source code and even after the major improvements of IE 3 it still feels very similar. (IE up to IE 6 mentioned "Spyglass source code" on the about dialog.) Even the print preview window of IE 11 looks like the same window in NCSA Mosaic 2 (1995) (I just downloaded and run on it on Win7)
- nn3 13y agoI don't really understand why people make fun of this. Would you rather they do not provide a workaround for the bug? And yes as every programmer should know, workarounds can be sometimes odd (I did similar things in the past to work around things). And yes of course providing a bug fix is better, but providing a workaround is always the first step. A workaround is plenty good enough for many people for whom updating is more risk and hassle. The whole thing reminds me a bit of the classic "known knowns" episode with Rummy where he dared to bring some decision theory into an interview answer ( http://en.wikipedia.org/wiki/There_are_known_knowns http://en.wikipedia.org/wiki/There_are_known_knowns ) The reaction to it really showed more about journalists than about the statement.
- ballard 13y agoiOS has a similar (some may say the opposite) problem, especially when setting up notification-based APIs and and app which expects a notification to happen within a certain period of time (ie a user needs their location now to complete an action, say a social post with location). Sleeping won't work, nor will waiting on another thread work because there has to be activity on the main thread for the main runloop to execute. What works is looping until timeout by sleeping for a few ms and then running the main thread's run loop explicitly. Gross but it works. Otherwise, the location notifications never arrive. Such is the downside of cooperative multitasking.