Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - St4rFoX

Pages: [1]
1
General / Application crash on startup with MacOS X Mojave
« on: January 17, 2019, 12:30:26 am »
Hi,
I'm new to SFML so I don't know if this is a bug or it's my fault but I finished ideas so I decided to write this post.
I'm trying to build a project using CMake and sources of SFML on MacOS X Mojave 10.14.2. I followed the tutorial on sfml website https://www.sfml-dev.org/tutorials/2.5/compile-with-cmake.php and always got fine (CMake was configured properly and I ran make install to properly install all sfml module and dependencies) and then, inside my project root I did the same thing (run cmake . and then make) to generate the executable of app.

This is my CMakeLists.txt inside the project root directory:
PROJECT(test_d)
cmake_policy(SET CMP0074 NEW)
SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
FIND_PACKAGE(OpenGL)
find_package(SFML 2 REQUIRED system window graphics network audio)

INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR} ${SFML_INCLUDE_DIR})

SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

ADD_SUBDIRECTORY(src)

All these steps works fine, but when I execute the generated binary I get the following error and the window does not show up:
2019-01-16 23:59:44.144 test[62958:179975] *** Assertion failure in -[SFWindow setTitle:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1671.20.108/AppKit.subproj/NSWindow.m:2584
2019-01-16 23:59:44.144 test[62958:179975] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: aString != nil'
*** First throw call stack:
(
        0   CoreFoundation                      0x00007fff516dfecd __exceptionPreprocess + 256
        1   libobjc.A.dylib                     0x00007fff7d797720 objc_exception_throw + 48
        2   CoreFoundation                      0x00007fff516fab2a +[NSException raise:format:arguments:] + 98
        3   Foundation                          0x00007fff53a9ee0d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 194
        4   AppKit                              0x00007fff4ec0a995 -[NSWindow setTitle:] + 188
        5   libsfml-window.2.5.dylib            0x000000010e26992d _ZN2sf4priv15WindowImplCocoaC2ENS_9VideoModeERKNS_6StringEmRKNS_15ContextSettingsE + 269
        6   libsfml-window.2.5.dylib            0x000000010e25b953 _ZN2sf4priv10WindowImpl6createENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE + 67
        7   libsfml-window.2.5.dylib            0x000000010e25aa1d _ZN2sf6Window6createENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE + 397
        8   libsfml-window.2.5.dylib            0x000000010e25a84f _ZN2sf6WindowC2ENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE + 111
        9   test                                0x000000010e23ba90 main + 208
        10  libdyld.dylib                       0x00007fff7e865ed9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
zsh: abort      ./bin/test

I googled a lot but I could not find anything that resolve the issue (I also tried different sfml version but got the same). I hope someone can give me some suggestions.

Pages: [1]
anything