Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[WIP] Fix material deserialization assertion when creating new projects#606

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Copilot wants to merge3 commits intomain
base:main
Choose a base branch
Loading
fromcopilot/fix-aef0d10f-8391-4091-a8d9-48aee48bcb1a

Conversation

Copy link

CopilotAI commentedOct 2, 2025
edited
Loading

Problem

When creating a new project in OvEditor, users would encounter an assertion error:

[ASSERT] Attempting to SetProperty on a non-existing property

This caused the editor to display a white screen and prevented normal project creation.

Root Cause

The issue occurred during material deserialization inOvCore::Resources::Material::OnDeserialize(). The deserialization process:

  1. Loads the shader and callsSetShader() to populate material properties from shader uniforms
  2. Attempts to restore saved property values from the material file usingSetProperty()

TheSetProperty() method has an assertion that fails if the property doesn't exist. This can happen when:

  • The shader definition has changed and removed certain uniforms
  • The shader hasn't fully loaded its variants yet during initialization
  • Material files contain legacy properties from older shader versions

Solution

Replaced allSetProperty() calls withTrySetProperty() in the deserialization visitor. TheTrySetProperty() method:

  • Checks if the property exists before attempting to set it
  • Returnstrue if successful,false if the property doesn't exist
  • Doesnot trigger assertions for missing properties

This provides graceful handling of property mismatches between serialized materials and their current shaders, which is expected behavior during version updates or shader changes.

Changes

  • Modified:Sources/Overload/OvCore/src/OvCore/Resources/Material.cpp
    • Lines 183, 187, 191, 195, 199, 203, 207: ChangedSetProperty() toTrySetProperty()

This is a minimal, defensive fix that maintains backwards compatibility while preventing assertions during normal editor operations.

Fixes #<issue_number>

Original prompt

This section details on the original issue you should resolve

<issue_title>[ASSERT] Attempting to SetProperty on a non-existing property</issue_title>
<issue_description>## Description
Reported on Discord:

https://discord.com/channels/622075717659656195/622076898880520195/1409044934442483793

To Reproduce

  1. Follow GitHub instructions for compiling Overload
  2. Run OvEditor
  3. Create a new project
  4. Notice the issue

Expected behavior

Shouldn't hit this assert.</issue_description>

<agent_instructions>From the user: "I went through the github instructions for compiling overload, compiled it, then created a new project, opened it and was met with a white screen"</agent_instructions>

Comments on the Issue (you are@copilot in this section)

Fixes#603

✨ Let Copilot coding agentset things up for you — coding agent works faster and does higher quality work when set up for your repo.

CopilotAIand others added2 commitsOctober 2, 2025 20:41
Co-authored-by: adriengivry <33324216+adriengivry@users.noreply.github.com>
Co-authored-by: adriengivry <33324216+adriengivry@users.noreply.github.com>
CopilotAI changed the title[WIP] [ASSERT] Attempting to SetProperty on a non-existing propertyFix material deserialization assertion when creating new projectsOct 2, 2025
CopilotAI requested a review fromadriengivryOctober 2, 2025 20:45
Copilot finished work on behalf ofadriengivryOctober 2, 2025 20:45
@adriengivryadriengivry changed the titleFix material deserialization assertion when creating new projects[WIP] Fix material deserialization assertion when creating new projectsNov 7, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@adriengivryadriengivryAwaiting requested review from adriengivry

At least 1 approving review is required to merge this pull request.

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[ASSERT] Attempting to SetProperty on a non-existing property

2 participants

@adriengivry

[8]ページ先頭

©2009-2025 Movatter.jp