<?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>Crash when dereferencing pointer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93612/crash-when-dereferencing-pointer</link><description>I wrote this function: 
 
 When calling it and 
 
 ptr points to something odd, the chip seems to crash. Can you not dereference odd memory addresses? 
 Or is there a different reason for the crash? 
 
 Kind regards, 
 Daniel</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 07 Nov 2022 21:56:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93612/crash-when-dereferencing-pointer" /><item><title>RE: Crash when dereferencing pointer</title><link>https://devzone.nordicsemi.com/thread/394552?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2022 21:56:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d42f31d-e531-4772-ade1-06ae64219fd2</guid><dc:creator>Daniel Dakhno</dc:creator><description>&lt;p&gt;Would it have been that hard to be useful and give a direct answer?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Crash when dereferencing pointer</title><link>https://devzone.nordicsemi.com/thread/394445?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2022 13:36:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc32a064-4e43-46b9-abc4-5e15e55c95fc</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The pointers need to be word aligned. Try to increment it by +=4 instead of +=2.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Crash when dereferencing pointer</title><link>https://devzone.nordicsemi.com/thread/394309?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2022 07:10:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09923208-27cf-484f-adcf-9db53c04756a</guid><dc:creator>nRF5xFanboy</dc:creator><description>&lt;p&gt;Hi Daniel,&lt;br /&gt;&lt;br /&gt;HINT: How big is the size of&amp;nbsp;a memory address?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;&amp;nbsp; &amp;nbsp; nRF5xFanBoy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>