Trying to connect to AppWarp is very unstable with Mac app built with UNITY

0 votes

Lately I am having many problems when connecting to the AppWrp server from an OSX app built with Unity.

iOS builds work perfectly. Even when I have my Unity build platform set to OSX  and run IN the editor it works perfectly.

I only have problems with the final OSX app that Unity builds.

A call to WarpClient.GetInstance().Connect() sometimes is successful and sometimes not.

Amd even if successful the connection drops quickly.

I am using AppWarpUnity,dll (v1.7.6) in my project AppWarp folder. But I think the version is not a problem as everything works with iOS builds and when testing in the editor

NOTE: Also in my project Appwarp folder is App42_Unity3D_SDK_2.9.3.dll

closed with the note: Closing this thread as there was no update from last 2 Weeks or more. Please raise a new query if problem persists.
asked Oct 18, 2014 in AppWarp by huffman (17 points)
closed Aug 17, 2015 by sushil
I tried the same tests on an old 2005 MacBook running OSX 10.6.8 but with the same Unity 4.5.5. UnityConnectionResiliencySample is perfectly stable in the editor and never gives errors, but a built Mac App is unstable here too. I can successfully connect/Join/Subscribe/Chat but it often crashes instead of hangs. Especially if I try to Subscribe more than once. I put the crash log in dropbox:
I think I found the problem...64-bit builds are not supported. When I build and select Architecture x86_64 I have these problems. But if I use x86 then there is no problem.
Yes this could be the reason. I was testing the 32-bit build. I will test it on 64bit also and will let you know. I will investigate more to understand what happens when building for 64-bit systems.
Well I got it running perfectly in a Mac build if I do a simple x86 build instead of a x86_64. Now I got another problem. Testing on iOS with the latest dlls (v1.10 AppWarpUnityMobile) just trying to connect causes a crash. So to make sure it was not my game I copied that AppWarpUnityMobile into the UnityConnectionResiliencySample project and built for iOS.

When I run it, it crashes. I can see it in xcode in the cleanup routine running in thread 7 "[UnityWWWConnectionDelegate cleanup]":

+ (NSMutableURLRequest*)newRequestForHTTPMethod:(NSString*)method url:(NSURL*)url headers:(NSDictionary*)headers
    static Class targetClass = nil;
    if(targetClass == nil)
        targetClass = NSClassFromString([NSString stringWithUTF8String:WWWRequestProviderClassName]);
        NSAssert([targetClass conformsToProtocol:@protocol(UnityWWWRequestProvider)], @"You MUST implement UnityWWWRequestProvider protocol");

    return [targetClass allocRequestForHTTPMethod:method url:url headers:headers];

- (void)cleanup
    [_url release];
    _url = nil;

    [_responseHeader release]; Thread 7:EXC_BAD_ACCESS (code=1, address=0x18)
    _responseHeader = nil;

    [_connection cancel];
    [_connection release];
    _connection = nil;

    [_data release];
    _data = nil;
I found that the problem mentioned in my previous post is due to a problem with Unity 4.5.5 when running on Mavericks. To narrow it down I did some tests:

Mavericks   xcode 6.1   Unity 4.5.5            -crashes
Mavericks   xcode 6.1   Unity 4.5.4p3            -good

Mavericks   xcode 5.1.1  Unity 4.5.5            -crashes
Mavericks   xcode 5.1.1  Unity 4.5.4p3            -good

Mountain Lion  xcode 5.1.1  Unity 4.5.5            -good
Mountain Lion  xcode 5.1.1  Unity 4.5.4p3        -good

As you can see it is the combination of Mavericks and Unity 4.5.5.
It must not be the xcode version because Unity 4.5.5 crashes with both xcode 6.1 & xcode 5.1.1.
Also Unity 4.5.5 doesn’t crash on Mountain Lion. I didn’t test it with xcode 6.1 on Mountain Lion

I also notified Unity about this problem. For the mean time when I build to iOS I will use Unity 4.5.4.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on