-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mixxx hang (infinite) at startup, when a secondary monitor is the application window target and RunAs Admin is NOT used #12655
Comments
Output of Mixxx.log after hang.. (all log files cleared, then mixxx launched normally to produce clean log of hang scenario) Debug [Main] Skipping loading of translations because the locale is 'en' or 'en_US'. |
Can you share a screenshot, that shows, how it looks, when it hangs? |
Good call on the title change. Thanks much for the help. I do appreciate the time folks spend on this. I will try running in dev mode today for some testing and see if it is stablish there. I can live with command line switches to use this awesome product. |
oh wow sorry I didn't try that sooner LOL DOH! May address a lot of the reports of folks just D/L and trying it out for the first time and having it hang. Find which security context requires admin and see if you can address that. Generally, folks won't want to run their DJ software as Admin, as security scrutiny is increasing with all the cyber attacks through supply chains, open source and general mayhem nation state actors are trying to inflict on citizens. |
Thank you for reporting this! I'm not familiar with Windows admin and user management stuff, does Mixxx access the regular user directory when being run in admin mode? |
SYSTEM, my e-mail address <>@outlook.com associated domain (since I logon to windows with my MSA (Microsoft System Account)) and the local Administrators group (DESKTOP\Administrators) all have Full rights on this folder. Yes, Mixxx does create the new folder, ask me again for the location of my music at start (I give it an empty folder to reduce churn and eliminate a music file being the issue). Yes, it still uses the default user directory when running apps in Admin mode. It just elevates the security context so you can access areas of the disk or processes in memory the normal user doesn't have access too. This is their attempt to prevent mailware or jailbreaking javascript from infecting users' system. Most users just click "yes' when the malware tries to elevate anyway LOL But they tried to help the user here, I think. |
Okay, thanks. If you don't select the Presonus card? |
Yah, so I deleted the settings folder again to try as 'new'. This time I didn't change anything after clicking "reconfigure" and just clicked OK. It also hangs. Now I just deleted only soundconfig.xml and launched and it prompts me w/ "Sound Device Error" again. Configuration left the same, but I removed the default output so there are no outputs. It asked if I was sure I wanted to continue with "no outputs" I said yes, it then goes to "Hang" |
You share the log when it hangs if you start as normal user, can you also share the log when you start as administrator. Than we can compare. |
The latest Attempt as normal user where it hangs, next attempt will be exact same config but will launch as Admin: Debug [Main] Skipping loading of translations because the locale is 'en' or 'en_US'. |
Now in Admin Mode all the way to exiting out. Debug [Main] Skipping loading of translations because the locale is 'en' or 'en_US'. |
Also Note, I had a laptop before I got this desktop last January. It was doing the same thing, as I started running into this around Sept/Oct/Nov~ of 2022 (can't remember the exact date there) with that release block. That laptop was using the Presonus as well as the Amazon Basics keyboard, at that time. |
Could you try to disconnect the |
And the same with the |
Yah I can do one at a time since I am on a desktop now. Amazon Keyboard disconnected it hung still., Trying mouse now. It hung with mouse disconnect as well. I am going to see if I can see anything in the Security Audit log real quick. |
Here is the sequence I see in Admin Events (security log was all audit success) Error 1/27/2024 10:48:58 AM Application Hang 1002 Hanging Events This is interesting: before the Error that says: WMI does take elevated privilege in Windows to leverage, from what I recall. iirc it is because it can be used to access sensitive system information, logs, etc. Don't quote me there! LOL Sorry, the last message in the sequence: I did check the Security and Maintenance control panel, nothing was in there. |
error varies per run FYI: |
Yah sure, looking through these Errors and Warnings a bit to try and correlate timing. Not sure how directly it is related. They seem to occur even when I am not launching Mixxx. That may have been confusing with me just posting the entire log without calling out the timestamps. I know it is hard to troubleshoot over text with some random person (me in this case) on the internet that you have to trust isn't too dense LOL. Thanks for your patience. Eliminated the coincidence - there is a 10+ minute gap since they stopped, and I relaunched Mixxx: Error 1/27/2024 11:07:30 AM Application Hang 1002 Hanging Events I am still checking out the link though, so I can clean this up. |
Error 1/27/2024 11:15:24 AM Application Hang 1002 Hanging Events Yah the DeviceSetupManager errors cleared up, and I am still getting the Application Hang solo (see above 8 minute gap between test with no errors other than App Hang events) |
Here is the crash file Windows created.. Just found it.. Yah I know, I haven't spent this much time looking into this before :) Version=1 |
Can you try with Mixxx 2.3.4, if using |
P.S. Does not hang when I "runas" Administrator |
If 2.3.4 hangs in --developer mode, but 2.4 not, Than I guess this change is responsible for this behavior change (but not for the hang itself): #11317 |
But what doesnt make sense to me, is that the only change between 2.3.3 and 2.3.4 in this part of the code is a comment. The last significiant changes were in 2.3.1: #4243 |
Yah, I will try 2.3.3 now. |
2.3.3 was still reproducing the issue. I deleted the settings folder between downgrades. I was recalling from memory in the original thread where I stated 2.3.3 worked after initial freeze. (maybe I did the below, testing) I went back to 2.2.4. It hung on startup as well. I know that was working before. I ran it as admin and it worked. I then relaunched and it worked as normal user. I then rebooted. It still worked as a normal user. Now I can run Mixxx 2.2.4 normally (not as admin) just fine. I must have done that a couple years ago then forgot and just used it fine until I upgraded to 2.3.3 etc. and started having issues again. I am now trying 2.3.3 with the admin mode first, then restart and see if it works like 2.2.4 did. |
Other interesting thing.... It loads on Monitor 1 as normal user. When I launch "RunsAs" Administrator, it launches to Monitor 2 instead and doesn't freeze. 2.3.3 also worked if I launched it, it froze. Launch as Admin, it works. Now launch normally and it works. One day it just started hanging on load, right when I was supposed to go on Air. Something could have changed on my system since then, as well to change the behavior. Windows Updates all the time. |
I am going to try the other newer versions with this sequence now. |
Okay, this gets weirder.. 2.3.6 work if I go through the sequence I mentioned. If I drag the Mixxx Window to Monitor 1 and exit, it hangs as normal user at startup. I have to runas Admin, drag to monitor 2, exit. then I can launch as Normal User again, with it loading on Monitor 2. For reference: My Laptop had the main screen and Monitor 2, as well. This desktop just has 2 external monitors. |
The monitors are not related to the HID devices. But since loading of the skin is the step after enumerating the HID devices, this might be the origin instead? |
Yah seems related. I will run more tests and try setting Monitor 1 and 2 reversed (windows lets you set which is 1 and which is 2, etc. when using multiple monitors). So in this case Monitor 2 was set as my Main Display. |
You could also test with another standard user account instead of administrator. To understand, if the administrator priviliges are, what make the difference, or just the different user account. |
Yah sure thing. So yah Mixxx went to Monitor 1 as my main display. I moved it to Monitor 2 (since not main now) and exited. Now as normal user it hangs. So is following "not main display" versus physical port or physical device. Yes, I can create a new local user and use current installed version of Mixxx, etc. and test |
It would help, if you could write down in a table (best on top in the issue description), what works, and what not. I'm beginning to loose the overview. |
Yah, I kind of real time troubleshooted without forming a holistic view and spammed you with a bunch of random stuff, so I will get that updated. It is beginning to look like 'main display" monitor on windows must be used unless you are Admin. New user added to windows launched Mixxx first time, ran through setup and didn't hang. For that user, it launched on the Main Display (which is where I exited out last on the existing account I use on this machine) |
Done, added a lot of detail and info. Thanks for helping me get motivated to troubleshoot this deeper. Your questions forced me to look harder and find a more detailed repro of this issue. |
|
It is also interesting that message only shows up when Mixxx is targeted to the 'non-primary' display in Windows which somehow causes the process to require write access to the USB HID controllers, which is an elevated action/requires elevation of privilege. I just have to remember to drag Mixxx back to my primary display before I exit, or never move it off my primary display unless I want to launch in RunAs Admin mode. |
I've no idea, how this can be related. But please write down your test results as they are. Hopefully we understand it later, when we've the big picture. |
Sure thing. I blame Windows. There have been so many issues with their display scaling, multi monitor support, etc. I probably got confused on this bug because I move Mixxx back and forth between monitors, depending on what else I am doing at the time. I never dreamed this could be the issue. |
I created a test build, which you can download here (scroll down to the bottom of the page): https://github.com/mixxxdj/mixxx/actions/runs/7684358660?pr=12669 Could you test how this behaves? |
I am not 100% sure I went back and tested 2.4 w/ --developer mode targeting the non-primary monitor/secondary monitor. (I will do that now, since I understand the repro clearly next. We may need to update the title and table at the top.) When I just tested the private build, I noticed that it targeted my primary monitor and worked the first time I used the --developer switch. So I dragged to 'secondary monitor and exited. Then relaunched and 2.4 gives this warning when hanging (this is the tail end of the developer console output) This is due to me launching it from the command window on my primary monitor. When I type "CMD" it launches it to primary monitor so when I kicked Mixxx off with the --developer switch it sent it to primary and did not freeze/hang. I repeated the test several times, dragging the Mixxx window to alternating monitors, exit, launch. Consistently only freeze hangs when Mixxx launched to Secondary Monitor, even with --developer flag debug [Main] Using "Studio USB ASIO Driver" as output sound device clock reference After I click X to close the hung window, it spits this out: Yes, also repros in the public release of 2.4.0 (beta 385) |
Kind of a fluke I found this issue. The only reason Mixxx ever targeted my Secondary monitor on first launch is because after install, instead of launching with the icon Mixxx put on my Primary Monitor desktop, I drag the icon to the Secondary monitor where my other application icons are on the far left of the screen. Since I now launch from second monitor, Mixxx launches to second monitor and freezes. Same with the command window. Since the command window was targeted to primary, then I launched Mixxx with --developer switch from command window on primary monitor, it launched Mixxx in the primary monitor. When I drag the command prompt window to the secondary monitor before launching Mixxx in -developer mode, Mixxx targets the secondary monitor and hang/freezes even in developer mode. |
Same here, with a fresh install. If i start mixx for the first time (from start menue), it opens on my primary monitor, working fine. If i move it to my second or third monitor, and close it while still on the monitor, it will fail to start on the next launch (opens on the last used monitor, same screen as above with the mixxx-logo and status-bar, locking up). To fix it, it's enough to delete the entrys |
Interesting |
Hey funny thing. I never have ran into this issue before. I've ran dual monitors for over a decade at work and home. So there are applications that are written in a way (most of them) that do not run into this problem. I don't know if it is a framework you use for display to video or the way you wrote the code yourself. I was troubleshooting why BlueStacks (the android emulator for Windows) was crashing the next day after I installed and used it. I get an alert that this thread has been updated and was like "Hmm I wonder if it is the issue I saw with MIXXX". My point in sharing this? Figure out what you have in common with BlueStacks and you will fix both of your entity's problems. :) |
Bug Description
Mixxx will hang indefinitely at startup if it targets my secondary/non-primary monitor at startup, unless I RunAs Admin. If I just launch it as the normal user, it hangs/freezes when the non-primary display is the target of the Mixxx application window.
Testing Older versions
version: fresh install first launch
v2.2.4 Run as Admin only if not defaulted to main monitor.*
v2.3.3 Run as Admin only if not defaulted to main monitor.*
v2.3.4 Run as Admin only if not defaulted to main monitor.*
v2.3.6 Run as Admin only if not defaulted to main monitor.*
v2.4 Beta Run as Admin, only if not defaulted to main monitor.*
(*) - main monitor in Windows is an option you set when using multiple monitors to determine which display is used as Main and which are secondary displays. I only have 2 displays for this scenario, but 3 or 4 can be supported.
After successfully able to launch Mixxx as a normal user, if I move the Mixxx window to the 'non-primary display' and exit. I cannot launch it without hanging again until I RunAs Admin, move it back to the 'primary display' and exit, so that the normal user mode now launches Mixxx to the 'primary display'.
2.3.6 gave be a useful message in Developer Mode.
Warning [Controller]: USB permissions problem (or device error.) Your account needs write access to USB HID controllers.
The Warning above does not appear when Mixxx launched to the 'primary display'. Mixxx is not hanging at launch here.
2.4.0 developer console tail after froze a few seconds spits out this:
warning [Engine] SoundDevicePortAudio: Audio API provides invalid time stamps, syncing waveforms with a CPU Timer DacTime: 72659.5 EntrytoDac: 0.0165079 TimeSinceLastCb: 0.0257527 diff: 0.00253275
The above warning was not generated when Mixxx targeted the primary monitor and did not hang/freeze.
Version
2.4.0
OS
Windows 11
The text was updated successfully, but these errors were encountered: