Skip to content
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

Show stacktrace on CUBOS_FAIL #1333

Merged
merged 3 commits into from
Sep 28, 2024
Merged

Conversation

RiscadoA
Copy link
Member

Description

Adds yet another dependency to the core lib, cpptrace.
This one is really necessary - turns out implementing this ourselves is a giant hassle, as there a lot of platform and compiler quirks.
In the future it might no longer be necessary, as C++23 comes with a <stacktrace> include - not all compilers support it yet.

To use this, I simply call our own abort function, which first prints the stacktrace using cpptrace, and then calls the usual std::abort function.

The result looks like this:
image

Checklist

  • Self-review changes.
  • Add entry to the changelog's unreleased section.

@RiscadoA RiscadoA added this to the 0.4 milestone Sep 27, 2024
@RiscadoA RiscadoA self-assigned this Sep 27, 2024
@RiscadoA RiscadoA requested a review from a team as a code owner September 27, 2024 18:34
@RiscadoA RiscadoA linked an issue Sep 27, 2024 that may be closed by this pull request
@github-actions github-actions bot added the D-Good-First-Issue Easy but interesting label Sep 27, 2024
Copy link
Contributor

github-actions bot commented Sep 27, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://GameDevTecnico.github.io/cubos/preview/pr-1333/
on branch gh-pages at 2024-09-28 12:50 UTC

Copy link

codecov bot commented Sep 27, 2024

Codecov Report

Attention: Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.

Project coverage is 37.41%. Comparing base (4a09cb2) to head (47f18cc).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
core/src/gl/ogl_render_device.cpp 0.00% 10 Missing ⚠️
core/src/log.cpp 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1333      +/-   ##
==========================================
- Coverage   37.41%   37.41%   -0.01%     
==========================================
  Files         410      410              
  Lines       33195    33198       +3     
==========================================
+ Hits        12421    12422       +1     
- Misses      20774    20776       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@mkuritsu mkuritsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stacktraces look good 👍

Copy link
Contributor

@kuukitenshi kuukitenshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice to me 😸

Copy link
Contributor

@fallenatlas fallenatlas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@RiscadoA RiscadoA force-pushed the 1172-show-stack-trace-on-cubos_fail branch from 620da88 to 47f18cc Compare September 28, 2024 12:49
@RiscadoA RiscadoA merged commit 3bb348f into main Sep 28, 2024
11 checks passed
@RiscadoA RiscadoA deleted the 1172-show-stack-trace-on-cubos_fail branch September 28, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show stack trace on CUBOS_FAIL
4 participants