【问题标题】:Aviary SDK crash on initializing on iOS在 iOS 上初始化时 Aviary SDK 崩溃
【发布时间】:2014-07-29 05:41:13
【问题描述】:

我在我的应用中集成了 Aviary SDK 以增强我的应用图像编辑器功能。我阅读了它的文档,运行了它的示例代码,它运行良好。但是在我的应用程序上运行时,我遇到了一个问题。它在运行一个方法后崩溃了 EXC_BAD_ACCESS

[AFOpenGLManager beginOpenGLLoad];

我按照 Aviary 文档中的设置指南进行操作 https://developers.aviary.com/docs/ios/setup-guide#project-setup

起初,我只是创建一个 Singleton 管理器来管理。我调用 [AFOpenGLManager beginOpenGLLoad];关于初始化函数

- (id)init {
     if (self = [super init]) {        
         [AFOpenGLManager beginOpenGLLoad];
     }
     return self;
}

- (void) launchPhotoEditorWithImage:(UIImage *)editingResImage
            highResolutionImage:(UIImage *)highResImage
                 fromController:(UIViewController *)controller
{
       // Customize the editor's apperance. The customization options really only need to be set       
       once in this case since they are never changing, so we used dispatch once here.
       static dispatch_once_t onceToken;
       dispatch_once(&onceToken, ^{
             [self setPhotoEditorCustomizationOptions];
       });

       // Initialize the photo editor and set its delegate
       AFPhotoEditorController * photoEditor = [[[AFPhotoEditorController alloc]   
                                            initWithImage:editingResImage] autorelease];
       [photoEditor setDelegate:self];

       // If a high res image is passed, create the high res context with the image and the 
       photo editor.
       if (highResImage) {
            [self setupHighResContextForPhotoEditor:photoEditor withImage:highResImage];
       }

       // Present the photo editor.
       [controller presentViewController:photoEditor animated:YES completion:nil];
}

在运行init函数后,它崩溃了

我错过了什么吗,示例代码运行良好。

编辑 1: compileShader 是从 createProgram 调用的,但我可以阅读此方法

编辑 2: 我意识到一些事情。我的应用项目有一个名为 libmediastreamer_voip.a 的库。我认为存在误解。我的意思是也许 Aviary lib 和 libmediastreamer_voip.a lib 也有名为 compileShader 的函数。因此,当在 Aviary lib 上调用 compileShader 时,它在 Aviary lib 上的 compileShader 上运行,但在 libmediastreamer_voip.a 上运行到 compileShader。 我想我会是这样吗?我创建了一个新项目并集成了 Avairy SDK,它运行良好,只是集成到我的应用程序它崩溃

【问题讨论】:

  • 你能显示调用compileShader方法的方法吗?
  • 嗨@Sauvage,我不知道是哪个方法调用了compileShader,可能是从Aviary lib中调用的,我无法触摸。
  • 如果您在导航器中点击createProgram in Thread 18,您将看到此方法
  • 嗨@Sauvage我无法阅读方法createProgram,我已经更新了我的问题。我搜索了所有项目但没有获取 createProgram 方法,我认为它包含在一个库中

标签: ios aviary


【解决方案1】:

我是 Aviary 的 iOS 团队的成员。这是由我们的 compileShader 函数和您的函数之间的冲突引起的。我们的函数没有正确命名空间并导致冲突。我们将在 SDK 的下一版本中解决这个问题。

迈克尔

【讨论】:

  • 太好了,有什么办法可以解决,因为我项目中的另一个 compileShader 函数似乎在另一个静态库中,我也无法触摸它
【解决方案2】:

我是怎么想的。检查您的 shader 值。它应该具有来自您的资源或其他具有适当类型(GL_VERTEX_SHADERGL_FRAGMENT_SHADER)的正确着色器路径。

在我看来你是零

【讨论】:

  • 感谢您的建议,但我无法触摸'shader'值,我不知道它来自哪里。
猜你喜欢
  • 2018-03-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-01-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多