Numerous crashes on crashlytics

0 votes
Hi, This is what I got from Crashlytics: Fatal Exception: NSInvalidArgumentException 0 CoreFoundation 0x1822bad8c __exceptionPreprocess 1 libobjc.A.dylib 0x1814745ec objc_exception_throw 2 CoreFoundation 0x1822c8098 __methodDescriptionForSelector 3 CoreFoundation 0x1822c05c8 ___forwarding___ 4 CoreFoundation 0x1821a641c _CF_forwarding_prep_0 0x102cfa750 -[ClientChannel sendData:] (ClientChannel.m:346) 0x102d04db0 -[WarpClient sendChat:] (WarpClient.m:1900) Unfortunately, I do not know which version I have. But, I may have downloaded in May of 2016. Thank you, Vasilis
asked May 17, 2018 in iOS by info (16 points)

1 Answer

0 votes
I see these crashes on Organizer in Crashes section.
answered May 17, 2018 by info (16 points)
Apologies for the delayed response.
Are you able to reproduce this in your debugging?
No, I can't
Does the stack trace help you to identity the issue?
Not yet. Is it coming on any specific version of iOS or on all versions?
I have crashes on 11.3.1 (iPhone), and on 9.3.5 (iPad)
On Friday, I downloaded and installed the latest version of your SDK (just in case), but I still have this crash (iPhone 6s 11.3.1).
On Crashlytics I see that it crashed because it called the method "hasSpaceAvailable". Do you call this method in the ClientChannel class?
Yes, we are calling this on the instance of NSOutputStream. It is a read only property of type BOOL of this class. Below is the code where it is used:

- (void)sendData:(NSData *)data
{
    [list addObject:data];
    if([outputStream hasSpaceAvailable])
    {
        if ([list count]!=0)
        {
            keepAliveTask.keepAliveWatchDog = NO;
            NSData *data = [list objectAtIndex:0];
            if (data) {
                [outputStream write:[data bytes] maxLength:[data length]];
                [list removeObject:data];
            }
        }
    }
}
Great, This crash means that the outputStream object is nil.
I have added the check for nil for outputStream object. Please download the updated SDK from here(http://cdn.shephertz.com/repository/files/b7915f2fca1fb7f53f4f519d6d79dae11b7c948ccc5511ef5ad9d19eceb6376f/ae01b50edd4f06ac9df4ef66040d5ddd057a49fb/AppWarp_iOS_SDK.zip).
Please let me know if you have any query.
Is it safe to add this to production?
Which version should I use? The AppWarp_iOS_SDK 2.framework ?
This is latest SDK built by adding this nil object check. I have tried to reproduce this issue at my end but everything works. As per your feedback that the issue might be due to the nil object of outputStream object, I have added this check. You can go ahead and perform some testing at your end too and then you can go for production. You can use it as version 2.1.3.
I will, but it is the AppWarp_iOS_SDK 2.framework, right?
Inside the zip file, Framework name is "AppWarp_iOS_SDK.framework". May be when you unzipped, there were already one file available on the download location hence automatically 2 was appended in the name.
I think that the bug was fixed!!
Two days have passed since the new version was released and I do not have any crash.
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 support@shephertz.com
...