Skip to content
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

Severity Code Description Project File Line Suppression State Error Exception: System.InvalidOperationException: Value must be set. IL2CPU #131

Open
EnZon3 opened this issue Dec 15, 2021 · 6 comments

Comments

@EnZon3
Copy link

EnZon3 commented Dec 15, 2021

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

IL2CPU

Expected Behaviour - What do you think that should happen?

The program should build successfully
The code for part of the Kernel
string textEditor() { bool inTextEditor = true; int x = 1; string[] textToSave = {"/",}; string savedText = "No text"; while (inTextEditor == true) { textToSave[x] = input; x++; if (input == "t-exit") { inTextEditor = false; } } savedText = string.Join("", textToSave); return savedText; }

Actual Behaviour - What unexpectedly happens?

Build error in IL2CPU line 1

Reproduction - How did you get this error to appear?

Paste this code into your kernel:
string textEditor() { bool inTextEditor = true; int x = 1; string[] textToSave = {"/",}; string savedText = "No text"; while (inTextEditor == true) { textToSave[x] = input; x++; if (input == "t-exit") { inTextEditor = false; } } savedText = string.Join("", textToSave); return savedText; }

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

User Kit 20200708

@MishaTy
Copy link
Contributor

MishaTy commented Dec 15, 2021

Can you send the build log?

@EnZon3
Copy link
Author

EnZon3 commented Dec 15, 2021

Output-Build.txt

@MishaTy MishaTy transferred this issue from CosmosOS/Cosmos Dec 15, 2021
@zarlo
Copy link
Member

zarlo commented Dec 16, 2021

@EnZon3 the userkit is old can you see if you get the same error with a dev kit

@EnZon3
Copy link
Author

EnZon3 commented Dec 16, 2021

@zarlo I actually got the latest version of Cosmos

@EnZon3
Copy link
Author

EnZon3 commented Dec 16, 2021

@EnZon3 the userkit is old can you see if you get the same error with a dev kit

I don't know how to compile the devkit.

@RetroGaming12221
Copy link

i have a same problem here, im trying to calculate how much fps my GUI is by dividing rendered frames by current second. But i cant use the method when the method itself returns a variables or not, I think what causes the error is the math division but i still don`t know what happen here. Please help :)
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants