Hi there,

occasionally (really very rarely!) I get a crash when exiting a Rexx program 
that used Java and
there was a lot of switching between Java and Rexx on different threads 
(running on Windows 10,
32-bit system).

Using the full debug version of ooRexx (32-bit Windows, r12107) has not allowed 
me to provoke this
crash, using ooRexx created with "relwithdebinfo" just allowed me to provoke 
the crash and get
somewhat meaningful (?) information from the Visual studio debugger which 
follows.

Visual studio output:

    ... cut ...
    'rexx.exe' (Win32): Loaded 'C:\Program Files 
(x86)\Java\jre1.8.0_171\bin\prism_common.dll'. Module was built without symbols.
    The thread 0x4ef8 has exited with code 0 (0x0).
    Unhandled exception at 0x63B42647 (ANSI32.dll) in rexx.exe: 0xC0000005: 
Access violation reading
    location 0x5CA80024.

Threads:

    Not Flagged > 12876 0 Main Thread Main Thread ANSI32.dll!63b42647 Normal
    Not Flagged         6084    0       Worker Thread   
ntdll.dll!TppWorkerThread       ntdll.dll!_NtWaitForWorkViaWorkerFactory@20     
Normal
    Not Flagged         12676   0       Worker Thread   
ntdll.dll!TppWorkerThread       ntdll.dll!_NtWaitForWorkViaWorkerFactory@20     
Normal
    Not Flagged         18012   0       Worker Thread   
ntdll.dll!TppWorkerThread       ntdll.dll!_NtWaitForWorkViaWorkerFactory@20     
Normal
    Not Flagged         16988   0       Worker Thread   
msvcr100.dll!_threadstartex     jvm.dll!7a220ced        Highest
    Not Flagged         20296   0       Worker Thread   
msvcr100.dll!_threadstartex     jvm.dll!7a220df9        Highest
    Not Flagged         9636    0       Worker Thread   
msvcr100.dll!_threadstartex     jvm.dll!7a220df9        Above Normal
    Not Flagged         13264   0       Worker Thread   
msvcr100.dll!_threadstartex     jvm.dll!7a224666        Highest
    Not Flagged         19972   0       Worker Thread   
msvcr100.dll!_threadstartex     jvm.dll!7a21d6f2        Highest
    Not Flagged         16236   0       Worker Thread   
msvcr100.dll!_threadstartex     jvm.dll!7a220ced        Highest
    Not Flagged         17556   0       Worker Thread   
msvcr100.dll!_threadstartex     jvm.dll!7a220df9        Normal
    Not Flagged         19708   0       Worker Thread   
msvcr100.dll!_threadstartex     jvm.dll!7a220ced        Highest
    Not Flagged         10944   0       Worker Thread   
msvcr100.dll!_threadstartex     jvm.dll!7a224e07        Normal
    Not Flagged         15584   0       Worker Thread   winmm.dll!timeThread    
winmm.dll!timeThread    Normal
    Not Flagged         1388    0       Worker Thread   ANSI32.dll thread       
ANSI32.dll!63b4223f     Normal
    Not Flagged         16556   0       Worker Thread   
msvcr100.dll!_threadstartex     jvm.dll!7a220df9        Normal
    Not Flagged         19696   0       Worker Thread   
combase.dll!CRpcThreadCache::RpcWorkerThreadEntry       
combase.dll!WaitCoalesced       Normal
    Not Flagged         19168   0       Worker Thread   
ntdll.dll!TppWorkerThread       ntdll.dll!_NtWaitForWorkViaWorkerFactory@20     
Normal
    Not Flagged         19876   0       Worker Thread   
ntdll.dll!TppWorkerThread       ntdll.dll!_NtWaitForWorkViaWorkerFactory@20     
Normal
    Not Flagged         4144    0       Worker Thread   
msvcr100.dll!_threadstartex     jvm.dll!7a220df9        Highest

Call Stack:

        ANSI32.dll!63b42647()   Unknown
        [Frames below may be incorrect and/or missing, no symbols loaded for 
ANSI32.dll]        
        ANSI32.dll!63b42d93()   Unknown
        ucrtbase.dll!try_get_module()   Unknown
        ucrtbase.dll!try_get_function() Unknown
        
ucrtbase.dll!get_win_policy<`__acrt_get_process_end_policy'::`2'::process_end_policy_properties>()
      Unknown
        ucrtbase.dll!exit_or_terminate_process()        Unknown
        ucrtbase.dll!common_exit()      Unknown
        ucrtbase.dll!_exit()   Unknown
    > rexx.exe!__scrt_common_main_seh() Line 262 C++
        kernel32.dll!@BaseThreadInitThunk@12() Unknown
        ntdll.dll!__RtlUserThreadStart()        Unknown
        ntdll.dll!__RtlUserThreadStart@8()     Unknown

Locals:

                has_cctor       false   bool
                is_nested       false   const bool
                main_result     0       const int
                main_result     -1073741819     const int
                tls_dtor_callback       Variable is optimized away and not 
available.   
                tls_init_callback       Variable is optimized away and not 
available.   

The code location in the thread:

    ... cut ...
            // If this module has any thread-local destructors, register the
            // callback function with the Unified CRT to run on exit.
            _tls_callback_type const * const tls_dtor_callback = 
__scrt_get_dyn_tls_dtor_callback();
            if (*tls_dtor_callback != nullptr && 
__scrt_is_nonwritable_in_current_image(tls_dtor_callback))
            {
                _register_thread_local_exe_atexit_callback(*tls_dtor_callback);
            }

            //
            // Initialization is complete; invoke main...
            //

            int const main_result = invoke_main();

            //
            // main has returned; exit somehow...
            //

            if (!__scrt_is_managed_app())
                exit(main_result);

           if (!has_cctor) // <--- line # 262 _cexit();

            // Finally, we terminate the CRT:
            __scrt_uninitialize_crt(true, false);
            return main_result;
        }
        __except (_seh_filter_exe(GetExceptionCode(), 
GetExceptionInformation()))
        {
            // Note:  We should never reach this except clause.
            int const main_result = GetExceptionCode();

            if (!__scrt_is_managed_app())
                _exit(main_result);

            if (!has_cctor)
                _c_exit();

            return main_result;
        }
    }
    ... cut ...

Please advise if I can supply more information as I have currently the debug 
window open!

---rony



_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to