4ian / GDevelop

🎮 Open-source, cross-platform 2D/3D/multiplayer game engine designed for everyone.
https://gdevelop.io
Other
10.81k stars 848 forks source link

Weird behavior and potential project corruption if you copy a scene with sliders #6894

Open TheRealSoloLeo opened 1 month ago

TheRealSoloLeo commented 1 month ago

Is there an existing issue for this?

Describe the bug

Copying a scene with a slider in it and pasting it in a different project can corrupt the project.

Steps to reproduce

  1. Create a new project
  2. Click on "Add a new object"
  3. Select "slider"
  4. This happened with "Square White Slider", I haven't tested if it works with the other ones
  5. Copy the scene
  6. Create a new project and paste the scene with the slider in it
  7. The slider is now a corrupted object
  8. If you don't delete the object before closing the project GDevelop will refuse to open it and say it's corrupted

GDevelop platform

Desktop, Web, Mobile

GDevelop version

5.4.209

Platform info

*Windows* > *Windows 11* >

Additional context

I also put an instance of the object in the scene before copying it, I don't know if this is necessary to reproduce the bug.

The only way to recover the project is by manually deleting the slider in the json.

ClementPasteau commented 1 month ago

Thanks for the report @TheRealSoloLeo

@D8H is looking into it.

D8H commented 1 month ago

The issue happens when:

The error message is "Error: Event-based objects don't have blueprint. This method should not never be called.".

As a workaround :

4ian commented 1 month ago

@D8H What can we do to fix the issue?