CosmosOS / Cosmos

Cosmos is an operating system "construction kit". Build your own OS using managed languages such as C#, VB.NET, and more!
https://www.goCosmos.org
BSD 3-Clause "New" or "Revised" License
2.86k stars 542 forks source link

NullReferenceException on GetFullscreenCanvas() #2922

Closed Neil-Ciciglycerin closed 4 months ago

Neil-Ciciglycerin commented 4 months ago

Area of Cosmos - What area of Cosmos are we dealing with?

The CGS (Cosmos Graphic Subsystem)

Expected Behavior - What do you think that should happen?

I should get a Canvas which I can draw to.

Actual Behavior - What unexpectedly happens?

I get a NullReferenceException.

Reproduction - How did you get this error to appear?


            PrintDebug("__sysstartup__");
            c = FullScreenCanvas.GetFullScreenCanvas();
            c.Clear();
            PrintDebug("0");

Version - Were you using the User Kit or Dev Kit? And what User Kit version or Dev Kit commit (Cosmos, IL2CPU, X#)?

Using dev kit, most recent commit as of issue creation.

koteProgrammist commented 4 months ago

Where you trying to test your OS?

Neil-Ciciglycerin commented 4 months ago

On windows 10, using VS2022, in VMWare Workstation?

koteProgrammist commented 4 months ago

On windows 10, using VS2022, in VMWare Workstation?

Try to enter the resolution like c = FullScreenCanvas.GetFullScreenCanvas(new Mode(1920, 1080, ColorDepth.ColorDepth32));

or any resolution what you want.

valentinbreiz commented 4 months ago

Hello, is debug mode enabled? if yes this is a known issue and you should not using debug with graphics on VMWare :/

Neil-Ciciglycerin commented 4 months ago

Ah, it is. Thanks for helping!

Neil-Ciciglycerin commented 4 months ago

What, exactly is debug mode, however?

zarlo commented 4 months ago

a mode where the debugger code it emitted when building to allow the os to talk to the IDE

Neil-Ciciglycerin commented 4 months ago

Ah. How do you disable it?

Neil-Ciciglycerin commented 4 months ago

I figured it out. FOR THE PEOPLES WHO COME HERE IN THE FUTURE: uncheck the checkbox that says "Enable Cosmos Remote Debugger"