EXC_BAD_ACCESS Unclosed string > KERN_INVALID_ADDRESS at 0x627.

Open
#1,177 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp
Domain
backend

Research direction

Start by reviewing the hxcpp 4.3.2 iOS crash report and the stack from GlobalAllocator::GetNextFree through hx::Hash and haxe::format::JsonParser_obj::parseRec. Check how the HXCPP_CPP11 define and the reported unclosed-string condition relate to this path. Done means identifying a reproducible root cause and verifying that the EXC_BAD_ACCESS no longer occurs.

Written by the indexing model from the issue text.

Description

Usually this crash happens in the first 10 seconds of booting the app.

Defines:

<define name="HXCPP_CPP11"/>

hxcpp 4.3.2

OS Version: iOS 18.2.1 (22C161)
Report Version: 104

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: SEGV_NOOP at 0x0000000000000627
Crashed Thread: 25

Application Specific Information:
Unclosed string >
KERN_INVALID_ADDRESS at 0x627.

Thread 25 Crashed:
0   Application                        0x201e0b5d4         GlobalAllocator::GetNextFree
1   Application                        0x201e0b238         GlobalAllocator::GetFreeBlock
2   Application                        0x201e0b000         LocalAllocator::CallAlloc
3   Application                        0x201df2c9c         hx::Hash<T>::allocElement
4   Application                        0x201df30d4         hx::Hash<T>::TSet<T>
5   Application                        0x201df1cd4         hx::Hash<T>::set
6   Application                        0x201dea44c         __string_hash_set
7   Application                        0x201de08dc         hx::Anon_obj::__SetField
8   Application                        0x201056dc0         Reflect_obj::setField
9   Application                        0x2010d08d8         haxe::format::JsonParser_obj::parseRec
10  Application                        0x2010d08c8         haxe::format::JsonParser_obj::parseRec
11  Application                        0x2010d0704         haxe::format::JsonParser_obj::parseRec
12  Application                        0x2010d08c8         haxe::format::JsonParser_obj::parseRec
13  Application                        0x2010d0190         haxe::format::JsonParser_obj::doParse
14  Application                        0x201374e08         com::example::utils::AsyncJsonUtils_obj::parseAsync::_hx_Closure_0::_hx_run
15  Application                        0x201571484         lime::app::FutureWork_obj::threadPool_doWork
16  Application                        0x20157155c         lime::app::__FutureWork_objthreadPool_doWork
17  Application                        0x20149d460         lime::_hx_system::ThreadPool_obj::_hx___executeThread
18  Application                        0x20149d6e4         lime::_hx_system::__ThreadPool_obj_hx___executeThread
19  Application                        0x201aa7738         sys::thread::_Thread::HaxeThread_obj::create::_hx_Closure_0::_hx_run
20  Application                        0x201aa7528         sys::thread::_Thread::HaxeThread_obj::create::_hx_Closure_0::__run
21  Application                        0x201e03180         hxThreadFunc
22  libsystem_pthread.dylib         0x4332b17d0         _pthread_start
Dominant language
C++
Stars
330
Forks
237
Avg merge
1d 3h
Merged PRs (30d)
20

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HaxeFoundation/hxcpp

All issues in HaxeFoundation/hxcpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.