Select to view content in your preferred language

org.brautaset.JSON framework error?

1551
4
07-25-2010 11:24 PM
Sing_EuChan
New Contributor
Hi,

I have downloaded and installed the ArcGIS API for iOS (Update 1) and using iPhone SDK 4.0.
I was unable to build and run the "MyFirstMapApp" code.

Subsequently, I tried to run the default sample codes (MapView) included in the SDK, but it failed to run too. In both instances, the following error was display.

is there a problem with the org.brautaset.JSON framework?

Can anyone kindly advise?

Thanks.

2010-07-26 15:14:30.529 MapViewDemo[2511:207] -JSONValue failed. Error trace is: (
    "Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Unrecognised leading character\" UserInfo=0x5c130e0 {NSLocalizedDescription=Unrecognised leading character}"
)
2010-07-26 15:14:31.411 MapViewDemo[2511:207] -JSONValue failed. Error trace is: (
    "Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Unrecognised leading character\" UserInfo=0xd8013f0 {NSLocalizedDescription=Unrecognised leading character}"
)
2010-07-26 15:14:31.413 MapViewDemo[2511:207] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSMutableArray objectAtIndex:]: index 0 beyond bounds for empty array'
*** Call stack at first throw:
(
 0   CoreFoundation                      0x02643919 __exceptionPreprocess + 185
 1   libobjc.A.dylib                     0x027915de objc_exception_throw + 47
 2   CoreFoundation                      0x02639465 -[__NSArrayM objectAtIndex:] + 261
 3   MapViewDemo                         0x00046b71 -[AGSMapView layerDidLoadHandler:] + 313
 4   Foundation                          0x00116c1d _nsnote_callback + 145
 5   CoreFoundation                      0x0261bcf9 __CFXNotificationPost_old + 745
 6   CoreFoundation                      0x0259b11a _CFXNotificationPostNotification + 186
 7   Foundation                          0x0010c7c2 -[NSNotificationCenter postNotificationName:object:userInfo:] + 134
 8   Foundation                          0x00118b05 -[NSNotificationCenter postNotificationName:object:] + 56
 9   MapViewDemo                         0x000517a9 -[AGSTiledLayerView agsLayerDidLoad:] + 72
 10  CoreFoundation                      0x025b442d __invoking___ + 29
 11  CoreFoundation                      0x025b4301 -[NSInvocation invoke] + 145
 12  Foundation                          0x0012be9a __NSThreadPerformPerform + 251
 13  CoreFoundation                      0x02624d7f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
 14  CoreFoundation                      0x025832cb __CFRunLoopDoSources0 + 571
 15  CoreFoundation                      0x025827c6 __CFRunLoopRun + 470
 16  CoreFoundation                      0x02582280 CFRunLoopRunSpecific + 208
 17  CoreFoundation                      0x025821a1 CFRunLoopRunInMode + 97
 18  GraphicsServices                    0x02ea82c8 GSEventRunModal + 217
 19  GraphicsServices                    0x02ea838d GSEventRun + 115
 20  UIKit                               0x003bab58 UIApplicationMain + 1160
 21  MapViewDemo                         0x000024e4 main + 102
 22  MapViewDemo                         0x00002475 start + 53
 23  ???                                 0x00000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'
0 Kudos
4 Replies
NimeshJarecha
Esri Regular Contributor
I'm assuming you already have iPhone SDK 4.0 installed. Are you able to build and execute samples getting installed at ~\Library\SDKs\Samples?

If possible, please upload your "MyFirstMapApp".

Regards,
Nimesh
0 Kudos
Sing_EuChan
New Contributor
I'm assuming you already have iPhone SDK 4.0 installed. Are you able to build and execute samples getting installed at ~\Library\SDKs\Samples?

If possible, please upload your "MyFirstMapApp".

Regards,
Nimesh


Hi,

We are using XCode IDE 3.23, with iPhone 4.0 SDK, targeting at iPhone 4 Simulator.

No. We are not able to build and execute samples included at ~\Library\SDKs\Samples?
Specifically, I was trying out the "MapViewDemo" sample and the error log attached previously is from building and running that sample.

As for the "MyFirstMapApp", I was following the guide found at the resource page (http://help.arcgis.com/en/arcgismobile/10.0/apis/iphone/concepts/index.html#//00pw00000047000000.htm)

In both "MapViewDemo" & "MyFirstMapApp", I had similar error logs.

Pls advise.

Thanks!
0 Kudos
VictorArellano
New Contributor
Did you ever resolve this issue? If so, what was the solution?

Thanks.

EDIT: I was having this same issue when trying to connect to two separate servers. In one instance, when connecting to the ESRI public services, the error was occurring because it couldn't resolve the address due to my system being behind a proxy. Connecting using a different method (e.g. Wifi) proved that it was the proxy on my LAN connection. In the second instance, I was attempting to connect to an internal ArcGIS server that was not located in our DMZ. By using Safari to go the service address, I realized that it was asking for authentication via the iPhone simulator. This authentication does not occur when using the desktop browser. More than likely the code is trying to connect to it, is unable to authenticate, and thus crashes with a generic error.

To be clear, verify via Safari in the simulator, that you are able to resolve the address to the MapService you are trying to access.
0 Kudos
Sunitapatil
Emerging Contributor
Please specify how to resolve this error of Error Domain=org.brautaset.JSON.ErrorDomain Code=3 "Unrecognised leading character" UserInfo=0x6312830 {NSLocalizedDescription=Unrecognised leading character} due to vpn connection

thanks in advance.........
0 Kudos