<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.newlc.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>NewLC - Panic USER 8 after append data two times in HBufC reallocated Descriptor. - Comments</title>
 <link>http://www.newlc.com/en/forum/panic-user-8-after-append-data-two-times-hbufc-reallocated-descriptor</link>
 <description>Comments for &quot;Panic USER 8 after append data two times in HBufC reallocated Descriptor.&quot;</description>
 <language>en</language>
<item>
 <title>Re: Panic USER 8 after append data two times in HBufC reallocate</title>
 <link>http://www.newlc.com/en/forum/panic-user-8-after-append-data-two-times-hbufc-reallocated-descriptor#comment-40814</link>
 <description>&lt;p&gt;Dear SymbianTG,&lt;/p&gt;

&lt;p&gt;There are other issues, besides just the panic. One by one:&lt;/p&gt;

&lt;p&gt;1. Please read the Symbian OS documentation on the panic code. Here&#039;s what it says:&lt;br /&gt;
This panic is raised when a length value passed to a 16-bit variant descriptor member function is invalid. It may be raised by some descriptor constructors and, specifically, by the Replace() and Set() descriptor member functions. That should give you a good hint as to where things are getting wrong...&lt;/p&gt;

&lt;p&gt;2. Don&#039;t use HBuf! See &lt;a href=&quot;http://tanzim.wordpress.com/2006/05/29/help-descriptors/&quot; class=&quot;bb-url&quot;&gt;this &lt;/a&gt;for descriptor usage guides.&lt;/p&gt;

&lt;p&gt;3. The &lt;code&gt;EndElement&lt;/code&gt; method signature suggests its non leaving, however, you are calling leaving functions inside and NOT even bothering to push objects into the cleanup stack. Very messy!&lt;/p&gt;

&lt;p&gt;4. The &lt;code&gt;EndElement&lt;/code&gt; method can be optimised and re-written to be more readable. You seem to be allocating and creating variables when they are not needed.&lt;/p&gt;

&lt;p&gt;Finally, what on earth is your function trying to achive? It looks like it can be solved in a  lot better way...&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description>
 <pubDate>Sat, 18 Aug 2007 20:00:10 +0200</pubDate>
 <dc:creator>maxxxpayne</dc:creator>
 <guid isPermaLink="false">comment 40814 at http://www.newlc.com</guid>
</item>
<item>
 <title>Panic USER 8 after append data two times in HBufC reallocated Descriptor.</title>
 <link>http://www.newlc.com/en/forum/panic-user-8-after-append-data-two-times-hbufc-reallocated-descriptor</link>
 <description>&lt;p&gt;Get Panic USER-8 when i=2 that data not copy into the descriptor.&lt;br /&gt;
and i reallocated descriptor with 14 also look following&lt;/p&gt;

&lt;p&gt;my String is: &quot;Abcdef &lt;Ghijkl&gt; M&quot;&lt;br /&gt;
Array Count is: 5&lt;br /&gt;
like:&lt;br /&gt;
Abcdef&lt;space&gt; = 7 ----&gt; i=0&lt;br /&gt;
&lt; 7+1 = 8 ----&gt; i=1&lt;br /&gt;
ghijkl 8+6 = 14 ---&gt; i=2&lt;/p&gt;

&lt;p&gt;i Get string only: &quot;Abcdef &lt;&quot;&lt;br /&gt;
i check at debug time first of all reallocate with 8 (Total Len: Abcdef &lt;)&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/en/forum/panic-user-8-after-append-data-two-times-hbufc-reallocated-descriptor&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/en/forum/panic-user-8-after-append-data-two-times-hbufc-reallocated-descriptor#comments</comments>
 <category domain="http://www.newlc.com/en/forums/symbian-c">Symbian C++</category>
 <pubDate>Sat, 18 Aug 2007 16:57:13 +0200</pubDate>
 <dc:creator>SymbianTG</dc:creator>
 <guid isPermaLink="false">18680 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
