Error in IOS builds while Creating/leaving rooms

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

gs_vamseemohan
Posts: 14
Joined: 07 Aug 2013, 07:50

Error in IOS builds while Creating/leaving rooms

Postby gs_vamseemohan » 21 Oct 2013, 17:22

Hi,

I've been struggling with an issue on IOS builds, where the game crashes just the moment i try to leave a room i created. On windows8 phone /android and windows desktop there are no such errors, everything is fine there.

So, i've isolated the problem into a sample application. Here are the steps to reproduce the same(with the sample i attached)
1. unzip and import the unitypackage into a fresh unity package (on a mac, since the problem is only with IOS builds)
2. build and deploy it on any IOS device.
3. After the UDP_INIT debug log message pops up, press the 'Create Match' button on the left top.
4. After the room is created and room is joined (check the onscreen debug log message) ......... press the Leave Room Button ( top 2nd left button)

The App would crash with all the default settings in unity project.

Now, if i go to Player settings and change the 'Stripping level' from 'Disabled' to 'Strip assemblies' (Under Optimizations ), and make the build again, and repeat the above test, there is no Crashes!!!

Well, if i do the same changes to my final Application, i can't even connect to the server, and i get the Socket errors : (when i do strip assemblies).

Please help...
heres the sample :
https://dl.dropboxusercontent.com/u/381 ... OStest.zip
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Error in IOS builds while Creating/leaving rooms

Postby Lapo » 22 Oct 2013, 08:55

Hi,
it sounds like a Unity problem, unfortunately. We have seen some of these in particular with iOS where you get a crash in the native code that can't be reproduced under the C# environment (be it Mono or .Net).

When we get these sort of reports it's kind of difficult to provide meaningful answers or workarounds because there's literally a black box between the API and the final result (e.g. the crash on the device). Meaning that the black box is what Unity does when converting the C# bytecode into native ARM assembly.

Do you have a transcript of the error that you get when the app crashes creating or leaving a Room?

thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
gs_vamseemohan
Posts: 14
Joined: 07 Aug 2013, 07:50

Re: Error in IOS builds while Creating/leaving rooms

Postby gs_vamseemohan » 22 Oct 2013, 12:48

hi Lapo,

Heres the log on XCODE :

Code: Select all

2013-10-22 17:44:29.878 thegame[446:707] -> registered mono modules 0x10b0840
-> applicationDidFinishLaunching()
-> applicationDidBecomeActive()
Mono path[0] = '/var/mobile/Applications/BA4785C5-73C6-47B4-A202-A8021BD2B208/thegame.app/Data/Managed'
Mono config path = '/var/mobile/Applications/BA4785C5-73C6-47B4-A202-A8021BD2B208/thegame.app/Data/Managed'
Renderer: PowerVR SGX 535
Vendor:   Imagination Technologies
Version:  OpenGL ES 2.0 IMGSGX535-63.24
GL_OES_depth_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_float GL_OES_texture_half_float GL_OES_vertex_array_object GL_EXT_blend_minmax GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_read_format_bgra GL_EXT_separate_shader_objects GL_EXT_shader_texture_lod GL_EXT_texture_filter_anisotropic GL_APPLE_framebuffer_multisample GL_APPLE_rgb_422 GL_APPLE_texture_format_BGRA8888 GL_APPLE_texture_max_level GL_IMG_read_format GL_IMG_texture_compression_pvrtc
Creating OpenGLES2.0 graphics device
Initialize engine version: 4.2.1f4 (4d30acc925c2)
Begin MonoManager ReloadAssembly
Platform assembly: /var/mobile/Applications/BA4785C5-73C6-47B4-A202-A8021BD2B208/thegame.app/Data/Managed/UnityEngine.dll (this message is harmless)
Loading /var/mobile/Applications/BA4785C5-73C6-47B4-A202-A8021BD2B208/thegame.app/Data/Managed/UnityEngine.dll into Unity Child Domain
Non platform assembly: /private/var/mobile/Applications/BA4785C5-73C6-47B4-A202-A8021BD2B208/thegame.app/Data/Managed/Mono.Security.dll (this message is harmless)
Non platform assembly: /private/var/mobile/Applications/BA4785C5-73C6-47B4-A202-A8021BD2B208/thegame.app/Data/Managed/System.dll (this message is harmless)
Platform assembly: /var/mobile/Applications/BA4785C5-73C6-47B4-A202-A8021BD2B208/thegame.app/Data/Managed/Assembly-CSharp.dll (this message is harmless)
Loading /var/mobile/Applications/BA4785C5-73C6-47B4-A202-A8021BD2B208/thegame.app/Data/Managed/Assembly-CSharp.dll into Unity Child Domain
Non platform assembly: /private/var/mobile/Applications/BA4785C5-73C6-47B4-A202-A8021BD2B208/thegame.app/Data/Managed/SmartFox2X.dll (this message is harmless)
Platform assembly: /var/mobile/Applications/BA4785C5-73C6-47B4-A202-A8021BD2B208/thegame.app/Data/Managed/SmartFox2X.dll (this message is harmless)
Loading /var/mobile/Applications/BA4785C5-73C6-47B4-A202-A8021BD2B208/thegame.app/Data/Managed/SmartFox2X.dll into Unity Child Domain
- Completed reload, in  0.172 seconds
Client Version : 1.4.0
 
(Filename: /Applications/buildAgent/work/cac08d8a5e25d4cb/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 54)

connected
 
(Filename: /Applications/buildAgent/work/cac08d8a5e25d4cb/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 54)

Username : BVM5828854186
 
(Filename: /Applications/buildAgent/work/cac08d8a5e25d4cb/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 54)

Logging in...
 
(Filename: /Applications/buildAgent/work/cac08d8a5e25d4cb/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 54)

Logged in
 
(Filename: /Applications/buildAgent/work/cac08d8a5e25d4cb/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 54)

UDPINIT PASSED ... ready to create rooms
 
(Filename: /Applications/buildAgent/work/cac08d8a5e25d4cb/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 54)

calling Create Match
 
(Filename: /Applications/buildAgent/work/cac08d8a5e25d4cb/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 54)

Searching ...
 
(Filename: /Applications/buildAgent/work/cac08d8a5e25d4cb/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 54)

Creating room
 
(Filename: /Applications/buildAgent/work/cac08d8a5e25d4cb/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 54)

(OnRoomAdd) Room < 7029333967 > created
 
(Filename: /Applications/buildAgent/work/cac08d8a5e25d4cb/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 54)

Joined the room [Room: 7029333967, Id: 11604, GroupId: default]
 
(Filename: /Applications/buildAgent/work/cac08d8a5e25d4cb/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 54)

Waiting for Second Player
 
(Filename: /Applications/buildAgent/work/cac08d8a5e25d4cb/Runtime/ExportGenerated/iPhonePlayer-armv7/UnityEngineDebug.cpp Line: 54)

* Assertion at generic-sharing.c:711, condition `oti' not met

(lldb)


This is all the debug log i can access to. Please let me know if you need more info on this to debug.

Thanks
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Error in IOS builds while Creating/leaving rooms

Postby Lapo » 22 Oct 2013, 13:10

The error at the end is definitely "Unity stuff", it doesn't even look like it's got anything to do with the network.
Lapo

--

gotoAndPlay()

...addicted to flash games
gs_vamseemohan
Posts: 14
Joined: 07 Aug 2013, 07:50

Re: Error in IOS builds while Creating/leaving rooms

Postby gs_vamseemohan » 22 Oct 2013, 14:19

It may be related to unity3d, but this crash happens primarily only with the network sample, particularly while leaving a room.
Is LeaveRoomRequest the only option to leave a room, or are there any other options to get the same result ?? (SFS2x docs are currently unavailable)

I'll post the same across unity forums to seek help in the mean time.

Thanks for you help so far.
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Error in IOS builds while Creating/leaving rooms

Postby Lapo » 22 Oct 2013, 15:02

If you check the report you have posted earlier there is nothing that even get closer to the SFS API. This makes it pretty difficult to even guess what might be going on, unfortunately. If that's the only error that shows up it looks like the error is caused by the UnityEngine.

Code: Select all

Assertion at generic-sharing.c:711, condition `oti' not met


This error shows up in a couple of posts over at the Unity forums:
http://forum.unity3d.com/threads/126210 ... ti-not-met
http://forum.unity3d.com/threads/180255 ... OS-problem

The first one indicates a possible problem with the compiler... That's all I have found about the error.

If you want to experiment a little try commenting out all of the code in the LEAVE_ROOM event, so that basically no code is executed and see if you get the same issue. At least this would restrict a little bit the area that causes the problem. If the crash is due to the code inside the handler maybe you can do further experimentation otherwise I don't think we'll find an easy solution for this :(
Lapo

--

gotoAndPlay()

...addicted to flash games
gs_vamseemohan
Posts: 14
Joined: 07 Aug 2013, 07:50

Re: Error in IOS builds while Creating/leaving rooms

Postby gs_vamseemohan » 23 Oct 2013, 09:06

Yes, i did comment out leaving the room part (new LeaveRoomRequest ()).
And all is good. (this is clearly illustrated in the sample i attached).

As long as i stay in the room its fine, also as long as i dont join any room and call leaveroom is also fine.
But once i join any room, and then i call leave room, the crash occurs.

I suspect it has to do something with the callbacks somewhere because of the leaveroom, but im not really sure. Still experimenting on it.
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Error in IOS builds while Creating/leaving rooms

Postby Lapo » 23 Oct 2013, 12:09

Not exactly. My question was to simply leave the Room Leave event handler empty but still sending the request to leave the Room.
Does that produce errors?
I am sorry I am not able to test at the moment as I don't have an iOS device close at hand.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 62 guests