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

Background holder has dangling reference to removed viewport #1957

Closed
Pheubel opened this issue Dec 16, 2023 · 0 comments · Fixed by #1958
Closed

Background holder has dangling reference to removed viewport #1957

Pheubel opened this issue Dec 16, 2023 · 0 comments · Fixed by #1958
Labels
Bug 🐞 Something isn't working

Comments

@Pheubel
Copy link
Contributor

Pheubel commented Dec 16, 2023

The problem

When switching from a background with a custom scene to a background with an invalid scene or no custom scene, it does not reset the 'current_viewport' meta data. This causes problems later on as when it is fetched instead of null, it is a reference to a freed resource.

To Reproduce
Steps to reproduce the behavior:

  1. create timeline
  2. add background with custom scene
  3. add background with no custom scene
  4. add another background with a custom scene.
  5. add text events in between to prevent the timeline from speeding through it.
  6. test the timeline.

Expected behavior
There should be no halt caused by a freed resource, instead the timeline should have moved onto the next event.

Screenshots
image

System (please complete the following information):

  • OS: [e.g. Windows, Linux]
  • Godot Version: [e.g. 3.2.3]
  • Dialogic Version: 2.11 (main - commit b96d4aa)

Solution

When no new viewport is available, it should remove the meta data for the current_scene, so that when it attempts to retrieve it will get null as a default value instead. That way the rest of the event will flow as expected.

@Pheubel Pheubel changed the title Background holder has dnagling reference to Background holder has dangling reference to removed viewport Dec 16, 2023
@Jowan-Spooner Jowan-Spooner added the Bug 🐞 Something isn't working label Dec 18, 2023
@Jowan-Spooner Jowan-Spooner added this to the Version 2.0 (beta) milestone Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants