Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: LoftyTheMetroid on October 28, 2015, 05:13:11 PM

Title: Circular References in Custom Action Crashes Unity
Post by: LoftyTheMetroid on October 28, 2015, 05:13:11 PM
(Note: I posted this using the PlayMaker bug reporter within Unity, but I couldn't attach a repro project afterwards like I thought I would be able to. I'm attaching it here instead. Link to original bug report here: https://hutonggames.fogbugz.com/default.asp?1349_9ghg44jvi45ft8ct (https://hutonggames.fogbugz.com/default.asp?1349_9ghg44jvi45ft8ct).)

If a custom PlayMaker Action has a reference to a ScriptableObject that has a circular reference with another ScriptableObject, then right-clicking a transition to bring up the context menu will crash Unity. By circular reference, I mean a ScriptableObject that has a reference to another ScriptableObject that, in turn, has a reference to the first ScriptableObject. (It may not be limited to ScriptableObjects, that's just where I noticed it.)

The easiest way to understand this is to simply download and unzip the repro project at this link:
[ADMIN: LINK REMOVED SINCE THE PROJECT INCLUDED PLAYMAKER, PLEASE ALSO REMOVE THE FILE FROM DROPBOX]

Simply open up the Test scene, open the PlayMakerFSM in the PlayMaker Editor, and right-click the only existing transition in the FSM.

Any advice/help would be greatly appreciated. I'm currently needing to resort to hacky workarounds to avoid the circular references. (I have no idea why the right-click context menu should even be exploring references of references in the first place...)
Title: Re: Circular References in Custom Action Crashes Unity
Post by: Alex Chouls on October 28, 2015, 06:32:31 PM
Thanks for the bug report. I downloaded the repro project but removed the download link since it included Playmaker. Please also remove the file from dropbox, thanks!

For future reference you should be able to add an attachment to the bug after you get a link to it, or you can include a drop box link in the bug report (so it isn't generally available).
Title: Re: Circular References in Custom Action Crashes Unity
Post by: LoftyTheMetroid on October 28, 2015, 07:40:38 PM
Thanks, sorry, I wasn't thinking about that. I will remove the Dropbox project.

I can't figure out how to add an attachment to the bug report, though, or edit it to include the Dropbox link. There are no options to do so on my screen. Am I supposed to send an attachment to the given email address on the page, cases@hutonggames.fogbugz.com?

I tried logging in, but I don't seem to have an account there, and there is no option to register for one that I can find.
Title: Re: Circular References in Custom Action Crashes Unity
Post by: Alex Chouls on October 28, 2015, 09:42:43 PM
If you reply to the bug email and attach the file to your email it should show up in the bug report so others can download it... You shouldn't need an account to see any bugs you've submitted.
Title: Re: Circular References in Custom Action Crashes Unity
Post by: LoftyTheMetroid on October 29, 2015, 01:13:33 AM
Right, I could see the bug report page, I just assumed that there would be a means within the page to attach the repro project. There wasn't an indication in the FogBugz email that replying with an attachment would automatically add it to the bug report page.

Regardless, please take a look at the repro and let me know what you think or if you're getting the same results, and ask me if you have questions. We've encountered this bug multiple times in the past and I usually just reorganize my code to accommodate it, but this time I finally felt compelled to make a repro project and submit a bug report.
Title: Re: Circular References in Custom Action Crashes Unity
Post by: LoftyTheMetroid on November 12, 2015, 01:13:14 AM
Any update on this? Were you able to reproduce the bug with the repro project?