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

Build error with CHRFont.cs at line 66 "FormatException: Input string was not in a correct format." #661

Open
TheBricktop opened this issue Mar 22, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@TheBricktop
Copy link

TheBricktop commented Mar 22, 2024

Hello im trying to build the openbrush to oculus quest 3 but im getting wierd error with string not being parsed due to incorrect format of the string and im trying to fix it.
Is there any pointer on why it is happening ?

edit :
I used ol' reliable tryparse and it started to build.
`

                foreach (var point in pointsString)
                {
                    var coordsString = point.Trim().Split(',');
                    if (coordsString.Length < 1) continue;
                    /*
                    float xCoord = float.Parse(coordsString[0]);

                    float yCoord = float.Parse(coordsString[1]);
                    */
                    float xCoord = 0, yCoord = 0;
                    float.TryParse(coordsString[0], out xCoord);
                    float.TryParse(coordsString[1], out yCoord);
                    var coord = new Vector2(xCoord / 20f, yCoord / 20f);
                    Height = Mathf.Max(Height, coord.y);
                    points.Add(coord);
                }

`

@andybak
Copy link
Contributor

andybak commented Mar 22, 2024

If this is the error I think it is, then it only happens first time you load the project. I never got around to fixing it for that reason.

If it's something else then can you provide more info? Full stack trace, what you're doing when it happens etc.

EDIT - no. this is the error I was thinking of:

NullReferenceException: Object reference not set to an instance of an object
TiltBrush.CHRFont.OnEnable () (at Assets/Scripts/TextToStrokes/CHRFont.cs:39)

I'd still like to see the stack trace. But in general I don't build in Unity - I use the CI build. If push any commit to a branch with [CI BUILD] somewhere in the message, it should kick of a build on Github. (assuming you've turned on Github Actions for your fork)

@mikeskydev mikeskydev added the bug Something isn't working label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants