https://github.com/4brunu/mobilecppmemorytest
Sample project showing memory error using djinni
https://github.com/4brunu/mobilecppmemorytest
android cpp djinni ios
Last synced: about 1 month ago
JSON representation
Sample project showing memory error using djinni
- Host: GitHub
- URL: https://github.com/4brunu/mobilecppmemorytest
- Owner: 4brunu
- Created: 2016-10-27T13:23:13.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-28T12:47:38.000Z (over 9 years ago)
- Last Synced: 2025-03-06T14:41:41.510Z (over 1 year ago)
- Topics: android, cpp, djinni, ios
- Language: Makefile
- Homepage:
- Size: 2.36 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MobileCppMemoryTest
This project show's an error while using djinni.
I think it's a memory management error.
##How to run the project?
To simulate the problem open [MobileCppMemoryTestiOS.xcodeproj](https://github.com/4brunu/MobileCppMemoryTest/tree/master/ios_project/MobileCppMemoryTestiOS/MobileCppMemoryTestiOS.xcodeproj) on iOS or open the Android project [here](https://github.com/4brunu/MobileCppMemoryTest/tree/master/android_project/MobileCppMemoryTestAndroid) and run the app.
##iOS error
The error is EXC_BAD_ACCESS in this [line](https://github.com/4brunu/MobileCppMemoryTest/blob/master/src/main/cpp/ModelFatherImpl.cpp#L45).
##Android Error
```
A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x69006f in tid 4730 (ypicode.com/...)
[ 10-27 16:42:26.461 1184: 1184 W/ ]
debuggerd: handling request: pid=4702 uid=10067 gid=10067 tid=4730
```
## Workaround
One workarround is to put [this on iOS](https://github.com/4brunu/MobileCppMemoryTest/blob/master/ios_project/MobileCppMemoryTestiOS/MobileCppMemoryTestiOS/ViewController.swift#L13) or [this on Android](https://github.com/4brunu/MobileCppMemoryTest/blob/master/android_project/MobileCppMemoryTestAndroid/app/src/main/java/com/company/mobilecppmemorytestandroid/MainActivity.java#L19) variables as global variables, but I want to understand why this is happening.