Build crashes but Unity works

Options
I am using Unity 4.6 and PUN. If I test the game in Unity it works fine. It joins a room and Instantiates my player. If I build the game it gets stuck and locks up. The game runs in the back but it never joins a lobby nor a room. I tried reverse engineering the problem and it starts once I add :

if (PhotonNetwork.connectionState != ConnectionState.Connected){
// PhotonNetwork.isMessageQueueRunning = true;
PhotonNetwork.ConnectUsingSettings("0.1");
}

If I put the full code in I get "ConnectedToNameServer" in the OnGui and it locks up. What am I doing wrong? After a while it will change to "PeerCreated".

Thanks in advance for any help,
Russell

Comments

  • Were you able to run the PUN demos? That will help determine if it's a connection or code issue.

    If it runs, try making a web player version. See if that runs.

    The reason being is that I also noticed a lock up when I tried to create a desktop app of my game.
  • Betazero
    Options
    Works great in a web player... So what could be the problem with the desktop app? I am using the OSX 64 bit
  • Betazero wrote:
    Works great in a web player... So what could be the problem with the desktop app? I am using the OSX 64 bit

    I am using OSX64 bit as well

    On my PC desktop builds work fine.

    This may b an issue with a closed port.
  • Betazero
    Options
    I don't even have firewall turned on. Maybe this is a bug? Whats weird is I can get the marco - polo demo to work with build... not sure what it has that my app does not have...
  • Same here.

    I can get the PUN demo working BUT not when I roll my own.

    I don't have much time when I do this stuff over the weekend but if I found out, I promise to share my findings with you and everyone else.

    Tobias might be able to chime in at some point. I might just do some googling as well.
  • Betazero
    Options
    I don't give up, so if I find out I will post my finding as well.
  • Betazero
    Options
    Its the X86_64. Change it to regular X86 and it works... Not sure why
  • Maybe it's running in 32bit mode? Aight! Thanks!
  • Tobias
    Options
    OSX builds at the moment don't run as 64bit build. I assume this is a Unity issue. In best case, you submit it as bug to them and use x86 for the time being.
  • Just setting up PUN for new project which has 64 bits dependencies, and running into the same issue so unable to do a mac build. Is this confirmed to be a unity bug and is there any update from their side?

    Thanks!
  • Tobias
    Options
    I didn't get any input from Unity yet. I don't know if they classify it as a Unity bug. Afaik, C# defines the bytes per base type and maybe that is not respected in 64bit exports.
    Could you report it as bug to Unity and send me the case number (only the number - not the fogbugz link). I can submit it too and see what our contacts say.
  • Tobias
    Options
    I just tested Unity 5 Beta 12 on Mac and x86, x86_64 as well as Universal builds run fine.
    There's hope Unity 4.x also gets the fixes.