24 ms·
Docker for Windows won't run if Razer Synapse driver management tool is running
- PedroBatista 7y agoIt also has an hard time string if another Hyper-V VM is running.
- deleted 7y ago[deleted]
- Wolfspirit 7y agoThis has been fixed in 2018!!! Why is this here? https://github.com/docker/for-win/issues/1723 https://github.com/docker/for-win/issues/1723
- mwill 7y agoThe title should probably be changed but it's still an interesting twitter thread that has sparked interesting discussion here
- Arnavion 7y agoAmusingly, one of the linked issues from that one notes that a third piece of software made the same mistake - "Thunderbolt software by Intel" ( https://github.com/docker/for-win/issues/1301#issuecomment-369064471 https://github.com/docker/for-win/issues/1301#issuecomment-3... )
- Aardwolf 7y agoAnd that just for some colored LEDs and such. I don't understand why you need Windows-only software for that. Doesn't a hardware maker want to make it as simple as possible to use their hardware from any OS? I used to use a Razer mouse when it had a switch on the mouse itself to toggle between different speed settings. But I changed away from them when that switch disappeared in later iterations of their mice and instead depended on software that didn't work in Linux.
- leppr 7y agoThe new version of DeathAdder[1] reintroduced DPI adjustment buttons, and the LED settings persist even when set with the open-source Linux drivers. [1]: https://www.razer.com/gaming-mice/razer-deathadder-elite https://www.razer.com/gaming-mice/razer-deathadder-elite
- vivan 7y agoIt also has macroing functionality with profile switching. You could achieve the same with something like AHK but the Razer interface is easier for simple tasks.
- Causality1 7y agoRazer Synapse has been responsible for a variety of odd problems. Just myself I've had it mess with Bluetooth connectivity and screen autorotation.
- woozyolliew 7y agoA somewhat tounge-in-cheek comment: but I wonder if there could be a git/IDE extension to track cut-and-paste code like this (especially from stackoverflow) so that when things are corrected or flagged as broken at the source, that change is propagated to your use of it.
- wnevets 7y agoOn a related note I've found docker for windows so buggy at times.
- fernandotakai 7y agoi feel like it's better than docker for macos, but that's not a really high bar to clear tbf.
- MadWombat 7y agoI have been using Docker on OS X for a while, haven't had any major issues, but maybe my experience is atypical.
- mannykannot 7y agoEvery so often, someone will post that cheating in examinations is OK because the important thing is to get the answer from wherever. This shows why knowledge and understanding matter: that GetType() looks suspicious (the type of something rarely uniquely identifies it), even if you don't know much about the specific issue here.
- kakuri 7y agoRazer went from making great hardware and drivers to making terrible drivers that require you to sign in to a Razer account and constantly run Razer software. I was a Razer die-hard for years, but with their transition from a hardware company to a cloud-based user-data-mining company I avoid them. If you want good hardware with good drivers I highly recommend SteelSeries.
- m463 7y agoSteelseries drivers are phoning home more and more now... However - you can configure the mouse, then uninstall the drivers and the settings persist. So I continue to use steelseries.
- MadWombat 7y agoI am a somewhat active SO user and one thing I see other contributors repeating over and over is "stackoverflow is not a code writing service". Usually this comes up in the context of some kid posting their college assignment and asking people to solve it, but I think it should extend further. Do not copy/paste code from stackoverflow. SO is not a code writing service. It is a problem solving/question answering service. Any code you see in the answers should be takes as reference only. If you don't understand what the code does, re-read the answer, check the documentation, understand and then write your own code. What happened here is such a stupidly trivial bug. If someone only took a second glance at this code it would be blindingly obvious what is going on here. I saw it as soon as I looked at the SO code sample and I don't even write C#. Do people at Docker even do code reviews? Also, when I write answers in SO, I try (not 100% of the time, but I do try) to make my code generic, so it solves the problem the user is having, but does not include any specifics from the question. I suggest you all do the same. P.S. I know that this rant of mine is rather idealistic. Nobody is going to stop copy/pasting code and these things will keep happening. But writing this was therapeutic.
- deleted 7y ago[deleted]
- deleted 7y ago[deleted]
- Bedon292 7y agoSo with tools like Sonarqube we get static code analysis on our code base which shows code duplication within itself. I wonder if there is some way to look for duplication from stack overflow? Not sure that is feasible, since no one is going to want to post all of their proprietary code to some API, but wonder if there is some system for local indexing SO that would also for local duplication detection.
- jodrellblank 7y agoStackExchange data dumps are (at least, were[1]) freely downloadable: https://meta.stackexchange.com/questions/2677/database-schema-documentation-for-the-public-data-dump-and-sede https://meta.stackexchange.com/questions/2677/database-schem... [1] not sure what happens since they "illegally" retrospectively relicensed all the content a few months ago.
- Bedon292 7y agoYeah I thought they had something like that. Might be interesting to play with. I meant more of a question as to if anyone had actually done something like that with it. Basically a Turn It In kind of tool that universities use for plagiarism detection, but for code.
- nlowell 7y agoGlad to see no one here ever has bugs in their code!
- nonbirithm 7y agoThis is exactly the reason I can never understand how it is impossible for the community in SO to override the accepted answer. The argument goes that the accepted answer is the one that satisfies the asker's needs so it is always the one that gets placed higher up. But in practice things aren't so cut and dry. - The asker can misunderstand the response. - The asker can accept a response that for the general public's interpretation of the question is incorrect. It doesn't matter what the asker thought the question means to them if beyond their control their answer becomes the first result on Google years later for a problem that might not be exactly the same. - Technologies change and new libraries or language features can be added since the question was asked. I've counted several times where people bunch up below the accepted answer to say this is true, and 90% of the time it's the better answer for my use case. - The question is similar to another that is far more popular and happens to share the same SEO keywords but is completely unrelated, so another answer with 1,000 upvotes in comparison to the original answer's 100 is added. People have no choice but to put comments saying "this is the wrong answer if you're doing X, use the other one," because the comment section of the accepted answer is the highest up they can be seen. But the average user might not listen or see the smaller comment text and use the wrong answer, just because it was the accepted one. This is because a single person's decision on what "correct" means is valued more highly than the correctness of the more important answer which thousands more people actually support, and is more critical to support because of unintended search indexing. Sometimes SO questions become used for a purpose completely unrelated to the original questions and answers because of search engines. There should be some kind of acknowledgement of this instead of being unable to protect clueless people from themselves. This isn't to support editorialization of old answers in general, it's a problem of unintended consequences out of anyone's control because of what gets indexed as the first search result on Google. Nobody can change what's there if nobody but the original authors can edit the answer and they happen to not do so for whatever reason, so we'd be stuck being misled forever. And as we've seen people will copy and paste anything in the code box and not even read the description and caveats if there's a fat green checkmark next to it like a Pavlonian reflex. I'm guilty of this myself.
- jhanschoo 7y agoYou can still write your own answer and comment on the wrong answer. Users who are callous enough to ignore such comments get what their lack of due diligence deserves.
- knolax 7y agoThe author claims that this is the result of copy pasting from Stack Overflow but it could be due to auto-complete as well. GetType and GUID both start with 'G' after all. Since the snippet is so small the similarity of the rest of it could just be a coincidence.
- userbinator 7y agoI looked at the title, then briefly glanced over the discussion here, and guessed it correctly --- "same mutex name". I didn't guess they'd get to the same name that way, however. I thought someone had copy-pasted example code from SO without changing a REPLACE_MUTEX_NAME or similar. My preferred solution is simpler --- CreateMutex takes a mutex name of at most MAX_PATH characters. That's almost begging you to make it the path to the running executable. char name[MAX_PATH]; GetModuleFileName(0, name, sizeof(name)); I know some of you may be thinking "but what if there are two copies of the application in different directories?" Yes, that would result in two instances, but how often is that a problem? If it is, then make it the binary name-only without the path pname = strrchr(name,'\\'); and then unless you name your application something very generic like test.exe, there can only be one. I guess the lesson here is to not overthink things --- I see that often in SO answers too.
- _-___________-_ 7y agoIf you're going to copy-paste code from Stack Overflow and deploy it to millions of users' systems, I think you have some responsibility to understand what the code is doing. I can totally see how this happened, and I would definitely not say that I would never make this mistake, especially under time pressure etc. But a careful programmer would a) desire to understand what the code did, and thus spend enough time reading it to spot the `GetType()`, and b) test that the "prevent more than one instance from running" behaviour worked properly, which would involve both testing that you can't run two instances of the program, and testing that if you change the assembly identifier, you can run two instances.
- mdszy 7y agoHow many times have you run `npm install` or used literally any programming package management system without personally reading every line of code that you're installing?
- theamk 7y agoWell, if you are going to be passing something as your own work, you better understand it well. Also, you should look at least at the docs of the packages you install.. And since most SO answers are shorter that introductory section of most docs, this means reading and understanding entire answer.
- mdszy 7y ago>Also, you should look at least at the docs of the packages you install Brb reading the docs for every micro-package installed as a dependency for what I just installed that provides functionality that could've been hand written in five minutes. Gonna spend the next few months reading about a thousand package README's for this single package I installed and all its dependencies down the tree, be right back.
- falcolas 7y agoYou say that like it's not a good thing to do? If you pull a library into your project, you're taking responsibility for that library, for better and worse.
- noselasd 7y agoWhat am I looking for in the screenshot ?
- _-___________-_ 7y agoYou would sadly have to find your way through the Twitter "thread" to fully understand. Someone at Docker and someone at Razer both copy-pasted the same faulty code from Stack Overflow for preventing multiple instances of their program running at once. Unfortunately the code took the assembly identifier and called GetType() on it which returns the same value for all programs. The Stack Overflow answer was later fixed but since the programmers no doubt both felt they'd "solved" the problem, they didn't see the fixed answer.
- Arnt 7y agoWhich I suppose is an argument that pulling in eleventy thousand oneliners from npm is better than copying oneliners using the editor: At least you can run a batch upgrade without spending real brain cycles. I'm sure someone has written a thingy to upgrade npm dependencies, rerun tests, and bisect to tell you about the breaking upgrade if anything reaks. Left-pad, come back, all is forgiven.
- polymatter 7y agoNothing. The screenshot is meaningless. The story is in the twitter comments underneath. > Both programs want to ensure you only run one copy of themselves. So they create a global mutex using the GUID of their .NET assembly, right? > So what happens is that both of them are creating a global mutex to ensure only one copy runs, but instead of basing the GUID on their own code, they're both using the GUID of a part of .NET itself. > And they're using the same one! > Back in 2009, the user "Nathan" asked how to get the GUID of the running assembly. Twelve minutes later, "Cerebrus" answered. And that answer was wrong. > A year and a month later, it was pointed out (by "Yoopergeek") that it gives the wrong GUID. > Three years later, Cerebrus returns and fixes the answer. They can't delete it, because it was accepted > That flawed stackoverflow post is here: https://stackoverflow.com/questions/502303/how-do-i-programmatically-get-the-guid-of-an-application-in-net2-0/502323#502323 https://stackoverflow.com/questions/502303/how-do-i-programm...
- jordansmithnz 7y agoHa, stackoverflow is a great tool, but... the more answers I see on an area I’m experienced in, the more I realize how wrong they can be. Sure, the answer usually gets the job done, but everything else about it might not be right. If I need to use stackoverflow, these days I make sure I do a few things: - read a number of answers, comments included. Just because an answer is accepted doesn’t mean it’s the best one - read API docs for anything I’m unfamiliar with, and make sure I understand how the solution works - never copy paste; instead use the general idea or concept to rewrite a solution in a safe, future proof manner - if an answer works but doesn’t feel like the right solution, be prepared to do my own research to find a better approach Hopefully this results in a better engineered product, but one of the main benefits is learning and expanding knowledge of APIs/techniques.
- zamalek 7y ago> the more answers I see on an area I’m experienced in, the more I realize how wrong they can be The fastest correct looking answers on SO are usually the accepted answers. I read an post or tweet a few years back suggesting that you have the quickest draw if you want SO rep: create a bare-bones answer, with no research, so that it gets accepted. I understand why: my answers have been on the receiving end of this - I spent way too much time and effort answering and my answer dropped into obscurity. That's why I no longer answer on SO.
- megablast 7y agoYou must feel good that you have hours to fix things then. Unlike a large number of people here.
- theshrike79 7y agoThe most important step in my opinion is: Check the date of the question and answer. I've spent WAY too much time banging my head on the keyboard while trying to implement a solution posted 3-4 years ago, which doesn't apply in the slightest for the latest version of whatever I'm doing.
- kitd 7y ago- read a number of answers, comments included. Just because an answer is accepted doesn’t mean it’s the best one Agreed. I find that the "accepted" answer usually gets refined/improved/made more generic after acceptance. This usually means that the "best" solution over all similar problems is usually further down the list of answers.
- unnouinceput 7y agoWhen I need to ensure only one copy to run I never used GUID, I always used some combination of project name + my name + current date + customer name/business. This way is unique and with a personal touch. Also you can make it as long as you want up to MAX_PATH, not the short style that GUID does it.
- mapleoin 7y agoSounds like a natural primary key.
- kstenerud 7y ago> homework assignment for all programmers reading this thread: Think about how you'd find this bug in your own programs. You copy/paste the code, it seems to work, and you don't realize it's broken because you don't run either of these programs which made the same mistake. Wait... WHAT?? Who the hell copy pastes code into their program without first examining and understanding what each step is actually doing, how and why the pieces fit together as they do, and how it works as a whole to solve the problem?
- chrisoverzero 7y ago>Who the hell copy pastes code into their program without […] The developers of Docker for Windows and the Razor Synapse driver management tool. Among others.
- ghostpepper 7y agoHeh, I read your comment after I posted almost the same thing word for word.
- meddlepal 7y agoI used to work with a "senior developer" that was making well over 150K several years ago that basically just verbatim copy-pasted code off StackOverflow and hacked it together. He got shit done and that was what mattered to his bosses... of course it was all a steaming pile of unmaintainable garbage but that didn't matter to anyone. If he couldn't find it on Stackoverflow he would ask another developer who would tell him how to do it... then Mr Senior Developer would ask that other developer if he could just "send him the code". Last I heard he's still at that company and still making bank doing nothing but copying and pasting other people's work.
- bloopernova 7y agoI know a coworker whose cloudformation code I have had to fix multiple times because they've done just that. Googled "how to do $problem" then skimmed over the first result and copied the code from it. It's been raised with management, and nothing has been done about it.
- nih0 7y agoFor me overwatch wouln't start if razer synapse was installed.
- taspeotis 7y agoSome tangential analysis of Synapse over here: https://twitter.com/davkean/status/1144498663122558977 https://twitter.com/davkean/status/1144498663122558977.
- sitzkrieg 7y agowhen it forced you to login to use it a few months back, i immediately bought a zowie instead and highly recommend others to do the same
- viraptor 7y agoMouse./keyboard customisation software seems universally bad / lowest-bidder style. Logitech's mouse button configuration tool for example weights over 400MB. Literally for a tool which requires a few dropdowns.
- falcolas 7y agoI've somewhat ironically found that the performance of my VR rig improves the more keyboard/mouse drivers I shut down. The throughput required for the index controllers and headset is pretty high, and when combined with mouse and keyboard drivers some game frameworks can experience terrible stuttering.
- Eric_WVGG 7y agoYeah it's a little off-topic, but I wanted to note that for Mac users, there's this app called SteerMouse which is massively better than Razer or Logitech's offerings, works with practically everything, and doesn't have a "rad" nineties gamer-trash UI. http://www.plentycom.jp/en/steermouse/ http://www.plentycom.jp/en/steermouse/
- exikyut 7y agoOooh. What does it have in it? A home-made .NET-to-Java transpiler that requires custom builds of the CLR and JVM? The 300MB of random data at the end of the Windows XP install CD? An encrypted archive containing the set of folders comprising the entire source code history (the top level of which has an alarming number of entries named like "revert_v5_bug [Final] - ACTUAL CURRENT") (because some developer has OCD about backups)?
- exikyut 7y agoTo any Microsoft/.NET devs reading this: What do you think the chances are that you could make exact references to Assembly.GetExecutingAssembly().GetType().GUID return a compile-time warning? That could make this go away very quickly. (For bonus points, add relevant telemetry to VS. :P)
- turc1656 7y agoA lot of the comments on this topic seem to be focusing on SO's nature or something like what you proposed about .NET itself. When I first read the Twitter thread I was sort of dumbfounded that whoever did this originally didn't actually check it. That's not a SO or .NET problem that needs to be caught. It's a developer problem. If someone is copying code into their project that they've never seen before, they should, at bare minimum, make sure it produces the expected result for the first instance they are using it. That developer should have checked to see that the GUID was actually the one from their assembly. Even if someone is copying some complex code that they aren't 100% sure how it operates, they can still test it to make sure it produces what they think it does. The idea that someone working for Docker just copy, pasted, and then didn't check that it actually did what it was supposed to do is sort of mind-blowing to me. Not sure why no one else is talking about that. I've never used Docker before, but this doesn't instill confidence. It's one thing to have something like this in your end product - that's bad enough. It's another thing entirely when your company builds tools for other developers to use. That shit needs to be rock solid and this is one of those things that seriously worries me when I see it because it's about a lack of effort/testing and someone just blindly took code and didn't even bother to check it.
- exikyut 7y agoOn the one hand, I completely agree. I remember reading something about reasoning through a very simple (couple of divisions or something) math problem, where a deliberately (and later obviously) wrong working-out was initially defined, then corrected, to illustrate the importance of end-to-end understanding. On the other hand, a) Programming is equivalently complicated to "two-story-high whiteboard full of Greek letters and integration functions", but is never acknowledged by industry as such because of the associated responsibility nobody wants anything to do with b) We live in a world where entire industries - ML-based AI - are literally!! based on the idea of not understanding the structure of the solution to the problem.
- Kipters 7y agoThe worst part is that they solved it in the "edge" branch (the one you need to use docker on WSL2)... because they switched to Electron
- LeonM 7y agoI think it would be a great addition for StackOverflow to have a sort of report button for dangerous code. Take for example libcurl (thus, implementation in PHP, Ruby, Go, etc). There are sooo many posts with cURL example code where CURLOPT_SSL_VERIFYPEER is disabled. These are often answers with thousands of upvotes, that have been there for years. Inexperienced developers copy/paste this code into production without understanding what it does.
- rawfan 7y agoWhy not just edit the answer yourself and add a big red warning?
- Karunamon 7y agoBecause you don't get to do that unless you either have a ton of rep (which is a pain to acquire on SO because nobody votes), or the question is marked as a wiki. Otherwise your suggested edit goes into a queue where it will likely be declined as "conflicting with the author's intent" even if it's an unambiguous improvement.
- jodrellblank 7y agoThe two parts of your post ("some code samples have bad practises with known problems") and ("there should be a report button to fix it") don't seem to be connected. To whom would it report, and what would they be supposed to do about it? Say the answer was there without that option. Next comment "It didn't work, I get 'certificate verification failed' error", next comment "I had to use this option to get around that", next comment "thanks it worked".
- Wowfunhappy 7y agoWhat if the code is dangerous, but that's because it's only intended to conceptually answer the question? For example, part of writing safe code is adding an appropriate level of error handling, but this also dilutes it. If you're trying to understand a new concept, the code with lots of error handling will be harder to parse.
- 7y ago
- McTossOut 7y agoMicrosoft API docs are potentially to blame. If they were better, people would use them, over digging for guesses right? Personally I find the MSDN wiki docs insulting and hard to navigate, especially for older products. A nice fat PDF at least gives the illusion of editing... and fast search.
- aeyes 7y agoAlways interesting to see code from StackOverflow in a commercial product, as always this is most likely also a licensing issue.
- NewLogic 7y agoDocker for Windows has had a fundamental Dns[1] bug since April of last year, I've been forced to run v2.0.0.3 for months now to ensure yum repos resolve inside AmazonLinux containers. Truly a second class platform. [1]: https://github.com/docker/for-win/issues/3810 https://github.com/docker/for-win/issues/3810
- magduf 7y ago>Docker for Windows has had a fundamental Dns[1] bug since April of last year, I've been forced... >Truly a second class platform. Now maybe some Windows users will see how Linux users have felt for over 2 decades.
- overgard 7y agoAlso Docker 2.2 broke volume binding in a way that's kind of staggering (basic operations like move and delete fail). Ive had to keep everyone on Docker 2.1 because after spending two days on it I just concluded it can't do basic file system operations correctly. I really hope they start testing more thoroughly.