Xcode App Crash-When connecting to the ODATA services [on hold]
- by user3685677
Can someone help me resolving the following issue:
When trying to connect from iPad app to SAP ECC system through ODATA channel services via SUP, it is allowing me to login for the first time and could retrieve the data successfully from SAP system. But when I logout and try logging in again with the same session, application gets crashed. Below is the crash report for your reference.
I am using SDM Parser to connect the SAP system.
SDMODataServiceDocumentParser *sdmDocParser = [[SDMODataServiceDocumentParser alloc] init];
[sdmDocParser parse:aServiceDocument];
m_serviceDocument = sdmDocParser.serviceDocument;
//Load the object with metadata xml:
SDMODataMetaDocumentParser *sdmMetadataParser = [[SDMODataMetaDocumentParser alloc] initWithServiceDocument:m_serviceDocument];
[sdmMetadataParser parse:aMetadata];
After initiated the service, setting the URL.
[service setServiceDocumentUrl:m_serviceDocumentURL];
Using SDMconnectivityhelper to connect the URL
id<SDMRequesting> serviceDocumentRequest2 = [connectivityHelper executeBasicSyncRequestWithQuery3:[[ODataQuery alloc]initWithURL:[NSURL URLWithString:encodedStrUrl]]] ;
- (id <SDMRequesting>)executeBasicSyncRequestWithQuery3:(ODataQuery *)aQuery
{
id<SDMRequesting> request = [self createRequestWithQuery:aQuery];
[request setTimeOutSeconds:TIMEOUT_SEC];
[request setRequestMethod:@"GET"];
[request addRequestHeader:@"Content-Type" value:@"application/xml"];
[request startSynchronous];**[App getting CRASH in this line]**
return request;
}
- (id <SDMRequesting>)createRequestWithQuery:(ODataQuery *)aQuery
{
if (isSUPMode)
{
[SDMRequestBuilder setRequestType:SUPRequestType];
}
else
{
[SDMRequestBuilder setRequestType:HTTPRequestType];
}
id <SDMRequesting> request = [SDMRequestBuilder requestWithURL:aQuery.URL];
request.username = self.username;
request.password = self.password;
return request;
}
Crash Report:-
Incident Identifier: 347511BA-5F7F-45D4-8662-D5DCD2F88EA7
CrashReporter Key: 9a4d38cf19b1a94476eb6b2170d4f56678d6ca60
Hardware Model: iPad3,4
Path: /var/mobile/Applications/F38AD64F-03F8-4A21-
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00000000
Triggered by Thread: 0
Thread 0 Crashed:
0 libsystem_platform.dylib 0x393a94c0 _platform_memmove$VARIANT $Swift + 160
1 Eby Sales Order 0x0015a2c8 0xb7000 + 668360
2 Eby Sales Order 0x0015a8b8 0xb7000 + 669880
3 Eby Sales Order 0x003331ee 0xb7000 + 2605550
4 Eby Sales Order 0x0031856e 0xb7000 + 2495854
5 Eby Sales Order 0x00338454 0xb7000 + 2626644
6 Eby Sales Order 0x000e6ad8 0xb7000 + 195288
7 Eby Sales Order 0x000e99a0 0xb7000 + 207264
8 Eby Sales Order 0x000ea442 0xb7000 + 209986
9 Eby Sales Order 0x000eb0d6 0xb7000 + 213206
10 Eby Sales Order 0x000c13d0 0xb7000 + 41936
11 Foundation 0x2ec93112 __NSFireDelayedPerform + 410
12 CoreFoundation 0x2e27ef4c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 12
13 CoreFoundation 0x2e27eb66 __CFRunLoopDoTimer + 790
14 CoreFoundation 0x2e27ceee __CFRunLoopRun + 1214
15 CoreFoundation 0x2e1e7764 CFRunLoopRunSpecific + 520
16 CoreFoundation 0x2e1e7546 CFRunLoopRunInMode + 102
17 GraphicsServices 0x331216ce GSEventRunModal + 134
18 UIKit 0x30b4688c UIApplicationMain + 1132
19 Eby Sales Order 0x000bd8da 0xb7000 + 26842
20 Eby Sales Order 0x000bd89c 0xb7000 + 26780