Error when using teleporter device or movement modulator device in Verse.

Reference ID

c62305f1-4ad5-954d-d6ee-e4914cfc9df6

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

Devices

Summary

I get an error when I activate my teleporter device or movement modulator device with Verse

Verse unrecoverable error: ErrRuntime_Internal: An internal runtime error occurred. There is no other information available.

Truncated callstack follows:
teleporter?ice:(/Fortnite.com/Devices/teleporter_device:)Teleport(:agent) (Unknown source) (Source: Unknown(0,0, 0,0))
team_manager:(/projects.epicgames.com/_7eae41eebd8d452b8c3e9f798b7cb8d8/team_manager:)TeamCaseTeleporters(:agent,:role) (Unknown source) (Source: Unknown(0,0, 0,0))
task_team_manager$TeleportChangeTeam(:role,:agent):Update (Unknown source) (Source: Unknown(0,0, 0,0))
team_manager:(/projects.epicgames.com/_7eae41eebd8d452b8c3e9f798b7cb8d8/team_manager:)HunterChoice(:volume_device) (Unknown source) (Source: Unknown(0,0, 0,0))
task_team_manager$SetUpSelectHunterTeam(:volume_device,:int):Update (Unknown source) (Source: Unknown(0,0, 0,0))

Probably it caused by activating the device with a non-spawned player or a player who left the match.

Steps to Reproduce

This bug is not a definite occurrence.

  1. Player leaves the match.
  2. Using Teleport, a function of the teleporter device in Verse

Expected Result

The player is teleported.

Observed Result

Runtime errors occur.

Platform(s)

windows

Additional Notes

We can avoid this by checking Agents with IsActive

hi @Yamabuki_Iro ,
There is several posts on runtime errors and how to trap them in Verse code with the <decides> inside a function.

What happens when verse runtime error occurs - Programming & Scripting / Verse - Epic Developer Community Forums (unrealengine.com)

<decides><transacts>

Do I use these in a function that uses the device if I want to avoid errors?

The status of FORT-752117 incident has been moved from ‘Ready for QA’ to ‘Closed’. Resolution Reason: ‘Duplicate’

Hi @Yamabuki_Iro ,

Well @Yamabuki_Iro @Punkcat ,
Wont allow me a new post so Replacing this one with
from Code Snippets Dynamic Player Teleporter Device
This has been changed to effectively adding failure recovery and when a failure occurs it retries.

The teleport function is possibly broken, this attempts to program verse code to stop runtime errors

using { /Fortnite.com/Devices }

using { /Verse.org/Simulation }

using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }

# To use this device, create a prop and attach a teleporter device to it. Ensure the teleport device
# has zero local position and rotation. Assign the prop and teleporter device to the editable
# properties and then call `TeleportAgentTo`.

dynamic_player_teleporter_device_log := class(log_channel){}

dynamic_player_teleporter_device := class(creative_device):

    Logger : log = log{Channel:=dynamic_player_teleporter_device_log}

    @editable
    TeleporterDevice: teleporter_device = teleporter_device{}

    @editable
    TeleporterRoot: creative_prop = creative_prop{}

    # Teleports an agent to a given translation and rotation. Note, only the yaw axis is used
    # on rotation by setting the teleporter rotation (if you configure your teleporter to use set player rotation)
    TeleportAgentTo(Agent: agent, Translation: vector3, Rotation: rotation):void =

        if(TeleporterRoot.TeleportTo[Translation, Rotation]):

            Logger.Print("Teleporting agent to {Translation}", ?Level:=log_level.Verbose) 

            # the attempt have worked now call the real  TeleporterDevice will not cause runtime error

            TeleporterDevice.Teleport(Agent)

        else. Logger.Print("Failed to move dynamic teleporter prop!", ?Level:=log_level.Error)
              # Try for the second time  as it may be transient
               if(TeleporterRoot.TeleportTo[Translation, Rotation]):

                     Logger.Print("Worked on second attempt Teleporting agent to {Translation}", ?Level:=log_level.Verbose)

                       TeleporterDevice.Teleport(Agent)

               else. Logger.Print("Final attempt dynamic teleporter prop!", ?Level:=log_level.Error)
               # This second else will stop a runtime error stopping Verse crashing

There may be typing and format errors, but the reason is to show the logic of stopping a runtime error then reporting the error and retrying

Can this method be used with devices?

Hi @Yamabuki_Iro ,

See update post above
There is an example Teleporter Device Verse code at example
Teleporter Device Verse Youtube Example

Please upvote: Teleport Device Randomly Causes Runtime Errors

Thank you!
I’ll watch it!

1 Like

I voted!
Maybe this is what caused it.
https://forums.unrealengine.com/t/critical-bug-causing-runtime-error/1882712

1 Like

It would be interesting to see if that is one causes. I’ve been unable to pinpoint anything thus far.