<br><br><div class="gmail_quote">On Wed, Nov 21, 2012 at 7:49 AM, Shani Hadiyanto Pribadi <span dir="ltr"><<a href="mailto:shanipribadi@gmx.net" target="_blank">shanipribadi@gmx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
That's it. Apparently the cause of segfault is dereferencing the pointer when there's no data.<br>After adding checks for available data the segfault does not happen anymore.<br><br>It never occured to me that was the cause because on the C version, accessing the pointer when there's no data<br>

returns 0x6a but didn't segfault. <br></blockquote><div><br>accessing an undefined pointer has undefined results. you can rely on that. in C, in C++ and in any other language with pointers.<br></div></div>