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

Glue should not crash when setting default state on a tunneled Gum state #1665

Closed
profexorgeek opened this issue Dec 23, 2024 · 3 comments
Closed
Assignees
Labels

Comments

@profexorgeek
Copy link
Collaborator

Repro:

  • Create Gum component that has a custom state category
  • Create a Glue entity
  • Add an instance of the Gum component and tunnel its CurrentCustomCategoryState
  • Attempt to specify a default value on the tunneled state using the property grid

Glue does not know the range of possible values so you have to manually type a state. Even if you type a valid state, Glue will suffer a cascade of errors causing a C2D.

@profexorgeek profexorgeek changed the title Glue should not crash when setting default state on a tunneled Gum stage Glue should not crash when setting default state on a tunneled Gum state Dec 23, 2024
@profexorgeek
Copy link
Collaborator Author

Here's one of the errors that is thrown:

---------------------------

---------------------------
A plugin has had an error.
Shutting down the plugin FRB Sync Plugin version 1.0 at file location
C:/Users/justi/Documents/projects/FlatRedBall/FRBDK/Glue/Glue/bin/Debug/Plugins/OfficialPlugins/OfficialPlugins.dll

Additional information:

System.ArgumentException: Could not find the type for Mappil8or.GumRuntimes.Custom.CursorRuntime.CursorType?
If this is a type in your project, you may need to add the assembly to the PropertyValuePair.AdditionalAssemblies

   at FlatRedBall.Instructions.Reflection.PropertyValuePair.TryToGetTypeFromAssemblies(String typeAfterNewString) in C:\Users\justi\Documents\projects\FlatRedBall\Engines\FlatRedBallXNA\FlatRedBall\Instructions\Reflection\PropertyValuePair.cs:line 967

   at FlatRedBall.Instructions.Reflection.PropertyValuePair.IsEnum(String typeAsString) in C:\Users\justi\Documents\projects\FlatRedBall\Engines\FlatRedBallXNA\FlatRedBall\Instructions\Reflection\PropertyValuePair.cs:line 765

   at FlatRedBall.Instructions.Reflection.PropertyValuePair.ConvertStringValueToValueOfType(String value, String desiredType, Type alreadyKnownType, String contentManagerName, Boolean trimQuotes) in C:\Users\justi\Documents\projects\FlatRedBall\Engines\FlatRedBallXNA\FlatRedBall\Instructions\Reflection\PropertyValuePair.cs:line 662

   at FlatRedBall.Instructions.Reflection.PropertyValuePair.ConvertStringToType(String value, String qualifiedTypeName) in C:\Users\justi\Documents\projects\FlatRedBall\Engines\FlatRedBallXNA\FlatRedBall\Instructions\Reflection\PropertyValuePair.cs:line 175

   at FlatRedBall.Glue.Plugins.ExportedImplementations.CommandInterfaces.GluxCommands.SetVariableOnInner(NamedObjectSave nos, String memberName, Object value, Boolean performSaveAndGenerateCode, Boolean updateUi, Boolean notifyPlugins, Boolean recordUndo, SetPropertyCommitType commitType) in C:\Users\justi\Documents\projects\FlatRedBall\FRBDK\Glue\Glue\Plugins\ExportedImplementations\CommandInterfaces\GluxCommands.cs:line 2486

   at FlatRedBall.Glue.Plugins.ExportedImplementations.CommandInterfaces.GluxCommands.SetVariableOn(NamedObjectSave nos, String memberName, Object value, Boolean performSaveAndGenerateCode, Boolean updateUi, Boolean recordUndo, SetPropertyCommitType commitType) in C:\Users\justi\Documents\projects\FlatRedBall\FRBDK\Glue\Glue\Plugins\ExportedImplementations\CommandInterfaces\GluxCommands.cs:line 2431

   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
---------------------------
OK   
---------------------------

@profexorgeek
Copy link
Collaborator Author

You can repro this on my mapping project in commit 53f265d009bd2b7ca50dad00822aa606d706dd43

Look at Entities/CursorEntity > Variables > CurrentCursorState

@vchelaru
Copy link
Owner

fixed by e1a58ac

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

No branches or pull requests

2 participants