<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>NRF9160: Downloading FOTA image crashes with SDK 1.4</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68954/nrf9160-downloading-fota-image-crashes-with-sdk-1-4</link><description>Hi, 
 I&amp;#39;ve had my share of problems with upgrading from SDK 1.3.1 to 1.4. Now I noticed that my app crashes randomly when I am downloading FOTA image with download_client(running SDK 1.4 app, updating to SDK1.4 app). I managed to catch one crash with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 08 Dec 2020 17:15:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68954/nrf9160-downloading-fota-image-crashes-with-sdk-1-4" /><item><title>RE: NRF9160: Downloading FOTA image crashes with SDK 1.4</title><link>https://devzone.nordicsemi.com/thread/283905?ContentTypeID=1</link><pubDate>Tue, 08 Dec 2020 17:15:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7631af6d-4e6f-4b9e-abee-f1cf90b863b3</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Could you try setting CONFIG_LOG=y in prj.conf? I did some experiments with a hello world sample and figured out that has to be done in order to get these log printed out:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/6bc4a6cda158a7f8013fb59975d00617ed623ea7/arch/arm/core/aarch32/cortex_m/fault.c#L344"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/6bc4a6cda158a7f8013fb59975d00617ed623ea7/arch/arm/core/aarch32/cortex_m/fault.c#L344&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/6bc4a6cda158a7f8013fb59975d00617ed623ea7/arch/arm/core/aarch32/fatal.c#L49"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/6bc4a6cda158a7f8013fb59975d00617ed623ea7/arch/arm/core/aarch32/fatal.c#L49&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Then you should get the faulting instruction address that caused the error, and you can look at the file &lt;em&gt;&amp;lt;..&amp;gt;&lt;/em&gt;&lt;span&gt;/&lt;/span&gt;&lt;em&gt;build/zephyr/zephyr.lst&lt;/em&gt; to figure out what function caused this error. You can also use&amp;nbsp;arm-none-eabi-addr2line.exe like done in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/64244/bus_fault"&gt;this ticket&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you can&amp;#39;t find it, I would just recommend you to add a bunch of logs (using &lt;em&gt;printk()&lt;/em&gt;) everywhere in your program to locate where the hardfault occurs.&lt;/p&gt;
&lt;p&gt;To be honest, I have not handled too many cases regarding hardfaults so there may be better ways of going about this. However, using logs always works for me when trying to locate the last line that was executed before a crash occurs.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160: Downloading FOTA image crashes with SDK 1.4</title><link>https://devzone.nordicsemi.com/thread/283050?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2020 11:20:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9394c907-0a59-47e8-a42f-9551d14987f1</guid><dc:creator>fastfox</dc:creator><description>&lt;p&gt;Oh crap, I&amp;#39;ve messed up some versions in git. The error above happens because I forgot the workaround from my fork for setting the timeout to TLS socket bug described in here&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/68594/nrf9160-download_client-does-not-work-anymore-in-sdk-1-4"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/68594/nrf9160-download_client-does-not-work-anymore-in-sdk-1-4&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Anyway. The crash hunt continues...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160: Downloading FOTA image crashes with SDK 1.4</title><link>https://devzone.nordicsemi.com/thread/283024?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2020 10:05:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3472e90d-0ef6-4c9d-afff-4e5a48977379</guid><dc:creator>fastfox</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;No luck with finding the line yet. but I found another bug. This a a bit more straight forward. download_client goes haywire and interprets HTTP headers as payload. See attached log, I commented my analysis to there. Consider this as issue/bug report/what_ever to download_client.&lt;/p&gt;
&lt;p&gt;I think the ultimate fault is that download_client does not use the length fields in HTTP header to decide the lenght of the payload in hand. Let me know your view&lt;/p&gt;
&lt;p&gt;I hit this 90% of times when I try to reproduce the crash problem.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/download_5F00_fails_5F00_commented.log"&gt;devzone.nordicsemi.com/.../download_5F00_fails_5F00_commented.log&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160: Downloading FOTA image crashes with SDK 1.4</title><link>https://devzone.nordicsemi.com/thread/282833?ContentTypeID=1</link><pubDate>Wed, 02 Dec 2020 09:49:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac346bb1-af0f-4473-9e30-2ed5fa849e17</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Are you able to&amp;nbsp;locate the exact line that causes the program to crash? Try&amp;nbsp;&lt;span style="font-family:inherit;"&gt;to enable more logging by setting these in prj.conf:&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_DFU_TARGET_LOG_LEVEL_DBG=y
CONFIG_DOWNLOAD_CLIENT_LOG_LEVEL_DBG=y
CONFIG_FOTA_DOWNLOAD_LOG_LEVEL_DBG=y&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;The value of the link register is not faulty. Usally it is used to hold the value of the address you&amp;#39;ll return to after a jump. This is not the case for exceptions,&amp;nbsp;&lt;/span&gt;ffffffa0 is an exception return value that says something about what context (interrupt, what stack etc..). Check out this:&amp;nbsp;&lt;a title="https://developer.arm.com/documentation/100235/0004/the-cortex-m33-processor/exception-model/exception-entry-and-return" href="https://developer.arm.com/documentation/100235/0004/the-cortex-m33-processor/exception-model/exception-entry-and-return" rel="noopener noreferrer" target="_blank"&gt;https://developer.arm.com/documentation/100235/0004/the-cortex-m33-processor/exception-model/exception-entry-and-return&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160: Downloading FOTA image crashes with SDK 1.4</title><link>https://devzone.nordicsemi.com/thread/282806?ContentTypeID=1</link><pubDate>Wed, 02 Dec 2020 08:31:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc4348aa-a971-4ad3-9fae-53568d072cf4</guid><dc:creator>fastfox</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I should have mentioned, it is already at max 4096&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF9160: Downloading FOTA image crashes with SDK 1.4</title><link>https://devzone.nordicsemi.com/thread/282801?ContentTypeID=1</link><pubDate>Wed, 02 Dec 2020 08:14:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:190da895-0e4a-4f60-bba9-2f766ce919fe</guid><dc:creator>Jon Helge</dc:creator><description>&lt;p&gt;A wild shot, but could you try to increase&amp;nbsp;&lt;span&gt;CONFIG_DOWNLOAD_CLIENT_STACK_SIZE ?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>