https://bugs.documentfoundation.org/show_bug.cgi?id=103690

Michael Meeks <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #21 from Michael Meeks <[email protected]> ---
The trace with symbols is beautiful - thanks Telesto - and the solution (I
guess) is fairly trivial:

libvcllo.dylib`SolarMutexGuard::SolarMutexGuard(this=0x00007fff5fbfd670) + 21
at svapp.hxx:1410
    frame #3: 0x0000000107a16577 libvcllo.dylib`::-[VCL_NSApplication
screenParametersChanged:](self=0x000000010ffba610,
_cmd="screenParametersChanged:", pNotification=0x00000001110008f0) + 55 at
vclnsapp.mm:450
    frame #4: 0x00007fff809c259c
CoreFoundation`__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
    frame #5: 0x00007fff809c249b CoreFoundation`_CFXRegistrationPost + 427
...
...
    frame #22: 0x00007fff7e5f31ad AppKit`NSApplicationMain + 1237
    frame #23: 0x00000001078ca89a
libvcllo.dylib`ImplSVMainHook(pnInit=0x00007fff5fbff954) + 522 at
salinst.cxx:211

bool ImplSVMainHook( int * pnInit )
{
...
    const char* pArgv[] = { aByteExe.getStr(), nullptr };
**    NSApplicationMain( 1, pArgv );
}

    I guess we are not expecting this to go emitting events - or somesuch.

    frame #24: 0x000000010776c37c libvcllo.dylib`SVMain() + 44 at
svmain.cxx:220

int SVMain()
{
    int nRet;
**  if( !Application::IsConsoleOnly() && ImplSVMainHook( &nRet ) )
        return nRet;
    else
        return ImplSVMain();
}

    frame #25: 0x0000000100241606 libsofficeapp.dylib`::soffice_main() + 534 at
sofficemain.cxx:165
    frame #26: 0x0000000100000efd soffice`sal_main + 13 at main.c:48

We are called-back by events from main before we have initialized VCL and
before we have setup the SolarMutex - which is somewhat silly =) We expect
ImplSVMain:

int ImplSVMain()
{
    // The 'real' SVMain()
    ImplSVData* pSVData = ImplGetSVData();

    SAL_WARN_IF( !pSVData->mpApp, "vcl", "no instance of class Application" );

    int nReturn = EXIT_FAILURE;

    bool bInit = isInitVCL() || InitVCL();

To initialize and setup VCL.

So - I guess the question is - why do we have this hook ? (would be good to
read the git annotate / logs for the init hook) - and why do we get events
during that 'Main' call, and what is the best fix - is it to initialize the
solar mutex earlier ? or ... unclear =) Tor may have some quick ideas =)

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to