<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>[A5] al_create_native_file_dialog() crashes</title>
		<link>http://www.allegro.cc/forums/view/607954</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Thu, 28 Jul 2011 08:54:08 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>hi! me again. i&#39;m having some issues with the al_create_native_file_dialog() function. what i&#39;m trying to do is to show a dialog to open file, like file_select_ex() for the old A4. for some reason wich i don&#39;t know, mi app crashes while calling the al_create_native_file_dialog() function.</p><p><span class="source-code"><a href="http://www.allegro.cc/manual/ALLEGRO_FILECHOOSER"><span class="a">ALLEGRO_FILECHOOSER</span></a> <span class="k3">*</span>OpenFile <span class="k3">=</span> <a href="http://www.allegro.cc/manual/al_create_native_file_dialog"><span class="a">al_create_native_file_dialog</span></a><span class="k2">(</span><span class="s">"C:\\"</span>, <span class="s">"Open File"</span>, NULL, ALLEGRO_FILECHOOSER_FILE_MUST_EXIST<span class="k2">)</span><span class="k2">;</span></span></p><p>i know that&#39;s an OS native function, so i must say that i&#39;m using Win7. what am i doing wrong?</p><p>thank you all in advance!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ehguacho)</author>
		<pubDate>Wed, 27 Jul 2011 23:34:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Try &quot;*.*&quot; as the third parameter.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Thu, 28 Jul 2011 00:07:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>tried that already, and didn&#39;t work. also i tried it by modifying the fourth parameter, but no luck neither.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ehguacho)</author>
		<pubDate>Thu, 28 Jul 2011 00:22:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>It shouldn&#39;t crash. You&#39;ll probably have to walk through the Allegro code with a debugger.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Thu, 28 Jul 2011 01:10:45 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>and how should i do that? i&#39;m using code::blocks 10.05.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ehguacho)</author>
		<pubDate>Thu, 28 Jul 2011 06:40:35 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Code::Blocks is your IDE, not your compiler. I&#39;m guessing you&#39;re using MinGW, so you need to download gdb from the <a href="http://sourceforge.net/projects/mingw/files/MinGW/BaseSystem/">sourceforge site for MinGW</a>. The latest version of gdb also requires some runtime library which I can&#39;t remember at the moment. You can also find it at sourceforge in the MinGW project.</p><p>Once you have gdb installed to your path (or your path adjusted to include the directory where gdb is) ((putting it in mingw/bin is probably the best option)), then you run your program through gdb. (You&#39;ll need to compile your program with debugging symbols, and link to the debugging version of Allegro).</p><pre>
gdb my_program.exe
&gt;...
&gt;run
CRASH!
&gt;backtrace
0 function 0x0000blah from sourcefile.c line 123
1 ...
2 ...
...
</pre><p>

What we need is to see the results of the backtrace.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Thu, 28 Jul 2011 08:35:09 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>The only reason why it &quot;should&quot; crash is if you haven&#39;t initialized Allegro. So if you are doing that, then proceed to debug.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Thu, 28 Jul 2011 08:54:08 +0000</pubDate>
	</item>
</rss>
