Reference to other Actor + Keep Simulation Changes = Crash

I fixed this in this GitHub commit, but I guess it didn’t make it into 4.5.1. This will certainly be in the upcoming 4.6 release, so this should sort out your issue! I’d recommend getting a GitHub repository set up, as it can be handy for applying hotfixes like this - but if this is a maintenance hassle, you should find it easy just to bring the changes for this commit over to your local repository by hand, as it’s just a single file, and doesn’t depend on any other changes.

Let me know if this fixes your problem!

hello.

I can confirm this is fixed in the 4.6 preview. I can now keep a reference to another actor in a member variable, be it as a regular Actor pointer var, or inside an array. so thanks :slight_smile:

but

like I pointed out to I moved on to the next step, and like I foresaw it came with problems.

what I’m doing now is doing a two-way referencing. actor A (the character) keeps a reference to actor B (his house), while actor B (the house) also keeps a reference to actor A (the owner of the house).

so I simulate, let the guy go buy his house, select both the guy and the house, hit K, and get an instant crash. this time around I can’t even go as far as having to press Stop Simulation, the crash is instant after pressing K.

I was already foreseeing this would be potentially dangerous (circular-referencing like that) but I wouldn’t think this is so exotic (I can think of a game with a character holding an inventory item like a weapon, and the weapon knows about his Owner. this is how it was in UT3 in unrealscript, and something similar is probably going on in ShooterGame since they are so alike)

so if this is not the correct way to do it, could I maybe get pointed into how?

thanks

just tried this with the newly released full 4.6

Keeping the Simulation Changes of 2 actors that reference eachother still crashes

[edit: realized I’m still using the preview -_- but I’m updating now]

Hi ,

I don’t think this is the error, however I just want to check to be safe. Have you made changes to your code to reflect the new code changes from 4.6? You can find information on what has changed in the C++ sections of the Release Notes, found here: Unreal Engine 4.6 Released! - Announcements - Epic Developer Community Forums!

I’ve already made the changes to my code, yes. this still causes a crash

but as I said I realized I’m still using 4.6 preview. as soon as the upgrade to final 4.6 is done I’ll test this again and will report back

it’s finished updating

I can confirm that Keeping the Simulation Changes of 2 actors that reference eachother still crashes, on full 4.6, having applied the C++ changes from the release notes (and 's post in the forums)

Hi ,

Can you upload your most recent callstack and logs after crashing?

hi ,

sure. most recent callstack and log:

link text

link text

remember you also have my sources for reproducing :slight_smile: - just simulate, wait a minute, select the character that went inside the box on the right, also select the box, press K, crash

thanks again

hey , thanks for the update

cheers,

Hi ,

I passed the callstack and log on to be assessed and will post again once I have more information. I just wanted to update you to let you know we are still looking at this.

Hi ,

Do you have any steps that we can take to reproduce this on our end?

heloo ,

once again the steps (already did above!),

open the test scene, press Simulate, wait for te characters to move to the boxes, select the character that went into the smaller box, selct it and wait for the properties to refresh (check the AI Lifestyle vars group), wait a few seconds, now with the character still selected also select the box, press K, crash

Hi ,

Unfortunately I no longer have a copy of your project and the filedropper link sent in a previous message is no longer populated, which is why I was asking. If you want to send another link with the project attached I can get it and see what we can do. Or, if you have repro steps that do not require your project we can attempt to repro it on our end without you having to upload your project again. Thank you!

Hi again,

I just sent you the link to my Project files via PM in the forums again.

I wonder why you guys deleted them on your end. like I told you I was already anticipating the problem would only be partially solved. and this question keeps getting marked as resolved, despite it’s been more than 8 months now and the problem is still there X_X

once again here are the repro steps:

  1. compile the project of course
  2. open eTestMap.umap, and start Simulate
  3. wait for the AI characters to go to the Place Volume Actors
  4. still simulating, select the character that went to the smaller of the two volumes. check its properties
  5. under the “AI Life” category of the properties check the array of HomePlaces. when the AI character “buys” the place this array will have a new element created, with a reference to the new place
  6. with the character still selected, now also select the Place Volume Actor that he went into, press K (keep simulation changes), stop simulating, and it will crash

thanks again

Hey ,

I have great news! After the past few weeks of digging, it looks like this has finally been resolved in editor. We are not seeing it in 4.7 so it may be available with the next engine release. Please keep an eye out to see if this ends up helping!

nice to hear!

is this included in the 4.7 preview or should I wait for a new relase?

I think it should be ok in the preview however I am not 100% certain as I tried this on an internal build from a later build date.I believe it should work, however.

just tested it in the 4.7 preview and it still crashes. I’ll wait for the next release :slight_smile:

hi again. just dropping by to say that this crash still happens in the 4.7 preview 3

I’ll check with the developers to see at what point the fix should be live for users.