Skip to content

feat: add NDK crashes example #618

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
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open

Conversation

MoKamall
Copy link
Collaborator

@MoKamall MoKamall commented Aug 11, 2025

Description of the change

Add NDK crashes section in the example app.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Related issues

MOB-19409

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests

Code review

  • This pull request has a descriptive title and information useful to a reviewer
  • Issue from task tracker has a link to this pull request

MoKamall added 8 commits July 22, 2025 03:09
- Introduced CMakeLists.txt for building native libraries.
- Added multiple crash simulation functions in crasher.c, crasher_2.c, crasher_3.c, and crasher_4.cpp to handle various signals (SIGSEGV, SIGABRT, SIGFPE, SIGILL, SIGBUS, SIGTRAP).
- Updated header files to declare new crash functions.
- Implemented JNI methods to trigger crashes from Java/Kotlin.

This setup enhances the native crash testing capabilities of the application.
- Added support for triggering various NDK crashes (SIGSEGV, SIGABRT, SIGFPE, SIGILL, SIGBUS, SIGTRAP) through new methods in `InstabugExampleMethodCallHandler` and `InstabugFlutterExampleMethodChannel`.
- Introduced `CppNativeLib` for native crash methods and linked it in the Kotlin code.
- Created `NdkCrashesContent` widget for UI interaction to trigger crashes.
- Updated `build.gradle` to include ProGuard settings and CMake support for native builds.
- Added `proguard-rules.pro` for project-specific ProGuard rules.
…y seperate java/kotlin code

- Added `instabug_flutter_ndk` dependency in `pubspec.yaml`
- Updated Android project structure, including package renaming and build configuration adjustments.
- Fixed JNI method signatures and moved `CppNativeLib` class java package instead of kotlin.
- Improved `.gitignore` to include C++ build artifacts for cleaner project management.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant