Search Issue Tracker
By Design
Votes
0
Found in
2018.3.0b7
Issue ID
1095043
Regression
No
[.NET 4.x] Reflection in .NET 4 stops working. MissingMethodException: Attempted to access a missing member
Steps to reproduce:
1. Open attached project
2. Open Maintainer (Tools > Code Stage > Maintainer)
3. Open Issues Finder Tab
4. Press any square button with group checkboxes icons at the left settings part and observe the error:
MissingMethodException: CodeStage.Maintainer.Settings.IssuesFinderSettings.SwitchCommon Due to: Attempted to access a missing member.System.RuntimeType.InvokeMember (System.String name, System.Reflection.BindingFlags bindingFlags, System.Reflection.Binder binder, System.Object target, System.Object[] providedArgs, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, System.String[] namedParams) (at <1aa022ba59ae4cfa86ec80b69d3d4fc2>:0)System.Type.InvokeMember (System.String name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object target, System.Object[] args) (at <1aa022ba59ae4cfa86ec80b69d3d4fc2>:0)CodeStage.Maintainer.UI.IssuesTab.DrawSettingsSearchSectionHeader (CodeStage.Maintainer.UI.SettingsSearchSection section, System.Boolean& foldout) (at Assets/Plugins/CodeStage/Maintainer/Editor/UI/Tabs/IssuesTab.cs:506)CodeStage.Maintainer.UI.IssuesTab.DrawSettingsBody () (at Assets/Plugins/CodeStage/Maintainer/Editor/UI/Tabs/IssuesTab.cs:159)
...
Expected result: "MissingMethodException: CodeStage.Maintainer.Settings.IssuesFinderSettings.SwitchCommon Due to: Attempted to access a missing member." should not be thrown using .NET 4.x
Reproduced in: 2019.1.0a13, 2018.3.0b12, 2017.4.18f1
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note:
When using Type.InvokeMember BindingsFlags must indicate that instance or static members should be considered by OR'ing with BindingFlags.Instance or BindingFlags.Static