Self-Referential Group Type Associations Cause an Application Crash In Certain Circumstances #6119
Open
2 tasks done
Labels
Status: Confirmed
It's clear what the subject of the issue is about, and what the resolution should be.
Type: Bug
Confirmed bugs or reports that are very likely to be bugs.
Description
Self-referential group type associations are a supported configuration for group types that intended to permit an unlimited nested group hierarchy.
In certain scenarios involving entity sets, the serialization of additional merge fields including entities referencing the group type with a self-referential group type association will cause Newtonsoft to throw a stack overflow error and crash Rock.
The screenshot below shows debugger output from a memory dump taken at the time of the crash on a production system where this issue occurred.
Looking further up the call stack, serialization is being initiated from the
AdditionalMergeFieldsJson
getter inEntitySetItem
.In this case, this was triggered by clicking the
Launch Workflow
gear on an Event Occurrence grid (more details below).Actual Behavior
Clicking the
Launch Workflow
gear on an Event Occurrence grid that is linked to an Event Registration with a group placement configured to use a self-referential group type initiates a request that never completes and ultimately crashes Rock.Expected Behavior
Rock should display the
Launch Workflow
UI as expected.Steps to Reproduce
On Rock Solid demo, configure a new group type that includes itself as an Allowed Child Group Type.
Create some groups of that group type in the group viewer:
Edit the
Baptism
registration template included in the demo data to include a group placement configuration with groups of the new group type created above.Create a new Event Item on the public calendar:
Using the Event Wizard, configure a new event using the Baptism registration template and the event item created above:
Enter any value for the required fields on the registration step and leave all fields blank on the Group step.
Select the Baptisms Event Item created above on the Event step, and configure an event occurrence (any schedule is fine).
Navigate to the Event Detail for the "Baptisms" event and click the Launch Workflow gear on the Event Occurrences grid.
The page will hang with the loading spinner visible, and an open / hung request will be visible in browser dev tools:
After a few minutes, an error message will be shown and Rock will crash and restart.
Issue Confirmation
Rock Version
16.6
Client Culture Setting
en-US
The text was updated successfully, but these errors were encountered: