Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c c+中的EXC#u坏访问+;。使用Skobbler启动导航后的字符串文件_Objective C_Skmaps - Fatal编程技术网

Objective c c+中的EXC#u坏访问+;。使用Skobbler启动导航后的字符串文件

Objective c c+中的EXC#u坏访问+;。使用Skobbler启动导航后的字符串文件,objective-c,skmaps,Objective C,Skmaps,在我更新了我的项目并引入了Pods之后,我遇到了一个奇怪的错误,只有在我成功地计算了它之后,我才想在路线上启动导航 这就是我得到一个错误的地方,我不知道它是怎么来的,因为我没有在我的代码中做任何重大更改,除了通过CocoaPods在我的项目中使用skmap,并且没有手动拖动它 // char_traits<char> template <> struct _LIBCPP_TYPE_VIS_ONLY char_traits<char> { typedef ch

在我更新了我的项目并引入了Pods之后,我遇到了一个奇怪的错误,只有在我成功地计算了它之后,我才想在路线上启动导航

这就是我得到一个错误的地方,我不知道它是怎么来的,因为我没有在我的代码中做任何重大更改,除了通过CocoaPods在我的项目中使用skmap,并且没有手动拖动它

// char_traits<char>

template <>
struct _LIBCPP_TYPE_VIS_ONLY char_traits<char>
{
typedef char      char_type;
typedef int       int_type;
typedef streamoff off_type;
typedef streampos pos_type;
typedef mbstate_t state_type;

_LIBCPP_INLINE_VISIBILITY
static void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT
    {__c1 = __c2;}
_LIBCPP_INLINE_VISIBILITY
static _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
        {return __c1 == __c2;}
_LIBCPP_INLINE_VISIBILITY
static _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
    {return (unsigned char)__c1 < (unsigned char)__c2;}

_LIBCPP_INLINE_VISIBILITY
static int compare(const char_type* __s1, const char_type* __s2, size_t __n)


    **{return memcmp(__s1, __s2, __n);}** **<------ THIS IS WHERE THE ERROR HAPPENS**



_LIBCPP_INLINE_VISIBILITY
static size_t length(const char_type* __s) {return strlen(__s);}
_LIBCPP_INLINE_VISIBILITY
static const char_type* find(const char_type* __s, size_t __n, const char_type& __a)
    {return (const char_type*)memchr(__s, to_int_type(__a), __n);}
_LIBCPP_INLINE_VISIBILITY
static char_type* move(char_type* __s1, const char_type* __s2, size_t __n)
    {return (char_type*)memmove(__s1, __s2, __n);}
_LIBCPP_INLINE_VISIBILITY
static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n)
    {
        _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
        return (char_type*)memcpy(__s1, __s2, __n);
    }
_LIBCPP_INLINE_VISIBILITY
static char_type* assign(char_type* __s, size_t __n, char_type __a)
    {return (char_type*)memset(__s, to_int_type(__a), __n);}

_LIBCPP_INLINE_VISIBILITY
static _LIBCPP_CONSTEXPR int_type  not_eof(int_type __c) _NOEXCEPT
    {return eq_int_type(__c, eof()) ? ~eof() : __c;}
_LIBCPP_INLINE_VISIBILITY
static _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
    {return char_type(__c);}
_LIBCPP_INLINE_VISIBILITY
static _LIBCPP_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT
    {return int_type((unsigned char)__c);}
_LIBCPP_INLINE_VISIBILITY
static _LIBCPP_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
    {return __c1 == __c2;}
_LIBCPP_INLINE_VISIBILITY
static _LIBCPP_CONSTEXPR int_type  eof() _NOEXCEPT
    {return int_type(EOF);}
};
编辑:主要问题是我无法获取任何堆栈跟踪。这就是全部内容,我设置了断点以显示所有异常。 这是我出错时Xcode屏幕的截图,仅此而已:


请显示符号化堆栈跟踪。这可能有助于了解什么导致崩溃。请将堆栈跟踪添加到报告中。单独的C++代码对调试目的没有什么价值。嘿,我更新了我的问题感谢更新。DEVS会检查问题(信息披露-为侦察兵工作)。请确认音频建议已经被配置:
-(void)initMap
{
SKMapView *mapView = [[SKMapView alloc] initWithFrame:CGRectMake( 0.0f, 0.0f,  CGRectGetWidth(self.view.frame), CGRectGetHeight(self.view.frame) )];


[self.view addSubview:mapView];

[SKRoutingService sharedInstance].routingDelegate = self;
[SKRoutingService sharedInstance].navigationDelegate = self;
[SKRoutingService sharedInstance].mapView = mapView;

SKRouteSettings* route = [[SKRouteSettings alloc]init];
route.startCoordinate=![CLLocationCoordinate2DMake][1](39.263671, -103.642420);
route.destinationCoordinate=CLLocationCoordinate2DMake(39.782730, -104.908250);
route.shouldBeRendered = YES; // If NO, the route will not be rendered.
route.numberOfRoutes = 1;
[[SKRoutingService sharedInstance] calculateRoute:route];
}
- (void)routingService:(SKRoutingService *)routingService didFinishRouteCalculationWithInfo:(SKRouteInformation*)routeInformation{
NSLog(@"Route is calculated.");
[routingService zoomToRouteWithInsets:UIEdgeInsetsZero]; // zoom to current route

SKNavigationSettings* navSettings = [SKNavigationSettings navigationSettings];
navSettings.navigationType=SKNavigationTypeSimulation;
navSettings.distanceFormat=SKDistanceFormatMilesFeet;
navSettings.zoomLevelConfigurations = nil;

[SKRoutingService sharedInstance].mapView.settings.displayMode = SKMapDisplayMode3D;
[[SKRoutingService sharedInstance]startNavigationWithSettings:navSettings]; //THIS IS THE LINE THAT TRIGGERS AN ERROR
}
- (void)routingServiceDidFailRouteCalculation:(SKRoutingService *)routingService{
NSLog(@"Route calculation failed.");
}