-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
Studio Pro 11.6.4 crashes with System.InvalidOperationException: Sequence contains no matching element when opening a Mendix 11.6.4 project that has unstaged changes produced by mxcli. The crash occurs during git status computation (RevStatusCache.DoRefresh), specifically when reading the base version of a deleted .mxunit file created by mxcli.
Root Cause Hypothesis
mxcli's BSON writer produces a property name (or nested object property) that does not exist in Studio Pro 11.6.4's type metadata cache. When MprProperty..ctor tries to look up the property definition using ICachedType.Properties.First(predicate), it fails because no matching property is found.
Steps to Reproduce
- Use mxcli to create microflows in a Mendix 11.6.4 MPR v2 project
- Commit the changes
- Use mxcli to
DROP MICROFLOWone of the created microflows (creating an unstaged deletion) - Open the project in Studio Pro 11.6.4 → crash
Workaround
Commit all unstaged changes before opening Studio Pro, so there is no diff for RevStatusCache to process.
Stack Trace
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
at Mendix.Modeler.Storage.Mpr.MprProperty..ctor(ICachedType containerType, JProperty property) in MprProperty.cs:line 25
at Mendix.Modeler.Storage.Mpr.MprObject.<>c__DisplayClass5_0.<.ctor>b__2(JProperty p) in MprObject.cs:line 34
...
at Mendix.Modeler.VersionControl.Status.RevStatusCache.CreateDeleteStatusItem(Guid unitID, String baseFilePath)
at Mendix.Modeler.VersionControl.Status.RevStatusCache.DoRefresh(IProgressInfo info) in RevStatusCache.cs:line 92
Investigation Notes
- The affected unit was
316bfc14-33ff-4678-91c0-80ed806442b8.mxunit, aMicroflows$Microflowcreated by mxcli mxcli bson compareshows the top-level Microflow properties match between Studio Pro-created and mxcli-created microflows (0 only-in-left, 0 only-in-right)- The problematic property is likely in a nested object (action type, data type, or other child element)
mx checkreports 0 errors on the committed project, so the BSON is structurally valid for mx — but Studio Pro'sMprPropertyconstructor is stricter- Project: Mendix 11.6.4 (MPR v2 format)
TODO
- Write a diagnostic tool that enumerates ALL property names per
$Typein a.mxunitfile and cross-references them against Studio Pro's expected properties (from reflection data) - Compare the deleted file's full BSON tree (including nested objects) against a Studio Pro-created microflow with the same action types
- Check if the issue is specific to Mendix 11.x types (mxcli writer was developed primarily against 10.x reflection data)
- Consider adding a
mxcli bson validatecommand that checks property names against the reflection data for the project's Mendix version
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working