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

Self-Referential Group Type Associations Cause an Application Crash In Certain Circumstances #6119

Open
2 tasks done
billdeitrick opened this issue Dec 4, 2024 · 1 comment
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.

Comments

@billdeitrick
Copy link

billdeitrick commented Dec 4, 2024

Description

Self-referential group type associations are a supported configuration for group types that intended to permit an unlimited nested group hierarchy.

2024-12-04_16-18-24

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.

2024-12-04_16-25-58

Looking further up the call stack, serialization is being initiated from the AdditionalMergeFieldsJson getter in EntitySetItem.

2024-12-04_16-31-52

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.

2024-12-04_16-45-50

Create some groups of that group type in the group viewer:

2024-12-04_16-46-40

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.

2024-12-04_16-48-59

Create a new Event Item on the public calendar:

2024-12-04_16-53-00

Using the Event Wizard, configure a new event using the Baptism registration template and the event item created above:

2024-12-04_16-53-57

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).

2024-12-04_16-56-45

Navigate to the Event Detail for the "Baptisms" event and click the Launch Workflow gear on the Event Occurrences grid.

2024-12-04_16-58-32

The page will hang with the loading spinner visible, and an open / hung request will be visible in browser dev tools:

2024-12-04_16-59-08

2024-12-04_16-59-38

After a few minutes, an error message will be shown and Rock will crash and restart.

2024-12-04_17-01-21

Issue Confirmation

  • Perform a search on the Github Issues to see if your bug or enhancement is already reported.
  • Reproduced the problem on a fresh install or on the demo site.

Rock Version

16.6

Client Culture Setting

en-US

@sparkdevnetwork-service sparkdevnetwork-service added 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. labels Dec 4, 2024
@sparkdevnetwork-service
Copy link

@billdeitrick Hi Bill Thank you so much for the detailed write up - it helped in recreating the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

2 participants