MeisApps / pcbu-desktop

Desktop app for PC Bio Unlock
https://meis-apps.com/pc-bio-unlock
GNU General Public License v3.0
3 stars 2 forks source link

Opening Windows-security dialog causes explorer to crash if PC Bio Unlock Service module is installed. #8

Closed th3030 closed 4 days ago

th3030 commented 1 week ago

If PC Bio Unlock service module is installed. The Windows-security dialog will cause explorer.exe to crash. The best example is by trying to run an app as different user (Can be accessed by shift + right-clicking an app and selecting run as different user). This means it's not possible to run an application as different user. It's still possible to do so through runas command.

MeisApps commented 1 week ago

I have tried to reproduce this problem on all my PCs and on a clean Windows installation in a VM. It works fine on all of them, so I need more information. Please send me the service module logs if there are any. Are you using Windows 10 or 11? And could you please try deleting all your paired devices and try opening the menu again with the module still installed?

th3030 commented 1 week ago

Even if all the devices are removed the crash also occurs. Installing and running on a VM's however, the service module indeed doesn't cause that Windows-security dialog crashes explorer.exe at all.

[2024-07-03 00:09:03.220] Logger init.
[2024-07-03 00:09:06.835] Reading length failed.
[2024-07-03 00:09:06.835] Empty data received.
[2024-07-03 00:09:06.851] Server state: 6
[2024-07-03 00:09:06.851] Final state: 6
[2024-07-03 00:09:14.101] Logger destroy.
[2024-07-03 00:09:18.889] Logger init.
[2024-07-03 00:09:22.040] Reading length failed.
[2024-07-03 00:09:22.040] Empty data received.
[2024-07-03 00:09:22.101] Server state: 6
[2024-07-03 00:09:22.102] Final state: 6
[2024-07-03 00:09:26.212] Logger destroy.
[2024-07-03 00:12:34.782] Logger init.
[2024-07-03 00:12:39.325] Reading length failed.
[2024-07-03 00:12:39.325] Empty data received.
[2024-07-03 00:12:39.371] Server state: 6
[2024-07-03 00:12:39.371] Final state: 6
[2024-07-03 00:12:48.197] Logger destroy.
[2024-07-03 00:14:04.127] Logger init.
[2024-07-03 00:14:18.828] Reading length failed.
[2024-07-03 00:14:18.828] Empty data received.
[2024-07-03 00:14:18.843] Server state: 6
[2024-07-03 00:14:18.843] Final state: 6
[2024-07-03 00:14:36.952] Reading length failed.
[2024-07-03 00:14:36.952] Empty data received.
[2024-07-03 00:14:36.968] Server state: 6
[2024-07-03 00:14:36.968] Final state: 6
[2024-07-03 00:14:41.871] Logger destroy.
[2024-07-03 00:14:51.416] Logger init.
[2024-07-03 00:14:57.931] Bluetooth connect() failed.
[2024-07-03 00:14:57.961] Server state: 4
[2024-07-03 00:14:57.961] Final state: 4
[2024-07-03 00:15:01.742] Logger destroy.
[2024-07-03 00:15:44.308] Logger init.
[2024-07-03 00:15:51.033] Bluetooth connect() failed.
[2024-07-03 00:15:51.053] Server state: 4
[2024-07-03 00:15:51.053] Final state: 4
[2024-07-03 00:15:54.512] Logger destroy.
[2024-07-03 00:31:51.516] Logger init.
[2024-07-03 00:31:58.134] Reading length failed.
[2024-07-03 00:31:58.134] Empty data received.
[2024-07-03 00:31:58.166] Server state: 6
[2024-07-03 00:31:58.166] Final state: 6
[2024-07-03 00:32:02.674] Logger destroy.
[2024-07-03 00:33:32.594] Logger init.
[2024-07-03 00:33:42.594] Server state: 1
[2024-07-03 00:33:42.594] Final state: 1
[2024-07-03 00:33:42.686] Logger destroy.
[2024-07-03 00:34:37.873] Logger init.
[2024-07-03 00:34:40.163] Reading length failed.
[2024-07-03 00:34:40.163] Empty data received.
[2024-07-03 00:34:40.226] Server state: 6
[2024-07-03 00:34:40.226] Final state: 6
[2024-07-03 00:34:43.991] Logger destroy.
[2024-07-03 00:37:44.872] Logger init.
[2024-07-03 00:37:47.052] Reading length failed.
[2024-07-03 00:37:47.052] Empty data received.
[2024-07-03 00:37:47.068] Server state: 6
[2024-07-03 00:37:47.068] Final state: 6
[2024-07-03 00:37:51.601] Logger destroy.
[2024-07-03 01:01:04.810] Logger init.
[2024-07-03 01:01:10.088] connect() failed.
[2024-07-03 01:01:10.125] Server state: 4
[2024-07-03 01:01:10.125] Final state: 4
[2024-07-03 01:01:13.542] Logger destroy.
[2024-07-03 01:03:32.505] Logger init.
[2024-07-03 01:03:40.039] Server state: 1
[2024-07-03 01:03:40.039] Final state: 1
[2024-07-03 01:03:40.135] Logger destroy.
[2024-07-03 01:05:13.579] Logger init.
[2024-07-03 01:05:33.533] Server state: 1
[2024-07-03 01:05:33.533] Final state: 1
[2024-07-03 01:05:33.637] Logger destroy.
[2024-07-03 01:07:02.796] Logger init.
[2024-07-03 01:07:05.279] Logger destroy.
[2024-07-03 01:07:10.377] Logger init.
[2024-07-03 01:07:11.509] Logger destroy.
[2024-07-03 01:07:16.271] Logger init.
[2024-07-03 01:07:17.696] Logger destroy.
[2024-07-03 01:07:27.666] Logger init.
[2024-07-03 01:07:28.934] Logger destroy.
[2024-07-03 10:29:00.007] Logger init.
[2024-07-03 10:29:08.698] Server state: 1
[2024-07-03 10:29:08.698] Final state: 1
[2024-07-03 10:29:08.904] Logger destroy.

This is the service log. I am using Windows 10 pro. And I'm using Bluetooth to connect to the phone.

th3030 commented 1 week ago

I think I suspect what the issue may be. If there's saved Windows credentials (For example Active Directory or Samba shares) the Windows-security dialog may crash explorer.exe. On an another machine with Bluetooth adapter the crashing doesn't occur at all.

th3030 commented 6 days ago

I fixed the issue by reinstalling Windows again. Could be a very obscure bug or Windows Hello messing with credential provider.

th3030 commented 6 days ago

I found the real suspect. Nextcloud uses another version of MSVCP140.dll. Removing Nextcloud fixed the issue. To reproduce my issue again. Install Nextcloud. You don't have to particulary configure it. The installation of Nextcloud causes this issue to arise. Seems a DLL Hell thing.

Different versions of MSVCP140.dll may cause the app to crash the Windows desktop. Or in worse case. The login screen. Making it unable to log in, and you have to force the pc to go in safe mode to remove or fix MSVCP140.dll

MeisApps commented 6 days ago

Thank you for investigating further! Seems like Nextcloud uses an older version of vcredist. I tried to reproduce the crash again, but it looks like I have to set up a server/account for it to occur. I'll do some research in the coming days to see what I can do to fix this.

th3030 commented 6 days ago

Sometimes the MSVCP140.dll itself may be damaged or corrupted. Requiring a reinstall. Quite a flaky issue.

MeisApps commented 4 days ago

Please try the pre-release I just published. MSVCP140 is now linked statically. I tried to reproduce the crash again with fully set up Nextcloud, but it doesn't happen on my machine for some reason.

th3030 commented 4 days ago

I just tried your pre-released version. Yes even with Nextcloud installed no issues seems to arise thanks to the statically linked MSVCP140 module!

th3030 commented 4 days ago

Closing this issue as the problem I described doesn't exist anymore.