YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
21 stars 8 forks source link

Stability: GM crash on startup due to cryptography "Access Denied" exception when starting MQTT #6794

Closed VeryLowPoly closed 3 weeks ago

VeryLowPoly commented 1 month ago

Description

When I go to launch the game, the splash screen comes up describing what it's loading and when that screen goes away, I'm met with just a blank grey screen. The project selection screen does not appear, and when clicking on the screen it begins Not Responding. Unable to load into the IDE through opening project files as well. Since I can't get into GMS2 itself and create a contact package, I'm unable to provide that below, but have attached the ui log in hopes that the issue can be found there

ui.log shows lots of successive cryptography exceptions:

[22:03:50:517(f45c)] MQTT - System.AggregateException: One or more errors occurred. (Access denied.)
 ---> System.Security.Cryptography.CryptographicException: Access denied.
   at System.Security.Cryptography.X509Certificates.CertificatePal.FilterPFXStore(ReadOnlySpan`1 rawData, SafePasswordHandle password, PfxCertStoreFlags pfxCertStoreFlags)
   at System.Security.Cryptography.X509Certificates.CertificatePal.FromBlobOrFile(ReadOnlySpan`1 rawData, String fileName, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)
   at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(ReadOnlySpan`1 data)
   at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(Byte[] rawData)
   at MQTTnet.Certificates.BlobCertificateProvider.GetCertificate()
   at MQTTnet.Implementations.MqttTcpServerAdapter.StartAsync(IMqttServerOptions options)
   at MQTTnet.Server.MqttServer.StartAsync(IMqttServerOptions options)
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
   at YoYoStudio.IDE.MqttInitialise()

Expected Change

GameMaker should still start successfully and then warn more effectively about this error and how to fix

Steps To Reproduce

  1. Start GameMaker
  2. Load splash screen
  3. Cannot continue
  4. See the issue

How reliably can you recreate this issue using your steps above?

Always

Which version of GameMaker are you reporting this issue for?

2024.6.2 (Monthly)

Which operating system(s) are you seeing the problem on?

Windows 11

Which platform(s) are you having trouble building this project for?

Windows

Are you running GameMaker from inside your Steam library?

No

Contact Us Package Attached?

Sample Project Added?

YYDan commented 1 month ago

Judging from that error, this is an issue with the OS account permissions, antivirus/firewall settings or other security products on your machine or network, rather than a GameMaker bug or something we could fix fully/properly for you (we will of course look into stopping the crash and instead show you a dialog that you need to check the guide below).

You need to review our Permissions FAQ and follow the steps there, and I suspect this will allow you to fix your existing GM install right away. Note that we always link to this guide on the release notes page, as many users need to review their protection settings every time they install a new version of GameMaker, so this may be something you need to do also in future.

stuckie commented 1 month ago

Specifically, this looks to be that your user needs WRITE access to C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys as it's trying to generate a private key for your machine, and falling over as it cannot write there.

We will still look into catching this exception and handling it more gracefully however.

VeryLowPoly commented 1 month ago

I appreciate the response! After allowing write access to this folder, I was able to open it up again and recover my project! Thank you so much for the help and support! I was just really confused because the Long Term Stable version was working just fine, right? But when I upgraded to this version of GMS2 after the last I only saw the screen halt before showing the load project screen

This is excellent news! I'm very grateful you guys could help me out (:

On Tue, Jul 30, 2024 at 12:44 PM Steven Campbell @.***> wrote:

Specifically, this looks to be that your user needs WRITE access to C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys as it's trying to generate a private key for your machine, and falling over as it cannot write there.

We will still look into catching this exception and handling it more gracefully however.

— Reply to this email directly, view it on GitHub https://github.com/YoYoGames/GameMaker-Bugs/issues/6794#issuecomment-2258779657, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXSAUTTXQOHDTU4NX6CSGLTZO67HXAVCNFSM6AAAAABLFQHKKKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJYG43TSNRVG4 . You are receiving this because you authored the thread.Message ID: @.***>

stuckie commented 1 month ago

Excellent!

Glad you got it working, and thanks for letting us know.

VeryLowPoly commented 1 month ago

for sure! And thank you guys for being an awesome team

On Wed, Jul 31, 2024 at 5:12 AM Steven Campbell @.***> wrote:

Excellent!

Glad you got it working, and thanks for letting us know.

— Reply to this email directly, view it on GitHub https://github.com/YoYoGames/GameMaker-Bugs/issues/6794#issuecomment-2260038059, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXSAUTXZIKVPT3VQTWAHHHTZPCS7XAVCNFSM6AAAAABLFQHKKKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRQGAZTQMBVHE . You are receiving this because you authored the thread.Message ID: @.***>

stuckie commented 3 weeks ago

Should now catch the exception and just stop MQTT from starting up and blocking the rest of the IDE flow. The exception will be logged to the ui.log as normal.

VeryLowPoly commented 3 weeks ago

You guys are so on top of it! Thank you so much for your help and support(:

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free.www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Mon, Aug 12, 2024 at 5:21 AM Steven Campbell @.***> wrote:

Should now catch the exception and just stop MQTT from starting up and blocking the rest of the IDE flow. The exception will be logged to the ui.log as normal.

— Reply to this email directly, view it on GitHub https://github.com/YoYoGames/GameMaker-Bugs/issues/6794#issuecomment-2283482199, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXSAUTRHEOMYOKJUFVJUDJLZRB5DFAVCNFSM6AAAAABLFQHKKKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBTGQ4DEMJZHE . You are receiving this because you authored the thread.Message ID: @.***>

Emc1923 commented 2 weeks ago

Verified as of Beta IDE v2024.800.0.613 Beta Runtime v2024.800.0.636