Application crashes on Switch, but only when NOT connected to Target Manager

Options
Hi

We got PUN connecting, creating a room, joining a room and syncing scenes yesterday on Switch hardware. All works well in the editor, on a PC build, and on Switch hardware and with one player connecting on PC and the other on Switch works fine too...

The problem is that as soon as we try running the Switch build while not connected to the Target Manager, the application crashes (and tells us to connect to Target Manager to debug)

This seems to happen with any Photon call or callback even just PhotonNetwork.ConnectUsingSettings() or PhotonNetwork.JoinRandomRoom(). If connected to TM all is fine (and no errors showing) but disconnected it crashes straight away as soon as a Photon call is made.

If we connect to TM again after a crash the log suggests something to do with filesystem. Does Photon try to connect back to TM specifically on Switch for logging purposes, and if so is there a way to turn that off, or suppress those logs?

The actual error we get is:

****** FS ERROR INFORMATION ******
Error: Error occurred at ReadFile().
nn::fs::ResultTargetNotFound: Error: Specified target is not found.
More infomation may be provided by enabling 'FS Access Log Mode' at 'DevMenu: Debug'.

I've posted on the Nintendo dev forums so hoping to get some info there, but since this is specific to Photon I sus[ect we might just get referred back here. This is a blocker for us right now as we can't proceed into gameplay code until we can test on 2 Switch units and only one can be connected to TM at a time.

Any ideas?

Many thanks

Billy
Art of Play Games

Comments

  • Billy_aop
    Options
    UPDATE

    With more testing it seems that the error doesn't occur with "any Photon call or callback" as we suspected, but on scene changes whether handled using Photon or not.

    The issue only occurs after implementing Photon into a project, but the error isn't thrown specifically when calling Photon code so it seems that maybe some setting gets changed by implementing Photon.

    The only change I can see in Player settings is the following gets added under "Scripting Define Symbols" in "Other Settings"

    PHOTON_UNITY_NETWORKING;PUN_2_0_OR_NEWER;PUN_2_OR_NEWER;PUN_2_19_OR_NEWER

    I have tried deleting this to test if it had any effect, but it gets auto-populated again on compile.

    Any idea if that could be related, or anything about simply having the Photon assets installed which would affect the build's dependence on being connected to the Switch's Target Manager application?

    Billy
  • Billy_aop
    Options
    I'm still struggling with this. Any ideas at all?

    Since implementing Photon the game crashes every time there is a scene change. Nintendo support just verified what the error suggested (It sounds like your application is trying to read a file from the host PC but it can't because there is no host/target connection (i.e., the devkit is not connected to Target Manager) and that is the reason for the crash.)

    Is there something in Photon which would be trying to do that? We're making zero progress with this - we can test fine on PC, or on Switch while connected to TM for debugging, but as soon as we install a build on a standalone Switch it crashes every time.

    Any help/ideas would be much appreciated.

    Thanks

    Billy
  • Billy_aop
    Options
    This is the full error message, viewable after reconnecting TM:



    ****** FS ERROR INFORMATION ******
    Error: Error occurred at GetEntryType().
    nn::fs::ResultTargetNotFound: Error: Specified target is not found.
    More infomation may be provided by enabling 'FS Access Log Mode' at 'DevMenu: Debug'.

    AbortObserver called:
    Failed: nnFsResult
    Module: 2
    Description: 1002
    InnerValue: 0x0007d402
    D:\Home\teamcity\work\sdk\Programs\Chris\Sources\Libraries\fs\fsa\fs_UserFileSystem.cpp:143, function GetEntryType, condition nn::Result::IsSuccess()
    [Dump Error] Failed to read environment variable USERPROFILE.