<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I’ll have a look at it over the weekend.<div class=""><br class=""></div><div class="">Regards, Mark.<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 17 Sep 2021, at 4:39 PM, Michael Balzer <<a href="mailto:dexter@expeedo.de" class="">dexter@expeedo.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="content-isolator__container"><div class="protected-part"><div class="protected-title">Signed PGP part</div><div class="protected-content">
  

    <meta http-equiv="content-type" content="text/html; charset=UTF-8" class="">
  
  <div class="">
    There is another fatal issue with OvmsSyncHttpClient besides the
    issue with running in the mongoose context: OTA updates are no
    longer possible.<br class="">
    <br class="">
    When flashing via HTTP, the OvmsSyncHttpClient tries to allocate
    memory for a full firmware image, which of course fails:<br class="">
    <br class="">
    <font face="monospace" class="">OVMS# ota flash http <br class="">
      Current running partition is: factory<br class="">
      Target partition is: ota_0<br class="">
      Download firmware from
      <a href="http://ovms.dexters-web.de/firmware/ota/v3.1/edge/ovms3.bin" class="">ovms.dexters-web.de/firmware/ota/v3.1/edge/ovms3.bin</a> to ota_0<br class="">
      Guru Meditation Error: Core  1 panic'ed (StoreProhibited).
      Exception was unhandled.<br class="">
      Core 1 register dump:<br class="">
      PC      : 0x4022438b  PS      : 0x00060a30  A0      : 0x802245cd 
      A1      : 0x3ffe9c70  <br class="">
      A2      : 0x00000000  A3      : 0x3ffe6f5c  A4      : 0x00000001 
      A5      : 0xffffffff  <br class="">
      A6      : 0x3fabad7c  A7      : 0xff000000  A8      : 0x00000000 
      A9      : 0x3ffe9c50  <br class="">
      A10     : 0x00000000  A11     : 0x3ffe6f5c  A12     : 0x00000001 
      A13     : 0x0000000a  <br class="">
      A14     : 0x00000037  A15     : 0x00000057  SAR     : 0x00000018 
      EXCCAUSE: 0x0000001d  <br class="">
      EXCVADDR: 0x00000000  LBEG    : 0x4008b179  LEND    : 0x4008b19b 
      LCOUNT  : 0xffffffff  <br class="">
      <br class="">
      ELF file SHA256: 94a8e191baae33a5<br class="">
      <br class="">
      Backtrace: 0x4022438b:0x3ffe9c70 0x402245ca:0x3ffe9c90
      0x40132f93:0x3ffe9cc0 0x40132e51:0x3ffe9d10 0x40133609:0x3ffe9d40
      0x402e7472:0x3ffe9d70 0x4010e229:0x3ffe9d90 0x4010fbd5:0x3ffe9dd0
      0x40110015:0x3ffe9e00 0x401102de:0x3ffe9e70 0x4010c51a:0x3ffe9ed0
      0x400f5a4f:0x3ffe9ef0 0x400f5afd:0x3ffe9f40<br class="">
      <br class="">
      Rebooting...<br class="">
      <br class="">
      <br class="">
      0x4022438b is in std::__cxx11::basic_string<char,
      std::char_traits<char>, std::allocator<char>
      >::_S_copy(char*, char const*, unsigned int)
(/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/esp32-psram/libstdc++-v3/include/bits/char_traits.h:243).<br class="">
      0x402245ca is in std::__cxx11::basic_string<char,
      std::char_traits<char>, std::allocator<char>
      >::reserve(unsigned int)
(/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/build/build-cc-gcc-final/xtensa-esp32-elf/esp32-psram/libstdc++-v3/include/bits/basic_string.tcc:298).<br class="">
      0x40132f93 is in
      OvmsSyncHttpClient::ConnectionHeaders(mg_connection*)
(/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/ovms_http/src/ovms_http.cpp:381).<br class="">
      376         else<br class="">
      377           {<br class="">
      378           if (header.compare(0,15,"Content-Length:") == 0)<br class="">
      379             {<br class="">
      380             m_bodysize = atoi(header.substr(15).c_str());<br class="">
      <b class="">381             m_body.reserve(m_bodysize+1);</b><br class="">
      382             }<br class="">
      383           else if (header.compare(0,5,"HTTP/") == 0)<br class="">
      384             {<br class="">
      385             size_t space = header.find(' ');<br class="">
      0x40132e51 is in
      OvmsSyncHttpClient::ConnectionData(mg_connection*, unsigned char*,
      unsigned int)
(/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/ovms_http/src/ovms_http.cpp:316).<br class="">
      311           data += len;<br class="">
      312           consumed += len;<br class="">
      313           len = 0;<br class="">
      314           }<br class="">
      315     <br class="">
      316         ConnectionHeaders(nc);<br class="">
      317         }<br class="">
      318     <br class="">
      319       if (! m_inheaders)<br class="">
      320         {<br class="">
      0x40133609 is in
      OvmsSyncHttpClient::MongooseCallback(mg_connection*, int, void*)
(/home/balzer/esp/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/components/ovms_http/src/ovms_http.cpp:124).<br class="">
      119           m_mgconn = NULL;<br class="">
      120           }<br class="">
      121           break;<br class="">
      122     <br class="">
      123         case MG_EV_RECV:<br class="">
      124           mbuf_remove(&nc->recv_mbuf,
      ConnectionData(nc,(uint8_t*)nc->recv_mbuf.buf,
      nc->recv_mbuf.len));<br class="">
      125           break;<br class="">
      126     <br class="">
      127         default:<br class="">
      128           break;</font><br class="">
    <br class="">
    <br class="">
    Can we switch back to using the old async client?<br class="">
    <br class="">
    Regards,<br class="">
    Michael<br class="">
    <br class="">
    <pre class="moz-signature" cols="72">-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26</pre>
  </div>

</div></div><br class=""><iframe class="content-isolator__isolated-content" sandbox="allow-scripts" scrolling="auto" width="200" height="10" style="border:none;display:block;overflow:auto;" data-src="data:text/html;charset=UTF-8;base64,PGlmcmFtZS1jb250ZW50IGRhdGEtaWZyYW1lLWhlaWdodD0idHJ1ZSI+X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX188QlI+T3Ztc0RldiBtYWlsaW5nIGxpc3Q8QlI+T3Ztc0RldkBsaXN0cy5vcGVudmVoaWNsZXMuY29tPEJSPmh0dHA6Ly9saXN0cy5vcGVudmVoaWNsZXMuY29tL21haWxtYW4vbGlzdGluZm8vb3Ztc2RldjxCUj48L2lmcmFtZS1jb250ZW50Pg=="></iframe></div></div></blockquote></div><br class=""></div></body></html>