Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Console application fails when not run through Terminal on OSX #1704

@christianscheuer

Description

@christianscheuer

Natively compiled application works fine when run through Terminal, but fails here when invoked from any other process (through NSTask).
It has no effect whether or not StandardInput/output/error is redirected or not.

Might this it be an environment issue, or are there made any assumptions in the bootstrapping code which makes this fail?

This is the stacktrace from lldb:

Process 65308 stopped
* thread #1: tid = 0x10790f, 0x0000000100105d90 cptsbackend`REGDISPLAY::GetFP(this=0x00007fff5fbff630) + 16 at regdisplay.h:42, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x0000000100105d90 cptsbackend`REGDISPLAY::GetFP(this=0x00007fff5fbff630) + 16 at regdisplay.h:42
   39       inline PCODE GetIP() { return IP; }
   40       inline PTR_PCODE GetAddrOfIP() { return pIP; }
   41       inline UIntNative GetSP() { return SP; }
-> 42       inline UIntNative GetFP() { return *pRbp; }
   43       inline UIntNative GetPP() { return *pRbx; }
   44   
   45       inline void SetIP(PCODE IP) { this->IP = IP; }
(lldb) thread backtrace
* thread #1: tid = 0x10790f, 0x0000000100105d90 cptsbackend`REGDISPLAY::GetFP(this=0x00007fff5fbff630) + 16 at regdisplay.h:42, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x0000000100105d90 cptsbackend`REGDISPLAY::GetFP(this=0x00007fff5fbff630) + 16 at regdisplay.h:42
    frame #1: 0x0000000100105679 cptsbackend`UnixNativeCodeManager::GetFramePointer(this=0x00006180000200a0, pMethodInfo=0x00007fff5fbff6c8, pRegisterSet=0x00007fff5fbff630) + 89 at UnixNativeCodeManager.cpp:90
    frame #2: 0x00000001000303f1 cptsbackend`StackFrameIterator::CalculateCurrentMethodState(this=0x00007fff5fbff610) + 449 at StackFrameIterator.cpp:1418
    frame #3: 0x00000001000319b1 cptsbackend`::RhpSfiNext(pThis=0x00007fff5fbff610, puExCollideClauseIdx=0x00007fff5fbff594, pfUnwoundReversePInvoke="") + 97 at StackFrameIterator.cpp:1598
    frame #4: 0x000000010010c06d cptsbackend`System_Private_CoreLib_System_Runtime_EH__DispatchEx + 453
    frame #5: 0x000000010010a1db cptsbackend`RhThrowEx + 95
    frame #6: 0x0000000100106106 cptsbackend`RhpThrowEx + 148 at ExceptionHandling.S:541

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions