Earlier quoted context omitted.
When I acquire a mutex inside my callback, it deadlocks. Microsoft wrote the calling function and the mutex implementation! Stupid Microsoft! Never mind that my callback violated the caller's threading model and that mutices introduce deadlocks when used incorrectly... They should fix the bug! Edit: I guess what I was trying to say is that this part needs a huge "citation needed": > was almost certainly built ... acc…
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…
If you move your mouse continually the query may not fail. Do not stop moving
81–90 of 168 posts
Re: If you move your mouse continually the query may not fail. Do not stop moving
#82Earlier 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.
My "first love" in OS's is AmigaOS, and while the OS is very dated in many ways (no memory protection, no SMP support), one of the things it really got right was to encourage extremely extensive multithreading. On Amiga's it was a necessity if you wanted to have full multitasking, as the machines were slow enough and memory constrained enough that not doing it would severely limit usability (frankly, it would have done PC's a world of good too, but the PC world took the simpler approach of not even trying for proper multi-tasking).
My favourite example is how cut and paste from the console worked.
It includes the device handlers handling keyboard and mouse input, the intuition input handler, which processes the raw input events and turns them into input events for specific windows, the console.device device handler which takes intuition events for console windows and "cooks" the events into higher level events that gets passed to the console-handler, which then will find the area you are selecting, and call a function that passes the buffer to the clipboard.device, which will then create a clipboard entry that gets written to a disk volume, which involves the filesystem handler for that filesystem, which again likely will involve a device suck as ram.device or trackdisk.device to write it to the actual device.
Every single one of these steps is handled by a separate thread/process (the distinction doesn't mean much on AmigaOS due to the lack of memory protection, and are usually referred to as "task" instead).
The reason for this is all down to responsiveness: The input devices and things like trackdisk.device musc deal with hardware, and so must have priority. But if the rest of the flow was given high priority, the system would be sluggish, so the minimum amount of work is done, put into a message, tacked onto a queue, and things are off to a start.
At the opposite end, things like clipboard.device must not lock up when clipboard entries are added, as while the clipboards are usually in RAM:, they are files on a filesystem, and a user with only 512KB RAM and possibly no harddrive might in fact be using a floppy drive for the clipboard - forcing the user to wait for a floppy write would have been intolerable (and why Amiga users loved to mock Windows 3.x users back in the day).
This permeated through many applications as well. It was a matter of pride for many developers, and the first chapters in many Amiga developer books tended to involve Exec (Amiga's "kernel", or parts of it) which provided a set of library functions for managing messages, lists of messages and message ports, as they were essential for talking to the OS, but also readily available for application developers. For many, before you'd written your first "hello world" app you had gotten a crash course in making things asynchronous by default.
Today a day go by for me without either my browser freezing, or Thunderbird freezing or some other application, both on Linux at home and OS X at work. And on the few occasions I've had to work on Windows machines, there too. Every time it happens, I dream wistfully about a world where people understood how to write software that way.
It is, in fact, not all that hard: "All it takes" is to subdivide your application into smaller components that only communicate using async message queues. Incidentally it makes the apps easier to test too, and easier to make robust (unlike under AmigaOS, on a modern OS you can separate components on process boundaries where it makes sense too, and automatically restart failed components), and it makes it easy to make them scriptable etc.
Re: If you move your mouse continually the query may not fail. Do not stop moving
#831. http://simhq.com/forum/files/usergals/2013/02/full-4656-5091...
Re: If you move your mouse continually the query may not fail. Do not stop moving
#84Earlier quoted context omitted.
Microsoft agrees that it's broken, which is why they're trying to get rid of the windows desktop and its legacy API's.
I 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.
Re: If you move your mouse continually the query may not fail. Do not stop moving
#85An 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-5091...
The fix was telling them to stop doing that. :)
Re: If you move your mouse continually the query may not fail. Do not stop moving
#86This 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 "halte…
MacOS had non-preemptive multitasking, what meant that a progam would only have a chance to transfer data once all other programs released the CPU. The default develoment suite also had several loops were it wouldn't release the CPU, there are some stories around about MacOS servers that stopped serving content because somebody left forcus on the wrong element, or left the mouse on a menu on some application. But bot…
That's not the OS's fault; that's "just" bad programmers, and just as trivial to do wrong on Linux or any other OS.
Re: If you move your mouse continually the query may not fail. Do not stop moving
#87Whenever 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.
Re: If you move your mouse continually the query may not fail. Do not stop moving
#88Can you imagine how crazy you'd think the customer was if you were giving technical support and they insisted they had to do this?
Re: If you move your mouse continually the query may not fail. Do not stop moving
#89Earlier 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.
Historically, it was even worse: all desk accessories on Mac OS where running as load able drivers (http://www.folklore.org/StoryView.py?story=Desk_Ornaments.tx.... Aside: that article shows that Jobs did actually design a GUI, that for the calculator. More info at http://www.folklore.org/StoryView.py?project=Macintosh&story...)
I think windows wasn't much different. There is/was an article about the mess that Microsoft's build system for Windows was that explains how they spent lots of effort fixing layer violations in order to improve build times (they used to have full builds only novice every few months. That meant that incompatibilities between, say, an improved menu system and the latest version of the Explorer would take months to surface). Anybody remember that?
Re: If you move your mouse continually the query may not fail. Do not stop moving
#90This 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.