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

hxtelemetry crash with latest hxcpp #554

Closed
bendmorris opened this issue Jan 16, 2017 · 3 comments
Closed

hxtelemetry crash with latest hxcpp #554

bendmorris opened this issue Jan 16, 2017 · 3 comments

Comments

@bendmorris
Copy link
Contributor

@bendmorris bendmorris commented Jan 16, 2017

Reporting here since it seems like a hxcpp issue.

I'm using Haxe 3.4.0-rc.2 and hxcpp 3.4.43 on OSX, with hxtelemetry 0.3.5.

When creating a new HxTelemetry object, I get a crash from EXC_BAD_ACCESS. I traced it to this line: https://github.com/jcward/hxtelemetry/blob/master/hxtelemetry/CppHxTelemetry.hx#L44

    return untyped __global__.__hxcpp_hxt_start_telemetry(hxt._config.profiler,
                                                          hxt._config.allocations);

Here's the backtrace:

* thread #1: tid = 0xa28b9, 0x000000010122c0e9 pinny`hx::StackContext::getFullNameAtDepth(this=0x0000000102a0bfd0, depth=11) const + 41 at StackContext.h:624, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x68)
  * frame #0: 0x000000010122c0e9 pinny`hx::StackContext::getFullNameAtDepth(this=0x0000000102a0bfd0, depth=11) const + 41 at StackContext.h:624
    frame #1: 0x000000010122b14a pinny`hx::Telemetry::push_callstack_ids_into(this=0x0000000102d2be40, list=0x00007fff5fbfd850) + 74 at Telemetry.cpp:396
    frame #2: 0x000000010122b287 pinny`hx::Telemetry::ComputeCallStackId(this=0x0000000102d2be40) + 87 at Telemetry.cpp:415
    frame #3: 0x000000010122b7d7 pinny`hx::Telemetry::HXTAllocation(this=0x0000000102d2be40, obj=0x0000000102bc6fe8, inSize=88, type=0x00000001013fb0da) + 167 at Telemetry.cpp:507
    frame #4: 0x000000010122bc46 pinny`__hxt_new_string(obj=0x0000000102bc6fe8, inSize=88) + 70 at Telemetry.cpp:634
    frame #5: 0x00000001011e08d9 pinny`hx::NewString(inLen=87) + 73 at GcCommon.cpp:119
    frame #6: 0x0000000101272f6e pinny`GCStringDup(inStr=0x00007fff5fbfda20, inLen=-1, outLen=0x00007fff5fbfde80) + 222 at String.cpp:451
    frame #7: 0x00000001012732e8 pinny`String::String(this=0x00007fff5fbfde80, inStr=0x00007fff5fbfda20) + 56 at String.cpp:534
    frame #8: 0x000000010127332d pinny`String::String(this=0x00007fff5fbfde80, inStr=0x00007fff5fbfda20) + 29 at String.cpp:540
    frame #9: 0x000000010122821d pinny`hx::FormatStack(file=0x00000001013e1758, clazz=0x00000001013e1724, func=0x00000001013e1773, line=146, display=false) + 669 at Debug.cpp:142
    frame #10: 0x0000000101228866 pinny`hx::StackFrame::toString(this=0x00007fff5fbfe110) + 70 at Debug.cpp:390
    frame #11: 0x00000001012287f4 pinny`hx::StackContext::getCurrentCallStackAsStrings(this=0x0000000102a0bfd0, result=Array<String> at 0x00007fff5fbfdee8, skipLast=true) + 164 at Debug.cpp:307
    frame #12: 0x0000000101228dc2 pinny`__hxcpp_get_call_stack(inSkipLast=true) + 98 at Debug.cpp:497
    frame #13: 0x0000000100fb650b pinny`haxe::CallStack_obj::callStack() + 59 at CallStack.cpp:68
    frame #14: 0x0000000100d94261 pinny`hxtelemetry::HxTelemetry_obj::init_profiler_for_this_thread(this=0x0000000102bc5c8c) + 993 at HxTelemetry.cpp:213
    frame #15: 0x0000000100d93dae pinny`hxtelemetry::HxTelemetry_obj::__construct(this=0x0000000102bc5c8c, config=<unavailable>) + 2558 at HxTelemetry.cpp:181
    frame #16: 0x0000000100d97c1b pinny`hxtelemetry::HxTelemetry_obj::__alloc(_hx_ctx=0x0000000102a0bfd0, config=hxtelemetry::Config at 0x00007fff5fbfe5f8) + 123 at HxTelemetry.cpp:590
@bendmorris
Copy link
Contributor Author

@bendmorris bendmorris commented Feb 1, 2017

Still happening with Haxe 3.4.0, hxcpp 3.4.49.

@jcward
Copy link
Contributor

@jcward jcward commented Feb 21, 2017

Related issue: jcward/hxtelemetry#49 -- a refactor (269e229) changed the way stack depth was being handled. I'll submit a PR for this, but it's not the only issue with telemetry at present. There's another problem with thread ID's not working. I'll file a separate bug for that.

@bendmorris
Copy link
Contributor Author

@bendmorris bendmorris commented Feb 21, 2017

Thanks @jcward, looking forward to having this working again!

@hughsando hughsando closed this in 370f95e Feb 21, 2017
hughsando added a commit that referenced this issue Feb 21, 2017
Fixed #554, but telemetry still has issues wrt ThreadID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.