Skip to content

Failed to run the app on Linux Ubuntu 22.04 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ywiyogo opened this issue May 19, 2024 · 2 comments
Open

Failed to run the app on Linux Ubuntu 22.04 #2

ywiyogo opened this issue May 19, 2024 · 2 comments
Labels
bug Something isn't working linux

Comments

@ywiyogo
Copy link

ywiyogo commented May 19, 2024

Hi @MartinHelmut ,
first, thanks for this repo. I'm learning how to develop with ImGui on Linux now.
Preparing a custom font in CMake for ImGui app is quite complicated.

I did git clone and run these commands

cmake -B build
cmake --build build -j

and if I run the app, it returns segmentation fault.

$ build/src/app/App 
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
Segmentation fault (core dumped)
@MartinHelmut
Copy link
Owner

Preamble

Hey, you're welcome! It indeed can be a challange :) Regarding building this repository. The SDL3 version of this template still needs some love to really get going. I'm working on a PR to get everything in place. There is also a more stable version of this template using SDL2 here: https://github.com/MartinHelmut/cpp-gui-template-sdl2

Details

Regarding building on Linux: Did you try as suggested in the Quick Start Guide to explicitly set build parameters (e.g. using Ninja for a debug build)?

For me to properly debug I'd love to get some more information from you. E.g.: What Linux are you using in what version? What is your current CMake version? What build tool is installed?

Also, seeing that this is triggered by the address sanitiser, you could try to comment it out. The code for this is here: https://github.com/MartinHelmut/cpp-gui-template-sdl3/blob/main/cmake/StaticAnalyzers.cmake#L16

@MartinHelmut MartinHelmut added bug Something isn't working linux labels May 19, 2024
@ywiyogo
Copy link
Author

ywiyogo commented May 19, 2024

Thanks @MartinHelmut for the fast reply!
Yes, commenting out that sanitizer cmake block solves the issue. 👍
I use Ubuntu 22.04, and it has CMake version 3.22.1. I don't use Ninja, just plain CMake with those two commands for building the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working linux
Projects
None yet
Development

No branches or pull requests

2 participants