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

Not able to play the timeline in-game more than once #2321

Closed
Adi1614 opened this issue Jun 30, 2024 · 9 comments · Fixed by #2325
Closed

Not able to play the timeline in-game more than once #2321

Adi1614 opened this issue Jun 30, 2024 · 9 comments · Fixed by #2325
Labels
Bug 🐞 Something isn't working Needs testing We don't understand this problem fully yet

Comments

@Adi1614
Copy link

Adi1614 commented Jun 30, 2024

When I go back to my npc to re-watch the timeline, it gives an error "trying to return a previously freed instance".

I have chosen the visual novel style and I have a NPC that has a timeline associated with it, and once I interact with the NPC and try to comeback and have the same conversation (re-watch the timeline) the game crashes due to the above mentioned error. It is not an error in my scripts. It is an error in 557th line of subsystem_portraits.gd.

To Reproduce
Steps to reproduce the behavior:

  1. Make a character and make a timeline with it.
  2. Make an area 2d to trigger the timeline and finish it.
  3. Move a little further and come back to have to same conversation.
  4. See error

Expected behavior
Expected the timeline to begin again and run as it as ran the previous time.

Screenshots
image

System (please complete the following information):

  • OS: Windows
  • Godot Version: 4.2.2
  • Dialogic Version: 2.0
@Jowan-Spooner
Copy link
Collaborator

Can you share what version of dialogic 2 you use and the code you use to start that timeline?

@Owen-Tam
Copy link

Owen-Tam commented Jul 1, 2024

image
I'm facing the same error with this code, on Dialogic 2.0

@Jowan-Spooner
Copy link
Collaborator

There are many (alpha) versions of Dialogic 2, it's quite important to know which one specifically you are on. The latest release for example is Dialogic 2 alpha 14. The version is indicated in the lower left of the dialogic interface or on the dialogic home screen.

@Adi1614
Copy link
Author

Adi1614 commented Jul 1, 2024

There are many (alpha) versions of Dialogic 2, it's quite important to know which one specifically you are on. The latest release for example is Dialogic 2 alpha 14. The version is indicated in the lower left of the dialogic interface or on the dialogic home screen.

i am using dialogic 2 Alpha 15

and one thing i noticed was that, i can play only one timeline. What i mean is that I have two timelines right now, one activates when my character moves too close to the water, and the other one is the NPC one. So if I talk to the NPC and then go near the water, i will face the same error mentioned in the main post and this is true for the other way around too, that is if i go near the water and then come to my NPC to talk, it will throw that error.

Here is my script:
Screenshot 2024-07-01 212426

(script to start the dialogue)

image

(calling that function here)
This was for my NPC.

image

(This is the water detection timeline)

Don't mind the NearWater variable, I was thinking for a way to fix this issue, but that was not it.
Please look into it

@Adi1614
Copy link
Author

Adi1614 commented Jul 2, 2024

@Jowan-Spooner any fixes yet?

@Jowan-Spooner
Copy link
Collaborator

Hey @Adi1614 I have not been able to reproduce this yet. If anyone could make a Minimal Reproduction Project and share it here or send it to me on discord, that could help a lot.

@Jowan-Spooner Jowan-Spooner added Bug 🐞 Something isn't working Needs testing We don't understand this problem fully yet labels Jul 2, 2024
@Adi1614
Copy link
Author

Adi1614 commented Jul 2, 2024

test1.zip

@Jowan-Spooner i have made this small project to imitate the error. i have tried starting the dialog from every node possible to see if it makes any difference, but it didn't. Currently the dialogue is being called in the Area2D script which is associated with the NPC. You will get to know once you open it up. Thank you

Edit: Walk upto the NPC it will trigger the dialogue and then come back and then once again proceed to trigger the dialogue.

@Jowan-Spooner
Copy link
Collaborator

Thank you, I will try it right now.

@Jowan-Spooner
Copy link
Collaborator

@Adi1614 Sorry, this was autoclosed, but I'm hoping it's actually fixed on the main branch now. If you could try and let me know if it works for you now, that would be perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Something isn't working Needs testing We don't understand this problem fully yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants