Body: <p>After upgrading CiviCRM on Drupal 7.65 from 5.11.0 to 5.13.1, and then testing a CiviContribution form with a discount code (test code for a 100% deduction) from CiviDiscount 3.7, I am getting the following error in a white screen of death:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught CRM_Core_Exception: [0: Transaction integrity
    error: Expected to find active frame thrown in
    /drupal_root/sites/all/modules/contrib/civicrm/Civi/Core/Transaction/Manager.php
    on line 107</p>
  </blockquote>
  
  <p>The function referred to in the error is:</p>
  
  <pre><code>  /**
     * Decrement the transaction count / close out a transaction level
     *
     * @throws \CRM_Core_Exception
     */
    public function dec() {
      if (!isset($this-&gt;frames[0]) || $this-&gt;frames[0]-&gt;isEmpty()) {
        throw new \CRM_Core_Exception('Transaction integrity error: Expected to find active frame');
      }
  </code></pre>
  
  <p>Here is the backtrace:</p>
  
  <pre><code>(
      [callback] =&gt; Array
          (
              [0] =&gt; CRM_Core_Error
              [1] =&gt; handle
          )
  
      [code] =&gt; 0
      [message] =&gt; 
      [mode] =&gt; 16
      [debug_info] =&gt; 
      [type] =&gt; PEAR_Error
      [user_info] =&gt; 
      [to_string] =&gt; [pear_error: message="" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]
  )
  
  
  May 13 14:26:23  [info] $backTrace = #0 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/Error.php(236): CRM_Core_Error::backtrace("backTrace", TRUE)
  #1 /drupal_rootsites/all/modules/contrib/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(PEAR_Error))
  #2 /drupal_rootsites/all/modules/contrib/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(577): PEAR_Error-&gt;__construct("", 0, 16, (Array:2), NULL)
  #3 /drupal_rootsites/all/modules/contrib/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR-&gt;_raiseError(Object(Net_Socket), "", 0)
  #4 /drupal_rootsites/all/modules/contrib/civicrm/vendor/pear/net_socket/Net/Socket.php(173): PEAR-&gt;__call("raiseError", (Array:2))
  #5 /drupal_rootsites/all/modules/contrib/civicrm/packages/HTTP/Request.php(737): Net_Socket-&gt;connect("ssl://maps.googleapis.com", 443, NULL, "60", NULL)
  #6 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Utils/Geocode/Google.php(126): HTTP_Request-&gt;sendRequest()
  #7 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/BAO/Address.php(1371): CRM_Utils_Geocode_Google::format((Array:12))
  #8 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/BAO/Address.php(377): CRM_Core_BAO_Address::addGeocoderData((Array:12))
  #9 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/BAO/Address.php(144): CRM_Core_BAO_Address::fixAddress((Array:12))
  #10 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/BAO/Address.php(120): CRM_Core_BAO_Address::add((Array:12), TRUE)
  #11 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/BAO/Location.php(70): CRM_Core_BAO_Address::create((Array:48), TRUE, NULL)
  #12 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Contact/BAO/Contact.php(340): CRM_Core_BAO_Location::create((Array:48), TRUE)
  #13 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Contact/BAO/Contact.php(2007): CRM_Contact_BAO_Contact::create((Array:48))
  #14 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(2207): CRM_Contact_BAO_Contact::createProfileContact((Array:51), (Array:11), NULL, (Array:1), NULL, NULL, TRUE)
  #15 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(709): CRM_Contribute_Form_Contribution_Confirm-&gt;processFormSubmission(NULL)
  #16 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/Form.php(490): CRM_Contribute_Form_Contribution_Confirm-&gt;postProcess()
  #17 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Contribute/Form/Contribution/Main.php(1295): CRM_Core_Form-&gt;mainProcess()
  #18 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Contribute/Form/Contribution/Main.php(1029): CRM_Contribute_Form_Contribution_Main-&gt;skipToThankYouPage()
  #19 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/Form.php(490): CRM_Contribute_Form_Contribution_Main-&gt;postProcess()
  #20 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/QuickForm/Action/Upload.php(169): CRM_Core_Form-&gt;mainProcess()
  #21 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/QuickForm/Action/Upload.php(136): CRM_Core_QuickForm_Action_Upload-&gt;realPerform(Object(CRM_Contribute_Form_Contribution_Main), "upload")
  #22 /drupal_rootsites/all/modules/contrib/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload-&gt;perform(Object(CRM_Contribute_Form_Contribution_Main), "upload")
  #23 /drupal_rootsites/all/modules/contrib/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller-&gt;handle(Object(CRM_Contribute_Form_Contribution_Main), "upload")
  #24 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/Controller.php(349): HTML_QuickForm_Page-&gt;handle("upload")
  #25 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/Invoke.php(311): CRM_Core_Controller-&gt;run((Array:3), NULL)
  #26 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/Invoke.php(85): CRM_Core_Invoke::runItem((Array:15))
  #27 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
  #28 /drupal_rootsites/all/modules/contrib/civicrm/drupal/civicrm.module(444): CRM_Core_Invoke::invoke((Array:3))
  #29 /drupal_rootincludes/menu.inc(527): civicrm_invoke("contribute", "transact")
  #30 /drupal_rootindex.php(21): menu_execute_active_handler()
  #31 {main}
  </code></pre>
  
  <p>Any idea what this means and what I should do to fix it?</p>
  
  <p>Edit: I've tested the contribution form without a discount code and got the same error. This is an established site that was working and no other changes have been made. I'm still going through the process of testing the upgrade on my dev. PHP 7.1</p>
  
  <p>Edit2: This is on my local dev environment using AMPPS on a Mac.
  Edit3: This seems to be something with how my local dev processes https requests with Google Maps. </p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-07T08:01:29.847Z
Comments.Text: Did the upgrade script run OK? Can you find a backtrack in ConfigAndLog directory? Or turn on debugging to maybe get one?
Comments.UserDisplayName: eileen
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-07T08:07:09.973Z
Comments.Text: The upgrade went very smoothly and there wasn't anything in the log until I generated this error. I will update if I can get more details in a backtrace. Thank you.
Comments.UserDisplayName: Christia
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-07T15:12:12.747Z
Comments.Text: There are some suggestions in stackexchange for similar issues where running mysql_upgrade might help because some mysql system tables have got out of whack. Perhaps the host changed something with mysql recently?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-13T21:36:42.030Z
Comments.Text: I've edited my post to add the backtrace.
Comments.UserDisplayName: Christia
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-05-16T08:34:33.830Z
Comments.Text: I figured out that this is just something wrong on my dev environment not being able to HTTPS probably being used by Google maps for geocoding.
Comments.UserDisplayName: Christia
Tags: <civicontribute><upgrade><cividiscount>
Title: Transaction integrity error: Expected to find active frame thrown in Manager.php
ThreadText: # Transaction integrity error: Expected to find active frame thrown in Manager.php
  
  (Asked by: username_0 on 2019-05-06)
  
  After upgrading CiviCRM on Drupal 7.65 from 5.11.0 to 5.13.1, and then testing a CiviContribution form with a discount code (test code for a 100% deduction) from CiviDiscount 3.7, I am getting the following error in a white screen of death:
  
  > Fatal error: Uncaught CRM\_Core\_Exception: [0: Transaction integrity
  > error: Expected to find active frame thrown in
  > /drupal\_root/sites/all/modules/contrib/civicrm/Civi/Core/Transaction/Manager.php
  > on line 107
  
  The function referred to in the error is:
  
  ```
    /**
     * Decrement the transaction count / close out a transaction level
     *
     * @throws \CRM_Core_Exception
     */
    public function dec() {
      if (!isset($this->frames[0]) || $this->frames[0]->isEmpty()) {
        throw new \CRM_Core_Exception('Transaction integrity error: Expected to find active frame');
      }
  
  ```
  
  Here is the backtrace:
  
  ```
  (
      [callback] => Array
          (
              [0] => CRM_Core_Error
              [1] => handle
          )
  
      [code] => 0
      [message] => 
      [mode] => 16
      [debug_info] => 
      [type] => PEAR_Error
      [user_info] => 
      [to_string] => [pear_error: message="" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]
  )
  
  May 13 14:26:23  [info] $backTrace = #0 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/Error.php(236): CRM_Core_Error::backtrace("backTrace", TRUE)
  #1 /drupal_rootsites/all/modules/contrib/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(PEAR_Error))
  #2 /drupal_rootsites/all/modules/contrib/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(577): PEAR_Error->__construct("", 0, 16, (Array:2), NULL)
  #3 /drupal_rootsites/all/modules/contrib/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(Net_Socket), "", 0)
  #4 /drupal_rootsites/all/modules/contrib/civicrm/vendor/pear/net_socket/Net/Socket.php(173): PEAR->__call("raiseError", (Array:2))
  #5 /drupal_rootsites/all/modules/contrib/civicrm/packages/HTTP/Request.php(737): Net_Socket->connect("ssl://maps.googleapis.com", 443, NULL, "60", NULL)
  #6 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Utils/Geocode/Google.php(126): HTTP_Request->sendRequest()
  #7 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/BAO/Address.php(1371): CRM_Utils_Geocode_Google::format((Array:12))
  #8 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/BAO/Address.php(377): CRM_Core_BAO_Address::addGeocoderData((Array:12))
  #9 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/BAO/Address.php(144): CRM_Core_BAO_Address::fixAddress((Array:12))
  #10 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/BAO/Address.php(120): CRM_Core_BAO_Address::add((Array:12), TRUE)
  #11 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/BAO/Location.php(70): CRM_Core_BAO_Address::create((Array:48), TRUE, NULL)
  #12 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Contact/BAO/Contact.php(340): CRM_Core_BAO_Location::create((Array:48), TRUE)
  #13 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Contact/BAO/Contact.php(2007): CRM_Contact_BAO_Contact::create((Array:48))
  #14 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(2207): CRM_Contact_BAO_Contact::createProfileContact((Array:51), (Array:11), NULL, (Array:1), NULL, NULL, TRUE)
  #15 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Contribute/Form/Contribution/Confirm.php(709): CRM_Contribute_Form_Contribution_Confirm->processFormSubmission(NULL)
  #16 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/Form.php(490): CRM_Contribute_Form_Contribution_Confirm->postProcess()
  #17 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Contribute/Form/Contribution/Main.php(1295): CRM_Core_Form->mainProcess()
  #18 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Contribute/Form/Contribution/Main.php(1029): CRM_Contribute_Form_Contribution_Main->skipToThankYouPage()
  #19 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/Form.php(490): CRM_Contribute_Form_Contribution_Main->postProcess()
  #20 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/QuickForm/Action/Upload.php(169): CRM_Core_Form->mainProcess()
  #21 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/QuickForm/Action/Upload.php(136): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Contribute_Form_Contribution_Main), "upload")
  #22 /drupal_rootsites/all/modules/contrib/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Contribute_Form_Contribution_Main), "upload")
  #23 /drupal_rootsites/all/modules/contrib/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contribute_Form_Contribution_Main), "upload")
  #24 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/Controller.php(349): HTML_QuickForm_Page->handle("upload")
  #25 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/Invoke.php(311): CRM_Core_Controller->run((Array:3), NULL)
  #26 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/Invoke.php(85): CRM_Core_Invoke::runItem((Array:15))
  #27 /drupal_rootsites/all/modules/contrib/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
  #28 /drupal_rootsites/all/modules/contrib/civicrm/drupal/civicrm.module(444): CRM_Core_Invoke::invoke((Array:3))
  #29 /drupal_rootincludes/menu.inc(527): civicrm_invoke("contribute", "transact")
  #30 /drupal_rootindex.php(21): menu_execute_active_handler()
  #31 {main}
  
  ```
  
  Any idea what this means and what I should do to fix it?
  
  Edit: I've tested the contribution form without a discount code and got the same error. This is an established site that was working and no other changes have been made. I'm still going through the process of testing the upgrade on my dev. PHP 7.1
  
  Edit2: This is on my local dev environment using AMPPS on a Mac.
  Edit3: This seems to be something with how my local dev processes https requests with Google Maps.
  
  **Tags:** civicontribute, upgrade, cividiscount
  
  > **Comments:**
  > **username_1**: Did the upgrade script run OK? Can you find a backtrack in ConfigAndLog directory? Or turn on debugging to maybe get one?  
  > **username_0**: The upgrade went very smoothly and there wasn't anything in the log until I generated this error. I will update if I can get more details in a backtrace. Thank you.  
  > **username_2**: There are some suggestions in stackexchange for similar issues where running mysql_upgrade might help because some mysql system tables have got out of whack. Perhaps the host changed something with mysql recently?  
  > **username_0**: I've edited my post to add the backtrace.  
  > **username_0**: I figured out that this is just something wrong on my dev environment not being able to HTTPS probably being used by Google maps for geocoding.  
  
  ---
  
  ## 0 answers
  
  