playMaker

Author Topic: Crashing on exit after using WWW actions to load user content.  (Read 824 times)

Kamaki

  • Playmaker Newbie
  • *
  • Posts: 2
Crashing on exit after using WWW actions to load user content.
« on: October 23, 2019, 02:26:43 PM »
This isn't strictly a playmaker issue but as I've programmed everything in playmaker I thought I would try my luck. Feel free to close or move the topic as appropriate though.

I've been working on a program that uses players own files in-game. The idea is that a player downloads the program, which when run looks in the local folder I've created called "mods" and loads the related content at runtime.

So far everything is going great, it's correctly loading text and sprite files without issue.
My problem is audio files, I've gotten them to load and work correctly at runtime but on exit it causes Unity to crash. In the grand scheme of things, it's probably the best time for a program to crash but it would be great if it didn't!
For sprites, I use the 'WWW Sprite' action and for text, I use the 'Load From File' action.
For audio I use the 'WWW Object Relative' action, storing each piece of audio in an array before returning to scan the directory for more files.

I've attempted to find the solution on my own but my understanding is that perhaps there's something I should be doing after loading the audio to end the importing of audio.

I've attached an image of the crash that appears, I imagine not particularly helpful but there it is.

Any ideas are appreciated!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Crashing on exit after using WWW actions to load user content.
« Reply #1 on: October 29, 2019, 03:28:08 AM »
Hi,

 yes, the action is likely having a memory leak by note clearing the www class and so you get some memory access issues down the road.

Can you update the action from the ecosystem, and let me know if you get the crash still? now the action properly dispose the www class when done.

Bye,

 Jean