<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>al_load_bitmap crash ?!</title>
		<link>http://www.allegro.cc/forums/view/606226</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sat, 29 Jan 2011 13:56:47 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>i also included allegro_image.h and lib but al_load_bitmap(&quot;asd.bmp&quot;); crashes. the image file is in the same directory.. No problem at loading but when i try to draw the bitmap, it crashes :/
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (xantier)</author>
		<pubDate>Sat, 29 Jan 2011 09:22:19 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Did you call <a href="http://www.allegro.cc/manual/5/al_init_image_addon">al_init_image_addon</a> first?</p><p>Also, how are you drawing the bitmap?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Edgar Reynaldo)</author>
		<pubDate>Sat, 29 Jan 2011 09:37:52 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><span class="source-code"><a href="http://www.allegro.cc/manual/al_load_bitmap"><span class="a">al_load_bitmap</span></a><span class="k2">(</span><span class="k2">)</span></span> must have returned null due to either not calling <span class="source-code"><a href="http://www.allegro.cc/manual/al_init_image_addon"><span class="a">al_init_image_addon</span></a><span class="k2">(</span><span class="k2">)</span></span> or the program not running in the directory you think it is.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Sat, 29 Jan 2011 09:45:41 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>okay one more question</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/ALLEGRO_BITMAP"><span class="a">ALLEGRO_BITMAP</span></a> <span class="k3">*</span>tempo<span class="k2">;</span>
tempo<span class="k3">=</span><a href="http://www.allegro.cc/manual/al_load_bitmap"><span class="a">al_load_bitmap</span></a><span class="k2">(</span>filename<span class="k2">)</span><span class="k2">;</span>

<span class="k1">for</span> <span class="k2">(</span><span class="k1">int</span> i<span class="k3">=</span><span class="n">0</span><span class="k2">;</span>i<span class="k3">&lt;</span>Imgn<span class="k2">;</span>i<span class="k3">+</span><span class="k3">+</span><span class="k2">)</span>
<span class="k2">{</span>
Image.push_back<span class="k2">(</span><a href="http://www.allegro.cc/manual/al_create_sub_bitmap"><span class="a">al_create_sub_bitmap</span></a><span class="k2">(</span>tempo,<span class="k2">(</span>i<span class="k3">*</span>Imgw<span class="k2">)</span>,<span class="n">0</span>,Imgw,Imgh<span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>
<span class="k2">}</span>

<a href="http://www.allegro.cc/manual/al_destroy_bitmap"><span class="a">al_destroy_bitmap</span></a><span class="k2">(</span>tempo<span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

this code gives assertion (void*)0 error.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (xantier)</author>
		<pubDate>Sat, 29 Jan 2011 13:22:10 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>You forgot to check al_load_bitmap for failure.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sat, 29 Jan 2011 13:23:42 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>when i remove destroy code, it works correctly. so how to remove temporary bitmap ?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (xantier)</author>
		<pubDate>Sat, 29 Jan 2011 13:25:17 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>From the manual:
</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p> Note that destroying parents of sub-bitmaps will not destroy the sub-bitmaps; instead the sub-bitmaps become invalid and should no longer be used.
</p></div></div><p>Don&#39;t destroy the parent bitmap before you are done with the sub-bitmaps.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Matthew Leverton)</author>
		<pubDate>Sat, 29 Jan 2011 13:36:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>uhh then i will define another vector that contains images..</p><p>or current vector&#39;s first element will be main image for animated images
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (xantier)</author>
		<pubDate>Sat, 29 Jan 2011 13:56:47 +0000</pubDate>
	</item>
</rss>
