CEGUI throws EXC_BAD_ACCESS in XCode 10

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

freedee15
Just popping in
Just popping in
Posts: 4
Joined: Thu Aug 29, 2019 14:38

CEGUI throws EXC_BAD_ACCESS in XCode 10

Postby freedee15 » Thu Aug 29, 2019 14:52

Hello everyone, I'm having some issues using CEGUI with XCode 10. I'm trying to follow the tutorials found here:

http://static.cegui.org.uk/docs/0.8.7/rendering_tutorial.html

However I'm unable to even create a bootstrap system. (I've also tried the manual object creation it suggests, it also doesn't work).
I can build the project successfully, however at runtime it throws a EXC_BAD_ACCESS error.

The code I'm using is this:

Code: Select all

#include <iostream>
#include <CEGUI/CEGUI.h>
#include <CEGUI/RendererModules/OpenGL/GL3Renderer.h>
#include <GLFW/glfw3.h>
using namespace CEGUI;

int main() {
   
    glfwInit();
   
    OpenGL3Renderer& myRenderer = OpenGL3Renderer::bootstrapSystem();
   
    System::getSingleton().renderAllGUIContexts();
   
    glfwTerminate();
   
}


I'm using the libraries libCEGUIBase-0.dylib, libCEGUIOpenGLRenderer-0.dylib, libglfw3.a, as well as the OpenGL, Cocoa, IOKit and CoreVideo frameworks available directly from XCode.

Here is how the error appears in the thread:

Code: Select all

#include <iostream>
#include <CEGUI/CEGUI.h>
#include <CEGUI/RendererModules/OpenGL/GL3Renderer.h>
#include <GLFW/glfw3.h>
using namespace CEGUI;

int main() {
   
    glfwInit();
   
    OpenGL3Renderer& myRenderer = OpenGL3Renderer::bootstrapSystem(); //<-Thread 1: EXC_BAD_ACCESS (code=1, address=0x3b0)
   
    System::getSingleton().renderAllGUIContexts();
   
    glfwTerminate();
   
}

Code: Select all

libCEGUIOpenGLRenderer-0.dylib`CEGUI::OpenGL3Renderer::bootstrapSystem:
    0x10038ce30 <+0>:    pushq  %rbp
    0x10038ce31 <+1>:    movq   %rsp, %rbp
    0x10038ce34 <+4>:    pushq  %r15
    0x10038ce36 <+6>:    pushq  %r14
    0x10038ce38 <+8>:    pushq  %rbx
    0x10038ce39 <+9>:    subq   $0x238, %rsp              ; imm = 0x238
    0x10038ce40 <+16>:   movl   %edi, %ebx
    0x10038ce42 <+18>:   movq   $0x0, -0x28(%rbp)
    0x10038ce4a <+26>:   movl   $0x20, %eax
    0x10038ce4f <+31>:   movq   %rax, %xmm0
    0x10038ce54 <+36>:   pslldq $0x8, %xmm0               ; xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7]
    0x10038ce59 <+41>:   movdqa %xmm0, -0xd0(%rbp)
    0x10038ce61 <+49>:   pxor   %xmm0, %xmm0
    0x10038ce65 <+53>:   movdqa %xmm0, -0xc0(%rbp)
    0x10038ce6d <+61>:   movl   $0x0, -0xa8(%rbp)
    0x10038ce77 <+71>:   movq   $0x0, -0xb0(%rbp)
    0x10038ce82 <+82>:   leaq   -0xd0(%rbp), %r14
    0x10038ce89 <+89>:   movl   $0x51, %esi
    0x10038ce8e <+94>:   movq   %r14, %rdi
    0x10038ce91 <+97>:   callq  0x1003a0718               ; symbol stub for: CEGUI::String::grow(unsigned long)
    0x10038ce96 <+102>:  cmpq   $0x20, -0xc8(%rbp)
    0x10038ce9e <+110>:  leaq   -0xa8(%rbp), %r15
    0x10038cea5 <+117>:  movq   -0x28(%rbp), %rax
    0x10038cea9 <+121>:  cmovbeq %r15, %rax
    0x10038cead <+125>:  movaps 0x160ec(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 32
    0x10038ceb4 <+132>:  movups %xmm0, (%rax)
    0x10038ceb7 <+135>:  movaps 0x160f2(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 48
    0x10038cebe <+142>:  movups %xmm0, 0x10(%rax)
    0x10038cec2 <+146>:  movaps 0x160f7(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 64
    0x10038cec9 <+153>:  movups %xmm0, 0x20(%rax)
    0x10038cecd <+157>:  movaps 0x160fc(%rip), %xmm1      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 80
    0x10038ced4 <+164>:  movups %xmm1, 0x30(%rax)
    0x10038ced8 <+168>:  movaps 0x16101(%rip), %xmm2      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 96
    0x10038cedf <+175>:  movups %xmm2, 0x40(%rax)
    0x10038cee3 <+179>:  movaps 0x16106(%rip), %xmm3      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 112
    0x10038ceea <+186>:  movups %xmm3, 0x50(%rax)
    0x10038ceee <+190>:  movaps 0x1610b(%rip), %xmm4      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 128
    0x10038cef5 <+197>:  movups %xmm4, 0x60(%rax)
    0x10038cef9 <+201>:  movaps 0x16110(%rip), %xmm5      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 144
    0x10038cf00 <+208>:  movups %xmm5, 0x70(%rax)
    0x10038cf04 <+212>:  movups %xmm0, 0x80(%rax)
    0x10038cf0b <+219>:  movups %xmm1, 0x90(%rax)
    0x10038cf12 <+226>:  movups %xmm2, 0xa0(%rax)
    0x10038cf19 <+233>:  movups %xmm3, 0xb0(%rax)
    0x10038cf20 <+240>:  movups %xmm4, 0xc0(%rax)
    0x10038cf27 <+247>:  movaps 0x160f2(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 160
    0x10038cf2e <+254>:  movups %xmm0, 0xd0(%rax)
    0x10038cf35 <+261>:  movaps 0x160f4(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 176
    0x10038cf3c <+268>:  movups %xmm0, 0xe0(%rax)
    0x10038cf43 <+275>:  movaps 0x160f6(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 192
    0x10038cf4a <+282>:  movups %xmm0, 0xf0(%rax)
    0x10038cf51 <+289>:  movaps 0x160f8(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 208
    0x10038cf58 <+296>:  movups %xmm0, 0x100(%rax)
    0x10038cf5f <+303>:  movaps 0x160fa(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 224
    0x10038cf66 <+310>:  movups %xmm0, 0x110(%rax)
    0x10038cf6d <+317>:  movaps 0x160fc(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 240
    0x10038cf74 <+324>:  movups %xmm0, 0x120(%rax)
    0x10038cf7b <+331>:  movdqa 0x160fd(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 254
    0x10038cf83 <+339>:  movdqu %xmm0, 0x130(%rax)
    0x10038cf8b <+347>:  movl   $0x29, 0x140(%rax)
    0x10038cf95 <+357>:  movq   $0x51, -0xd0(%rbp)
    0x10038cfa0 <+368>:  movq   -0x28(%rbp), %rax
    0x10038cfa4 <+372>:  cmovbeq %r15, %rax
    0x10038cfa8 <+376>:  movl   $0x0, 0x144(%rax)
    0x10038cfb2 <+386>:  movl   $0xd0, %edi
    0x10038cfb7 <+391>:  movl   %ebx, %esi
    0x10038cfb9 <+393>:  movq   %r14, %rdx
    0x10038cfbc <+396>:  callq  0x1003a0730               ; symbol stub for: CEGUI::System::performVersionTest(int, int, CEGUI::String const&)
    0x10038cfc1 <+401>:  leaq   -0xd0(%rbp), %rdi
    0x10038cfc8 <+408>:  callq  0x1003a071e               ; symbol stub for: CEGUI::String::~String()
    0x10038cfcd <+413>:  callq  0x1003a072a               ; symbol stub for: CEGUI::System::getSingletonPtr()
    0x10038cfd2 <+418>:  testq  %rax, %rax
    0x10038cfd5 <+421>:  jne    0x10038d1bc               ; <+908>
    0x10038cfdb <+427>:  movl   $0xd0, %edi
    0x10038cfe0 <+432>:  callq  0x10038d6c0               ; CEGUI::OpenGL3Renderer::create(int)
    0x10038cfe5 <+437>:  movq   %rax, %r14      //<-Thread 1: EXC_BAD_ACCESS (code=1, address=0x3b0)
    0x10038cfe8 <+440>:  movl   $0xd0, %edi
    0x10038cfed <+445>:  callq  0x1003a0820               ; symbol stub for: operator new(unsigned long)
    0x10038cff2 <+450>:  movq   %rax, %rbx
    0x10038cff5 <+453>:  movq   $0x0, 0xb0(%rax)
    0x10038d000 <+464>:  movl   $0x20, %eax
    0x10038d005 <+469>:  movq   %rax, %xmm0
    0x10038d00a <+474>:  pslldq $0x8, %xmm0               ; xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7]
    0x10038d00f <+479>:  movdqu %xmm0, 0x8(%rbx)
    0x10038d014 <+484>:  movl   $0x0, 0x30(%rbx)
    0x10038d01b <+491>:  movq   $0x0, 0x28(%rbx)
    0x10038d023 <+499>:  movq   $0x0, 0x20(%rbx)
    0x10038d02b <+507>:  movq   $0x0, 0x18(%rbx)
    0x10038d033 <+515>:  movq   0x180be(%rip), %rax       ; (void *)0x000000010060de68: vtable for CEGUI::DefaultResourceProvider
    0x10038d03a <+522>:  addq   $0x10, %rax
    0x10038d03e <+526>:  movq   %rax, (%rbx)
    0x10038d041 <+529>:  leaq   0xc0(%rbx), %rax
    0x10038d048 <+536>:  movq   $0x0, 0xc8(%rbx)
    0x10038d053 <+547>:  movq   $0x0, 0xc0(%rbx)
    0x10038d05e <+558>:  movq   %rax, 0xb8(%rbx)
    0x10038d065 <+565>:  movq   $0x0, -0x28(%rbp)
    0x10038d06d <+573>:  movdqa %xmm0, -0x190(%rbp)
    0x10038d075 <+581>:  movdqa %xmm0, -0xd0(%rbp)
    0x10038d07d <+589>:  pxor   %xmm0, %xmm0
    0x10038d081 <+593>:  movdqa %xmm0, -0xc0(%rbp)
    0x10038d089 <+601>:  movl   $0x0, -0xa8(%rbp)
    0x10038d093 <+611>:  movq   $0x0, -0xb0(%rbp)
    0x10038d09e <+622>:  leaq   -0xd0(%rbp), %rdi
    0x10038d0a5 <+629>:  xorl   %esi, %esi
    0x10038d0a7 <+631>:  callq  0x1003a0718               ; symbol stub for: CEGUI::String::grow(unsigned long)
    0x10038d0ac <+636>:  cmpq   $0x20, -0xc8(%rbp)
    0x10038d0b4 <+644>:  movq   $0x0, -0xd0(%rbp)
    0x10038d0bf <+655>:  jbe    0x10038d0c5               ; <+661>
    0x10038d0c1 <+657>:  movq   -0x28(%rbp), %r15
    0x10038d0c5 <+661>:  movl   $0x0, (%r15)
    0x10038d0cc <+668>:  movq   $0x0, -0xd8(%rbp)
    0x10038d0d7 <+679>:  movdqa -0x190(%rbp), %xmm0
    0x10038d0df <+687>:  movdqa %xmm0, -0x180(%rbp)
    0x10038d0e7 <+695>:  pxor   %xmm0, %xmm0
    0x10038d0eb <+699>:  movdqa %xmm0, -0x170(%rbp)
    0x10038d0f3 <+707>:  movl   $0x0, -0x158(%rbp)
    0x10038d0fd <+717>:  movq   $0x0, -0x160(%rbp)
    0x10038d108 <+728>:  leaq   -0x180(%rbp), %r15
    0x10038d10f <+735>:  movl   $0x9, %esi
    0x10038d114 <+740>:  movq   %r15, %rdi
    0x10038d117 <+743>:  callq  0x1003a0718               ; symbol stub for: CEGUI::String::grow(unsigned long)
    0x10038d11c <+748>:  cmpq   $0x20, -0x178(%rbp)
    0x10038d124 <+756>:  leaq   -0x158(%rbp), %rax
    0x10038d12b <+763>:  movq   -0xd8(%rbp), %rcx
    0x10038d132 <+770>:  cmovbeq %rax, %rcx
    0x10038d136 <+774>:  movaps 0x15f53(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 272
    0x10038d13d <+781>:  movups %xmm0, (%rcx)
    0x10038d140 <+784>:  movdqa 0x16138(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 766
    0x10038d148 <+792>:  movdqu %xmm0, 0x10(%rcx)
    0x10038d14d <+797>:  movl   $0x67, 0x20(%rcx)
    0x10038d154 <+804>:  movq   $0x9, -0x180(%rbp)
    0x10038d15f <+815>:  cmovaq -0xd8(%rbp), %rax
    0x10038d167 <+823>:  movl   $0x0, 0x24(%rax)
    0x10038d16e <+830>:  movq   %r15, (%rsp)
    0x10038d172 <+834>:  movl   $0xd0, 0x8(%rsp)
    0x10038d17a <+842>:  leaq   -0xd0(%rbp), %r9
    0x10038d181 <+849>:  xorl   %edx, %edx
    0x10038d183 <+851>:  xorl   %ecx, %ecx
    0x10038d185 <+853>:  xorl   %r8d, %r8d
    0x10038d188 <+856>:  movq   %rbx, %rsi
    0x10038d18b <+859>:  movq   %r14, %rdi
    0x10038d18e <+862>:  callq  0x1003a0736               ; symbol stub for: CEGUI::System::create(CEGUI::Renderer&, CEGUI::ResourceProvider*, CEGUI::XMLParser*, CEGUI::ImageCodec*, CEGUI::ScriptModule*, CEGUI::String const&, CEGUI::String const&, int)
    0x10038d193 <+867>:  leaq   -0x180(%rbp), %rdi
    0x10038d19a <+874>:  callq  0x1003a071e               ; symbol stub for: CEGUI::String::~String()
    0x10038d19f <+879>:  leaq   -0xd0(%rbp), %rdi
    0x10038d1a6 <+886>:  callq  0x1003a071e               ; symbol stub for: CEGUI::String::~String()
    0x10038d1ab <+891>:  movq   %r14, %rax
    0x10038d1ae <+894>:  addq   $0x238, %rsp              ; imm = 0x238
    0x10038d1b5 <+901>:  popq   %rbx
    0x10038d1b6 <+902>:  popq   %r14
    0x10038d1b8 <+904>:  popq   %r15
    0x10038d1ba <+906>:  popq   %rbp
    0x10038d1bb <+907>:  retq   
    0x10038d1bc <+908>:  movl   $0x380, %edi              ; imm = 0x380
    0x10038d1c1 <+913>:  callq  0x1003a0826               ; symbol stub for: __cxa_allocate_exception
    0x10038d1c6 <+918>:  movq   %rax, %r14
    0x10038d1c9 <+921>:  movq   $0x0, -0x28(%rbp)
    0x10038d1d1 <+929>:  movl   $0x20, %eax
    0x10038d1d6 <+934>:  movq   %rax, %xmm0
    0x10038d1db <+939>:  pslldq $0x8, %xmm0               ; xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7]
    0x10038d1e0 <+944>:  movdqa %xmm0, -0xd0(%rbp)
    0x10038d1e8 <+952>:  pxor   %xmm0, %xmm0
    0x10038d1ec <+956>:  movdqa %xmm0, -0xc0(%rbp)
    0x10038d1f4 <+964>:  movl   $0x0, -0xa8(%rbp)
    0x10038d1fe <+974>:  movq   $0x0, -0xb0(%rbp)
    0x10038d209 <+985>:  leaq   -0xd0(%rbp), %rdi
    0x10038d210 <+992>:  movl   $0x2c, %esi
    0x10038d215 <+997>:  callq  0x1003a0718               ; symbol stub for: CEGUI::String::grow(unsigned long)
    0x10038d21a <+1002>: cmpq   $0x20, -0xc8(%rbp)
    0x10038d222 <+1010>: movq   -0x28(%rbp), %rax
    0x10038d226 <+1014>: cmovbeq %r15, %rax
    0x10038d22a <+1018>: movaps 0x15e5f(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 272
    0x10038d231 <+1025>: movups %xmm0, (%rax)
    0x10038d234 <+1028>: movaps 0x15e65(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 288
    0x10038d23b <+1035>: movups %xmm0, 0x10(%rax)
    0x10038d23f <+1039>: movaps 0x15e6a(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 304
    0x10038d246 <+1046>: movups %xmm0, 0x20(%rax)
    0x10038d24a <+1050>: movaps 0x15e6f(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 320
    0x10038d251 <+1057>: movups %xmm0, 0x30(%rax)
    0x10038d255 <+1061>: movaps 0x15e74(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 336
    0x10038d25c <+1068>: movups %xmm0, 0x40(%rax)
    0x10038d260 <+1072>: movaps 0x15e79(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 352
    0x10038d267 <+1079>: movups %xmm0, 0x50(%rax)
    0x10038d26b <+1083>: movaps 0x15e7e(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 368
    0x10038d272 <+1090>: movups %xmm0, 0x60(%rax)
    0x10038d276 <+1094>: movaps 0x15e83(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 384
    0x10038d27d <+1101>: movups %xmm0, 0x70(%rax)
    0x10038d281 <+1105>: movaps 0x15e88(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 400
    0x10038d288 <+1112>: movups %xmm0, 0x80(%rax)
    0x10038d28f <+1119>: movaps 0x15e8a(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 416
    0x10038d296 <+1126>: movups %xmm0, 0x90(%rax)
    0x10038d29d <+1133>: movaps 0x15e8c(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 432
    0x10038d2a4 <+1140>: movups %xmm0, 0xa0(%rax)
    0x10038d2ab <+1147>: movq   $0x2c, -0xd0(%rbp)
    0x10038d2b6 <+1158>: cmovaq -0x28(%rbp), %r15
    0x10038d2bb <+1163>: movl   $0x0, 0xb0(%r15)
    0x10038d2c6 <+1174>: movq   $0x0, -0xd8(%rbp)
    0x10038d2d1 <+1185>: movl   $0x20, %eax
    0x10038d2d6 <+1190>: movq   %rax, %xmm0
    0x10038d2db <+1195>: pslldq $0x8, %xmm0               ; xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7]
    0x10038d2e0 <+1200>: movdqa %xmm0, -0x180(%rbp)
    0x10038d2e8 <+1208>: pxor   %xmm0, %xmm0
    0x10038d2ec <+1212>: movdqa %xmm0, -0x170(%rbp)
    0x10038d2f4 <+1220>: movl   $0x0, -0x158(%rbp)
    0x10038d2fe <+1230>: movq   $0x0, -0x160(%rbp)
    0x10038d309 <+1241>: leaq   -0x180(%rbp), %rdi
    0x10038d310 <+1248>: movl   $0x52, %esi
    0x10038d315 <+1253>: callq  0x1003a0718               ; symbol stub for: CEGUI::String::grow(unsigned long)
    0x10038d31a <+1258>: cmpq   $0x20, -0x178(%rbp)
    0x10038d322 <+1266>: leaq   -0x158(%rbp), %rax
    0x10038d329 <+1273>: movq   -0xd8(%rbp), %rcx
    0x10038d330 <+1280>: cmovbeq %rax, %rcx
    0x10038d334 <+1284>: movaps 0x15e05(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 448
    0x10038d33b <+1291>: movups %xmm0, (%rcx)
    0x10038d33e <+1294>: movaps 0x15e0b(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 464
    0x10038d345 <+1301>: movups %xmm0, 0x10(%rcx)
    0x10038d349 <+1305>: movaps 0x15e10(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 480
    0x10038d350 <+1312>: movups %xmm0, 0x20(%rcx)
    0x10038d354 <+1316>: movaps 0x15e15(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 496
    0x10038d35b <+1323>: movups %xmm0, 0x30(%rcx)
    0x10038d35f <+1327>: movaps 0x15e1a(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 512
    0x10038d366 <+1334>: movups %xmm0, 0x40(%rcx)
    0x10038d36a <+1338>: movaps 0x15e1f(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 528
    0x10038d371 <+1345>: movups %xmm0, 0x50(%rcx)
    0x10038d375 <+1349>: movaps 0x15e24(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 544
    0x10038d37c <+1356>: movups %xmm0, 0x60(%rcx)
    0x10038d380 <+1360>: movaps 0x15e29(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 560
    0x10038d387 <+1367>: movups %xmm0, 0x70(%rcx)
    0x10038d38b <+1371>: movaps 0x15e2e(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 576
    0x10038d392 <+1378>: movups %xmm0, 0x80(%rcx)
    0x10038d399 <+1385>: movaps 0x15e30(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 592
    0x10038d3a0 <+1392>: movups %xmm0, 0x90(%rcx)
    0x10038d3a7 <+1399>: movaps 0x15e32(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 608
    0x10038d3ae <+1406>: movups %xmm0, 0xa0(%rcx)
    0x10038d3b5 <+1413>: movaps 0x15e34(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 624
    0x10038d3bc <+1420>: movups %xmm0, 0xb0(%rcx)
    0x10038d3c3 <+1427>: movaps 0x15e36(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 640
    0x10038d3ca <+1434>: movups %xmm0, 0xc0(%rcx)
    0x10038d3d1 <+1441>: movaps 0x15e38(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 656
    0x10038d3d8 <+1448>: movups %xmm0, 0xd0(%rcx)
    0x10038d3df <+1455>: movaps 0x15e3a(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 672
    0x10038d3e6 <+1462>: movups %xmm0, 0xe0(%rcx)
    0x10038d3ed <+1469>: movaps 0x15e3c(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 688
    0x10038d3f4 <+1476>: movups %xmm0, 0xf0(%rcx)
    0x10038d3fb <+1483>: movaps 0x15e3e(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 704
    0x10038d402 <+1490>: movups %xmm0, 0x100(%rcx)
    0x10038d409 <+1497>: movaps 0x15e40(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 720
    0x10038d410 <+1504>: movups %xmm0, 0x110(%rcx)
    0x10038d417 <+1511>: movaps 0x15e42(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 736
    0x10038d41e <+1518>: movups %xmm0, 0x120(%rcx)
    0x10038d425 <+1525>: movaps 0x15e44(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 752
    0x10038d42c <+1532>: movups %xmm0, 0x130(%rcx)
    0x10038d433 <+1539>: movabsq $0x7000000070, %rdx       ; imm = 0x7000000070
    0x10038d43d <+1549>: movq   %rdx, 0x140(%rcx)
    0x10038d444 <+1556>: movq   $0x52, -0x180(%rbp)
    0x10038d44f <+1567>: cmovaq -0xd8(%rbp), %rax
    0x10038d457 <+1575>: movl   $0x0, 0x148(%rax)
    0x10038d461 <+1585>: movq   $0x0, -0x198(%rbp)
    0x10038d46c <+1596>: movl   $0x20, %eax
    0x10038d471 <+1601>: movq   %rax, %xmm0
    0x10038d476 <+1606>: pslldq $0x8, %xmm0               ; xmm0 = zero,zero,zero,zero,zero,zero,zero,zero,xmm0[0,1,2,3,4,5,6,7]
    0x10038d47b <+1611>: movdqa %xmm0, -0x240(%rbp)
    0x10038d483 <+1619>: pxor   %xmm0, %xmm0
    0x10038d487 <+1623>: movdqa %xmm0, -0x230(%rbp)
    0x10038d48f <+1631>: movl   $0x0, -0x218(%rbp)
    0x10038d499 <+1641>: movq   $0x0, -0x220(%rbp)
    0x10038d4a4 <+1652>: leaq   -0x240(%rbp), %rdi
    0x10038d4ab <+1659>: movl   $0x51, %esi
    0x10038d4b0 <+1664>: callq  0x1003a0718               ; symbol stub for: CEGUI::String::grow(unsigned long)
    0x10038d4b5 <+1669>: cmpq   $0x20, -0x238(%rbp)
    0x10038d4bd <+1677>: leaq   -0x218(%rbp), %rax
    0x10038d4c4 <+1684>: movq   -0x198(%rbp), %rcx
    0x10038d4cb <+1691>: cmovbeq %rax, %rcx
    0x10038d4cf <+1695>: movaps 0x15aca(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 32
    0x10038d4d6 <+1702>: movups %xmm0, (%rcx)
    0x10038d4d9 <+1705>: movaps 0x15ad0(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 48
    0x10038d4e0 <+1712>: movups %xmm0, 0x10(%rcx)
    0x10038d4e4 <+1716>: movaps 0x15ad5(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 64
    0x10038d4eb <+1723>: movups %xmm0, 0x20(%rcx)
    0x10038d4ef <+1727>: movaps 0x15ada(%rip), %xmm1      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 80
    0x10038d4f6 <+1734>: movups %xmm1, 0x30(%rcx)
    0x10038d4fa <+1738>: movaps 0x15adf(%rip), %xmm2      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 96
    0x10038d501 <+1745>: movups %xmm2, 0x40(%rcx)
    0x10038d505 <+1749>: movaps 0x15ae4(%rip), %xmm3      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 112
    0x10038d50c <+1756>: movups %xmm3, 0x50(%rcx)
    0x10038d510 <+1760>: movaps 0x15ae9(%rip), %xmm4      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 128
    0x10038d517 <+1767>: movups %xmm4, 0x60(%rcx)
    0x10038d51b <+1771>: movaps 0x15aee(%rip), %xmm5      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 144
    0x10038d522 <+1778>: movups %xmm5, 0x70(%rcx)
    0x10038d526 <+1782>: movups %xmm0, 0x80(%rcx)
    0x10038d52d <+1789>: movups %xmm1, 0x90(%rcx)
    0x10038d534 <+1796>: movups %xmm2, 0xa0(%rcx)
    0x10038d53b <+1803>: movups %xmm3, 0xb0(%rcx)
    0x10038d542 <+1810>: movups %xmm4, 0xc0(%rcx)
    0x10038d549 <+1817>: movaps 0x15ad0(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 160
    0x10038d550 <+1824>: movups %xmm0, 0xd0(%rcx)
    0x10038d557 <+1831>: movaps 0x15ad2(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 176
    0x10038d55e <+1838>: movups %xmm0, 0xe0(%rcx)
    0x10038d565 <+1845>: movaps 0x15ad4(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 192
    0x10038d56c <+1852>: movups %xmm0, 0xf0(%rcx)
    0x10038d573 <+1859>: movaps 0x15ad6(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 208
    0x10038d57a <+1866>: movups %xmm0, 0x100(%rcx)
    0x10038d581 <+1873>: movaps 0x15ad8(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 224
    0x10038d588 <+1880>: movups %xmm0, 0x110(%rcx)
    0x10038d58f <+1887>: movaps 0x15ada(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 240
    0x10038d596 <+1894>: movups %xmm0, 0x120(%rcx)
    0x10038d59d <+1901>: movdqa 0x15adb(%rip), %xmm0      ; typeinfo name for CEGUI::OpenGL3GeometryBuffer + 254
    0x10038d5a5 <+1909>: movdqu %xmm0, 0x130(%rcx)
    0x10038d5ad <+1917>: movl   $0x29, 0x140(%rcx)
    0x10038d5b7 <+1927>: movq   $0x51, -0x240(%rbp)
    0x10038d5c2 <+1938>: cmovaq -0x198(%rbp), %rax
    0x10038d5ca <+1946>: movl   $0x0, 0x144(%rax)
    0x10038d5d4 <+1956>: movb   $0x1, %r15b
    0x10038d5d7 <+1959>: leaq   -0xd0(%rbp), %rsi
    0x10038d5de <+1966>: leaq   -0x180(%rbp), %rdx
    0x10038d5e5 <+1973>: leaq   -0x240(%rbp), %r8
    0x10038d5ec <+1980>: movl   $0x4d, %ecx
    0x10038d5f1 <+1985>: movq   %r14, %rdi
    0x10038d5f4 <+1988>: callq  0x10038fe00               ; CEGUI::InvalidRequestException::InvalidRequestException(CEGUI::String const&, CEGUI::String const&, int, CEGUI::String const&)
    0x10038d5f9 <+1993>: xorl   %r15d, %r15d
    0x10038d5fc <+1996>: movq   0x17a9d(%rip), %rsi       ; (void *)0x00000001003a5960: typeinfo for CEGUI::InvalidRequestException
    0x10038d603 <+2003>: movq   0x17a2e(%rip), %rdx       ; (void *)0x000000010038d6b0: CEGUI::RendererException::~RendererException()
    0x10038d60a <+2010>: movq   %r14, %rdi
    0x10038d60d <+2013>: callq  0x1003a084a               ; symbol stub for: __cxa_throw
    0x10038d612 <+2018>: ud2   
    0x10038d614 <+2020>: movq   %rax, %rbx
    0x10038d617 <+2023>: movb   $0x1, %r15b
    0x10038d61a <+2026>: jmp    0x10038d638               ; <+2056>
    0x10038d61c <+2028>: movq   %rax, %rbx
    0x10038d61f <+2031>: movb   $0x1, %r15b
    0x10038d622 <+2034>: jmp    0x10038d644               ; <+2068>
    0x10038d624 <+2036>: movq   %rax, %rbx
    0x10038d627 <+2039>: jmp    0x10038d655               ; <+2085>
    0x10038d629 <+2041>: movq   %rax, %rbx
    0x10038d62c <+2044>: leaq   -0x240(%rbp), %rdi
    0x10038d633 <+2051>: callq  0x1003a071e               ; symbol stub for: CEGUI::String::~String()
    0x10038d638 <+2056>: leaq   -0x180(%rbp), %rdi
    0x10038d63f <+2063>: callq  0x1003a071e               ; symbol stub for: CEGUI::String::~String()
    0x10038d644 <+2068>: leaq   -0xd0(%rbp), %rdi
    0x10038d64b <+2075>: callq  0x1003a071e               ; symbol stub for: CEGUI::String::~String()
    0x10038d650 <+2080>: testb  %r15b, %r15b
    0x10038d653 <+2083>: je     0x10038d698               ; <+2152>
    0x10038d655 <+2085>: movq   %r14, %rdi
    0x10038d658 <+2088>: callq  0x1003a0844               ; symbol stub for: __cxa_free_exception
    0x10038d65d <+2093>: movq   %rbx, %rdi
    0x10038d660 <+2096>: callq  0x1003a0700               ; symbol stub for: _Unwind_Resume
    0x10038d665 <+2101>: ud2   
    0x10038d667 <+2103>: movq   %rax, %rbx
    0x10038d66a <+2106>: leaq   -0x180(%rbp), %rdi
    0x10038d671 <+2113>: callq  0x1003a071e               ; symbol stub for: CEGUI::String::~String()
    0x10038d676 <+2118>: jmp    0x10038d68c               ; <+2140>
    0x10038d678 <+2120>: movq   %rax, %rbx
    0x10038d67b <+2123>: leaq   -0xd0(%rbp), %rdi
    0x10038d682 <+2130>: callq  0x1003a071e               ; symbol stub for: CEGUI::String::~String()
    0x10038d687 <+2135>: jmp    0x10038d698               ; <+2152>
    0x10038d689 <+2137>: movq   %rax, %rbx
    0x10038d68c <+2140>: leaq   -0xd0(%rbp), %rdi
    0x10038d693 <+2147>: callq  0x1003a071e               ; symbol stub for: CEGUI::String::~String()
    0x10038d698 <+2152>: movq   %rbx, %rdi
    0x10038d69b <+2155>: callq  0x1003a0700               ; symbol stub for: _Unwind_Resume
    0x10038d6a0 <+2160>: ud2   
    0x10038d6a2 <+2162>: movq   %rax, %rdi
    0x10038d6a5 <+2165>: callq  0x10038aad0               ; __clang_call_terminate
    0x10038d6aa <+2170>: nopw   (%rax,%rax)

Code: Select all

libGL.dylib`glGetString:
    0x7fff5262ee01 <+0>:  pushq  %rbp
    0x7fff5262ee02 <+1>:  movq   %rsp, %rbp
    0x7fff5262ee05 <+4>:  movl   %edi, %eax
    0x7fff5262ee07 <+6>:  movq   %gs:0xf0, %rcx
    0x7fff5262ee10 <+15>: movq   0x3b0(%rcx), %rdx //<-Thread 1: EXC_BAD_ACCESS (code=1, address=0x3b0)
    0x7fff5262ee17 <+22>: movq   (%rcx), %rdi
    0x7fff5262ee1a <+25>: movl   %eax, %esi
    0x7fff5262ee1c <+27>: popq   %rbp
    0x7fff5262ee1d <+28>: jmpq   *%rdx


Please let me know if you need me to attach any other information, and I apologize in advance if I've posted this in the wrong place or something, I'm new to this forum as well as using CEGUI.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: CEGUI throws EXC_BAD_ACCESS in XCode 10

Postby Ident » Thu Aug 29, 2019 19:28

Have you tried running the sample browser?

Have you tried running the application template?
CrazyEddie: "I don't like GUIs"

freedee15
Just popping in
Just popping in
Posts: 4
Joined: Thu Aug 29, 2019 14:38

Re: CEGUI throws EXC_BAD_ACCESS in XCode 10

Postby freedee15 » Thu Aug 29, 2019 20:08

Hello, and thank you for the reply! This probably sounds very noobish, however I don’t know what those are. Do you know of anywhere I could learn?
Sorry that I’m coming in to this unprepared, but thank you for the help!

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: CEGUI throws EXC_BAD_ACCESS in XCode 10

Postby Ident » Thu Aug 29, 2019 20:39

Maybe it was not in the 0.8.7 release yet, but I thought it would.

Application templates: https://bitbucket.org/cegui/cegui/src/v ... templates/

Sample framework: https://bitbucket.org/cegui/cegui/src/v ... framework/

As always, cmake can generate the projects for you. Application templates is the best base for doing what you just showed us: a simplistic project just doing the bare minimum.
CrazyEddie: "I don't like GUIs"

freedee15
Just popping in
Just popping in
Posts: 4
Joined: Thu Aug 29, 2019 14:38

Re: CEGUI throws EXC_BAD_ACCESS in XCode 10

Postby freedee15 » Fri Aug 30, 2019 15:08

Alright, thank you so much for your help!

freedee15
Just popping in
Just popping in
Posts: 4
Joined: Thu Aug 29, 2019 14:38

Re: CEGUI throws EXC_BAD_ACCESS in XCode 10

Postby freedee15 » Fri Aug 30, 2019 15:44

So now I'm having a different problem: When I try to rebuild CEGUI with the samples, I get this error:

Code: Select all

[100%] Linking CXX executable ../bin/CEGUISampleFramework-0.8.app/Contents/MacOS/CEGUISampleFramework-0.8
Undefined symbols for architecture x86_64:
  "_CVDisplayLinkCreateWithCGDisplay", referenced from:
      __glfwSetVideoMode in libglfw3.a(cocoa_monitor.m.o)
      __glfwPlatformGetVideoMode in libglfw3.a(cocoa_monitor.m.o)
      __glfwPlatformGetVideoModes in libglfw3.a(cocoa_monitor.m.o)
  "_CVDisplayLinkGetNominalOutputVideoRefreshPeriod", referenced from:
      _vidmodeFromCGDisplayMode in libglfw3.a(cocoa_monitor.m.o)
  "_CVDisplayLinkRelease", referenced from:
      __glfwSetVideoMode in libglfw3.a(cocoa_monitor.m.o)
      __glfwPlatformGetVideoMode in libglfw3.a(cocoa_monitor.m.o)
      __glfwPlatformGetVideoModes in libglfw3.a(cocoa_monitor.m.o)
  "_IODisplayCreateInfoDictionary", referenced from:
      _getDisplayName in libglfw3.a(cocoa_monitor.m.o)
  "_IOHIDDeviceCopyMatchingElements", referenced from:
      _matchCallback in libglfw3.a(iokit_joystick.m.o)
  "_IOHIDDeviceGetProperty", referenced from:
      _matchCallback in libglfw3.a(iokit_joystick.m.o)
  "_IOHIDDeviceGetValue", referenced from:
      _getElementValue in libglfw3.a(iokit_joystick.m.o)
  "_IOHIDElementGetLogicalMax", referenced from:
      _addJoystickElement in libglfw3.a(iokit_joystick.m.o)
  "_IOHIDElementGetLogicalMin", referenced from:
      _addJoystickElement in libglfw3.a(iokit_joystick.m.o)
  "_IOHIDElementGetType", referenced from:
      _addJoystickElement in libglfw3.a(iokit_joystick.m.o)
  "_IOHIDElementGetTypeID", referenced from:
      _getElementsCFArrayHandler in libglfw3.a(iokit_joystick.m.o)
  "_IOHIDElementGetUsage", referenced from:
      _addJoystickElement in libglfw3.a(iokit_joystick.m.o)
  "_IOHIDElementGetUsagePage", referenced from:
      _addJoystickElement in libglfw3.a(iokit_joystick.m.o)
  "_IOHIDManagerCreate", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
  "_IOHIDManagerOpen", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
  "_IOHIDManagerRegisterDeviceMatchingCallback", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
  "_IOHIDManagerRegisterDeviceRemovalCallback", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
  "_IOHIDManagerScheduleWithRunLoop", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
  "_IOHIDManagerSetDeviceMatchingMultiple", referenced from:
      __glfwInitJoysticks in libglfw3.a(iokit_joystick.m.o)
  "_IOHIDValueGetIntegerValue", referenced from:
      _getElementValue in libglfw3.a(iokit_joystick.m.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bin/CEGUISampleFramework-0.8.app/Contents/MacOS/CEGUISampleFramework-0.8] Error 1
make[1]: *** [samples_framework/CMakeFiles/CEGUISampleFramework-0.8.dir/all] Error 2
make: *** [all] Error 2

I had this problem before while trying to build the initial program, and I found the answer which was to add the Cocoa, IOKit, CoreVideo and OpenGL frameworks. I tried to do this while building by adding the -F flags under CMAKE_SHARED_LINKER_FLAGS and CMAKE_STATIC_LINKER_FLAGS, but it still throws that error.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: CEGUI throws EXC_BAD_ACCESS in XCode 10

Postby Ident » Fri Aug 30, 2019 18:21

I take it that you are on Mac OS? I have no knowledge about that platform or compiler at all. I am entirely lost here.

You could try to join our Discord and see if someone can help you https://discord.gg/NJ3fgsw
CrazyEddie: "I don't like GUIs"


Return to “Help”

Who is online

Users browsing this forum: No registered users and 13 guests