playMaker

Author Topic: Circular References in Custom Action Crashes Unity  (Read 2240 times)

LoftyTheMetroid

  • Playmaker Newbie
  • *
  • Posts: 11
    • View Profile
Circular References in Custom Action Crashes Unity
« on: October 28, 2015, 02: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.)

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...)
« Last Edit: October 28, 2015, 03:25:44 PM by Alex Chouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3637
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Circular References in Custom Action Crashes Unity
« Reply #1 on: October 28, 2015, 03: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).

LoftyTheMetroid

  • Playmaker Newbie
  • *
  • Posts: 11
    • View Profile
Re: Circular References in Custom Action Crashes Unity
« Reply #2 on: October 28, 2015, 04: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.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3637
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Circular References in Custom Action Crashes Unity
« Reply #3 on: October 28, 2015, 06: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.

LoftyTheMetroid

  • Playmaker Newbie
  • *
  • Posts: 11
    • View Profile
Re: Circular References in Custom Action Crashes Unity
« Reply #4 on: October 28, 2015, 10:13:33 PM »
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.

LoftyTheMetroid

  • Playmaker Newbie
  • *
  • Posts: 11
    • View Profile
Re: Circular References in Custom Action Crashes Unity
« Reply #5 on: November 11, 2015, 11:13:14 PM »
Any update on this? Were you able to reproduce the bug with the repro project?