stride3d / stride3d/stride

Custom SceneRendererBase cannot be cast to IIdentifiable when reloading assemblies

Open
#2,907 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Release Type: Latest official

Version: 4.2.1.2442

Platform(s): Windows (GameStudio)

Describe the bug
When soft reloading this project https://github.com/MsEpsilon/Stride_radial-bar, GameStudio crashes.

In the provided repository: CircularProgressBarRenderer inherits SceneRendererBase. SceneRendererBase should inherit IIdentifiable by having the Guid Id property, but casting is still invalid.

Manually inheriting IIdentifiable solves the crash, but nullifies the ISceneRenderer instance set in the graphics compositor, causing a whole load of new issues when starting the project.

To Reproduce
Steps to reproduce the behavior:

  1. Use https://github.com/MsEpsilon/Stride_radial-bar .
  2. Make a small code change using to enable soft reloading.
  3. Stride will ask to reload assemblies. Choose Reload.
  4. Boom!

Expected behavior
No crash.

Log and callstacks
ErrorReport.txt

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ErrorReport.txt and trace the assembly-reload path involving SceneRendererBase, IIdentifiable, and ISceneRenderer. Reproduce the soft reload using the linked Stride_radial-bar project, then verify that reloading no longer crashes and that the graphics compositor retains a valid ISceneRenderer instance.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
computer-graphics, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.