<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:lemoyne.castle@gmail.com" title="LeMoyne Castle <lemoyne.castle@gmail.com>"> <span class="fn">LeMoyne Castle</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Crash in: StarBASIC::~StarBASIC()"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=107297">bug 107297</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>UNCONFIRMED
           </td>
           <td>NEW
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">See Also</td>
           <td>
                
           </td>
           <td>https://bugs.documentfoundation.org/show_bug.cgi?id=106294
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Assignee</td>
           <td>libreoffice-bugs@lists.freedesktop.org
           </td>
           <td>lemoyne.castle@gmail.com
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Ever confirmed</td>
           <td>
                
           </td>
           <td>1
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Crash in: StarBASIC::~StarBASIC()"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=107297#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Crash in: StarBASIC::~StarBASIC()"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=107297">bug 107297</a>
              from <span class="vcard"><a class="email" href="mailto:lemoyne.castle@gmail.com" title="LeMoyne Castle <lemoyne.castle@gmail.com>"> <span class="fn">LeMoyne Castle</span></a>
</span></b>
        <pre>@Timur - can see reports by version with
<a href="http://crashreport.libreoffice.org/stats/version/5.3.1.2">http://crashreport.libreoffice.org/stats/version/5.3.1.2</a>  or other version
number at the end

~~~~~><>~~~~~><>~~~~~><>~~~~~~~~~~~~~~

Went through several (>=10) of the stack traces on the crash reports with this
signature.  They all showed evidence of this being a 'crash on close of LO'. 
Reporter (Timur) said was using add-ons so added see also: <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - CRASH when LibreOffice is closed while running a macro"
   href="show_bug.cgi?id=106294">bug 106294</a> (crash on
close of LO with macro running).  Will do work under that bug (with test doc
for repro), but leaving this open as non-dup to preserve visibility of
crashreporter to see if fixes for that actually make this one go away too.

I think there are two issues here:
I am confident that there is at least one hardware independent issue here: all
calls that start StarBasic need protection in case LO is closed (as in fix for
<a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Writer crashes document if closed while macro running"
   href="show_bug.cgi?id=88985">Bug 88985</a>).  However, the Linux crash stack traces I am getting directly show
significant(?) differences in the way that the visual studio and gcc compilers
generate and call the destructors for Basic objects.  It is striking that the
*order* of the calls of Basic's coded destructors & compiler generated default
destructors appears to be reversed between the Linux and Windows build systems,
and that the same destructor appears to be called twice in Linux.  Will do the
changes to try to flatten the destruction handling here as that is a separate
problem from the lack of close protection for running Basic.  

The second issue:
There are  other signatures in crashreporter that show the 'crash on close of
LO with Basic' under other Basic destructor signatures: e.g. SbiObject'vector
deleting destructor' [IIRC], etc.  There are also suspiciously similar reports
of issues with and MS bug fixes for Visual Studio's generation of default
destructors.  The thing to try is to correct the Basic destructor declarations
so that they are no longer oddly or ill-formed (outside modern C++ standards).
In short, make Basic's destructors public.  I am quite sure that much of the
Basic code predates all but the earliest C++ standards and best practices.  

The upshot (short version):
I will work on the separate issues uncovered by 'crash in Basic on close of LO'
bugs in the following way and order: 
1.  <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - CRASH when LibreOffice is closed while running a macro"
   href="show_bug.cgi?id=106294">Bug 106294</a> - establish consistent protection for Basic at ALL calls that
start StarBasic as Caolan did for <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Writer crashes document if closed while macro running"
   href="show_bug.cgi?id=88985">bug 88985</a>.  External to Basic + a direct fix.
 Can test directly with close during long-running macro.
2.  <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Crash in: StarBASIC::~StarBASIC()"
   href="show_bug.cgi?id=107297">Bug 107297</a> - Make Basic's destructors public to bring the destruction of
Basic objects in compliance with C++ standards/best practices in order to avoid
compiler+linker confusion and gross differences between VS and gcc.  Internal
to Basic - an indirect (compiler-mediated) potential(!) fix.  Might be hard to
verify and will require much more thorough testing of Basic to try to avoid
side effects.  Will be obvious as a separate issue if the protection fix only
works reliably on Linux and we still get crashes on Windows.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>