<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Unhandled Exception etc...: Access Violation Reading Location 0x00000000</title>
		<link>http://www.allegro.cc/forums/view/590183</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Fri, 23 Feb 2007 00:34:57 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>hey guys! I&#39;ve been trying to learn Allegro and finally found a tutorial so I started doing it. It is a LoomSoft&#39;s tutorials for &quot;Newbies&quot;. So far it&#39;s going great. It&#39;s got me really excited about Allegro!</p><p>Anyway, while doing the 8th lesson in the series &lt;<a href="http://www.loomsoft.net/resources/alltut/alltut_index.htm">http://www.loomsoft.net/resources/alltut/alltut_index.htm</a>&gt; I have come across a little snag. My problem is not related to the code in the tutorial. The tutorial is going fine. The problem appears to be with my OO approach to the tutorial. In other words, I&#39;ve been trying to encapsulate the functionality in classes to simplify the code and clean it up a little.</p><p>I&#39;ve attached a copy of the &#39;project&#39; code so you can compile it yourself and see what&#39;s happening &lt;*EDIT* Added link to attachment for convenience: <a href="http://www.allegro.cc/files/attachment/591278">http://www.allegro.cc/files/attachment/591278</a>&gt;. I would give you more for output, but I can&#39;t figure out how to get a call stack at the moment and I gotta leave for work in a minute (to work on JavaScript <img src="http://www.allegro.cc/forums/smileys/cry.gif" alt=":&#39;(" />).</p><p>Sorry there is no makefile, etc., but I haven&#39;t yet learned to write a makefile and I was doing lessons 7 and 8 in Windows with VS .NET 2003 anyway (I did the first 6 in Linux and wanted to see if I could get them working in Windows too). I was going to leave the project files in the loomsoft-tutorial/src/win/ directory, but I wasn&#39;t sure if it was legal to distribute them from an educational version of the IDE, etc. <img src="http://www.allegro.cc/forums/smileys/rolleyes.gif" alt="::)" /></p><p>Anyway, the project compiles okay, I think, but when I execute the resulting program I get the following:</p><p>Unhandled exception at 0x004013c0 in lesson8.exe: 0xC0000005: Access violation reading location 0x00000000.</p><p>I haven&#39;t had much time to look into the cause of the problem, but my Google searches didn&#39;t return anything related. (The few forums that looked to have the same problem were guided in a different direction and never concluded the exception).</p><p>I would throw in exception handling to prevent a fatal crash, but the code VS .NET 2003 is pointing to as the cause is not doing anything but setting a member in an accessor method. Granted, the member is also an object, but I thought it was still straight-forward... I honestly haven&#39;t had a chance to use C/C++ before now in months.</p><p>Anyway, I found that my Debug and Release projects appear to throw the same type of exceptions at different points in the code too. Hmmm.</p><p>If you have a chance please look at, compile, and execute the project and tell me what&#39;s wrong; or just tell me what could cause an &quot;access violations&quot; exception. I thought maybe it was related to the public, private, and protected keywords so to rule that out I put everything public temporarily... So don&#39;t worry about that, the members were all private/protected. But it&#39;s still throwing the same exception. <img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" /></p><p>I&#39;d also like feedback on the directory structure of my project since I&#39;m trying to do it the right way. I really prefer the *nix directory structure to Windows&#39;.</p><p>/                     - This is the project root, for example, loomsoft-tutorial.<br /><i>bin</i>                 - Was going to put executables or dlls here for distribution.<br /><i>data</i>                - I couldn&#39;t find the &quot;right&quot; directory to put data such as images in so I just created a data directory. What do you guys do?<br /><i>include</i>             - The main header files are here.<br /><i>lib</i>                 - Was going to put any static libraries here.<br /><i>src</i>                 - As you can see, the main source code files are here.<br /><i>src/win</i>             - Was putting my VS .NET 2003 project files here.<br /><i>src/linux</i>           - Was planning to put Linux specific files here, if any.</p><p>Please note the duplicate data directory (/src/data/) is only there so I could get VS .NET 2003 to see them for debugging... I&#39;m not sure of the right way to do it, nor the right place to have the project files vs. the data files. I&#39;d like feedback.</p><p>Thanks a lot! <img src="http://www.allegro.cc/forums/smileys/cool.gif" alt="8-)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bamccaig)</author>
		<pubDate>Wed, 21 Feb 2007 19:31:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Without looking at your project, I&#39;d say you&#39;re dereferencing NULL.<br />In other words, either you do something like this directly:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">int</span><span class="k3">*</span> someptr <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
<span class="k3">*</span>someptr <span class="k3">=</span> something<span class="k2">;</span> <span class="c">// this crashes</span>
</pre></div></div><p>
...or, more likely, you call a member function of a NULL object. Technically, that in itself isn&#39;t a problem (unless the function is virtual), but a member function will typically access member variables, and if you call a member function on a NULL object, this means dereferencing NULL. Example:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">class</span> foo <span class="k2">{</span>
  protected:
    <span class="k1">int</span> bar<span class="k2">;</span>
  public:
    <span class="k1">void</span> set_bar<span class="k2">(</span><span class="k1">int</span> newbar<span class="k2">)</span> <span class="k2">{</span> bar <span class="k3">=</span> newbar<span class="k2">;</span> <span class="k2">}</span>
<span class="k2">}</span><span class="k2">;</span>

<span class="k1">int</span> main<span class="k2">(</span><span class="k2">)</span> <span class="k2">{</span>
  foo<span class="k3">*</span> my_foo <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
  my_foo-&gt;set_bar<span class="k2">(</span><span class="n">23</span><span class="k2">)</span><span class="k2">;</span> <span class="c">// this will crash</span>
  <span class="k1">return</span> <span class="n">0</span><span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Tobias Dammers)</author>
		<pubDate>Wed, 21 Feb 2007 20:10:51 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Yeah, that sounds like it could be related... I think the objects themselves are instanciated, however, there might be references to members that are null (including objects as members)... If a member is NULL can you not return it?</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">int</span> get_bar<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span>
<span class="k2">{</span>
   <span class="k1">return</span> bar<span class="k2">;</span>         <span class="c">// Would this crash if bar is NULL?</span>
<span class="k2">}</span>

<span class="c">// Should I be doing this instead:</span>

<span class="k1">int</span> get_bar<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span>
<span class="k2">{</span>
    <span class="k1">if</span><span class="k2">(</span>bar <span class="k3">!</span><span class="k3">=</span> NULL<span class="k2">)</span>
        <span class="k1">return</span> bar<span class="k2">;</span>
    <span class="k1">else</span>
        <span class="k1">return</span> NULL<span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>

I just glanced at your post though so I&#39;m not sure I fully grasped it. I&#39;m thinking maybe it is possible for that to work with primitive types. If so what if you tried to return a NULL object?</p><div class="source-code snippet"><div class="inner"><pre>myOBJECT <span class="k3">*</span>get_object<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span>
<span class="k2">{</span>
    <span class="k1">return</span> object<span class="k2">;</span>    <span class="c">// Will this crash when object is NULL?</span>
<span class="k2">}</span>

<span class="c">// Should I do this:</span>

myOBJECT <span class="k3">*</span>get_object<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span>
<span class="k2">{</span>
    <span class="k1">if</span><span class="k2">(</span>object <span class="k3">!</span><span class="k3">=</span> NULL<span class="k2">)</span>
        <span class="k1">return</span> object<span class="k2">;</span>
    <span class="k1">else</span>
        <span class="k1">return</span> NULL<span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bamccaig)</author>
		<pubDate>Wed, 21 Feb 2007 20:42:15 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
or just tell me what could cause an &quot;access violations&quot; exception. I thought maybe it was related to the public, private, and protected keywords so to rule that out I put everything public temporarily...
</p></div></div><p>The public, private and protected keywords are enforced at compile time, not at run time: they may cause your program to fail to compile, but they should not cause it to crash.<br />An &quot;access violation&quot; means your code was trying to access memory that your program does not &#39;own&#39; at all; in this case, location 0x0, or NULL.  Note that it is fine to return NULL; the problem is when you try to access the memory at location NULL.  So &quot;return NULL&quot; is fine, and if object == NULL, &quot;return object&quot; is fine, but &quot;return *object&quot; and &quot;return object-&gt;fieldName&quot; will both cause your program to crash, because they&#39;re trying to look inside the &quot;object&quot; pointer to see the memory it&#39;s pointing to.</p><p>MSVC should have a debugger built in -- try running the program with the debugger.  Then it should halt execution on the error and tell you where in the code it&#39;s happening.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Wed, 21 Feb 2007 21:27:07 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">int</span> get_bar<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span>
<span class="k2">{</span>
   <span class="k1">return</span> bar<span class="k2">;</span>         <span class="c">// Would this crash if bar is NULL?</span>
<span class="k2">}</span>
</pre></div></div><p>
</p></div></div><p>

Hm, judging by your post, <tt>bar</tt> is not a pointer (but an <tt>int</tt>). If it is in fact a <tt>int*</tt>, it would have to be:</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">int</span> get_bar<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span>
<span class="k2">{</span>
  <span class="k1">return</span> <span class="k3">*</span>bar<span class="k2">;</span>  <span class="c">// Argh! Dereferencing null pointer! Bad!</span>
<span class="k2">}</span>

<span class="k1">int</span><span class="k3">*</span> get_bar<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span>
<span class="k2">{</span>
  <span class="k1">return</span> bar<span class="k2">;</span>   <span class="c">// Safe in any case, as there's no dereferenciation.</span>
<span class="k2">}</span>
<span class="c">// However, get_bar() might be NULL, so be careful with its return value.</span>
</pre></div></div><p>

</p><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">int</span> get_bar<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span>
<span class="k2">{</span>
    <span class="k1">if</span><span class="k2">(</span>bar <span class="k3">!</span><span class="k3">=</span> NULL<span class="k2">)</span>
        <span class="k1">return</span> bar<span class="k2">;</span>
    <span class="k1">else</span>
        <span class="k1">return</span> NULL<span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>
</p></div></div><p>

This is not different to just <tt>return bar;</tt>. With <tt>return *bar;</tt>, however, it&#39;s a completely different story.</p><p>Same thing applies to non-primitive data types.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Indeterminatus)</author>
		<pubDate>Wed, 21 Feb 2007 21:28:32 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Your comments, plus my comments.
</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td><span class="k1">int</span> get_bar<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span></td></tr><tr><td class="number">2</td><td><span class="k2">{</span></td></tr><tr><td class="number">3</td><td>   <span class="k1">return</span> bar<span class="k2">;</span>         <span class="c">// You: Would this crash if bar is NULL?</span></td></tr><tr><td class="number">4</td><td>                       <span class="c">// Me: No. It would crash if this (the "this" pointer) is NULL.</span></td></tr><tr><td class="number">5</td><td><span class="k2">}</span></td></tr><tr><td class="number">6</td><td>&#160;</td></tr><tr><td class="number">7</td><td><span class="c">// You: Should I be doing this instead:</span></td></tr><tr><td class="number">8</td><td><span class="c">// Me: No.</span></td></tr><tr><td class="number">9</td><td>&#160;</td></tr><tr><td class="number">10</td><td><span class="k1">int</span> get_bar<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span></td></tr><tr><td class="number">11</td><td><span class="k2">{</span></td></tr><tr><td class="number">12</td><td>    <span class="k1">if</span><span class="k2">(</span>bar <span class="k3">!</span><span class="k3">=</span> NULL<span class="k2">)</span></td></tr><tr><td class="number">13</td><td>        <span class="k1">return</span> bar<span class="k2">;</span></td></tr><tr><td class="number">14</td><td>    <span class="k1">else</span></td></tr><tr><td class="number">15</td><td>        <span class="k1">return</span> NULL<span class="k2">;</span></td></tr><tr><td class="number">16</td><td><span class="k2">}</span></td></tr></tbody></table></div></div><p>
Let&#39;s review the concept of a pointer.<br />A pointer is a variable with a value. But unlike &quot;normal&quot; variables, the value a pointer holds is not a number, a character, or an object, but rather a memory address. Just like real-life addresses, this address tells you where something is. So if you declare these two variables:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">int</span> a <span class="k3">=</span> <span class="n">25</span><span class="k2">;</span>
<span class="k1">int</span><span class="k3">*</span> b <span class="k3">=</span> <span class="k3">&amp;</span>a<span class="k2">;</span> <span class="c">// initialize b to point to a</span>
</pre></div></div><p>
b tells you where to find a. Of course this example is trivial, but that&#39;s not the point here.<br />The problem is that in order to use a chunk of memory, you need to first allocate it properly; that is, you need to ask the OS for some memory. (You don&#39;t need to worry about this for normal (non-pointer) variables, since C does all the dirty work for you with these.)<br />Now if a pointer points somewhere un-allocated (not just NULL, but any memroy address that doesn&#39;t &quot;belong&quot; to you), you may be &quot;lucky&quot;, and be granted access to this non-allocated memory (this is not a good thing though: at any given time, any other process in the system may rightfully claim &quot;your&quot; memory, and you and the other process will be overwriting each other&#39;s memory). Usually though, the OS will prevent you from doing this, and throw a runtime exception at you.<br />As long as you don&#39;t access the memory though, all the pointer does is point to it.</p><p>So how do situations like the above arise? There are a number of common causes for these so-called &quot;stray pointers&quot;.<br />1) Uninitialized pointers. Example:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">int</span><span class="k3">*</span> a<span class="k2">;</span>
<span class="k3">*</span>a <span class="k3">=</span> <span class="n">27</span><span class="k2">;</span> <span class="c">// a may point to anything, but not to anything valid</span>
</pre></div></div><p>
2) Returning pointers to local variables. Example:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">int</span><span class="k3">*</span> foo<span class="k2">(</span><span class="k2">)</span> <span class="k2">{</span>
  <span class="k1">int</span> bar<span class="k2">;</span>
  <span class="k1">return</span> <span class="k3">&amp;</span>bar<span class="k2">;</span> <span class="c">// bar loses focus right after returning, so the pointer is invalid</span>
<span class="k2">}</span>
</pre></div></div><p>
3) Not checking against NULL where this would be appropriate. (It is common practice for functions to return NULL on failure; if a function is documented to do so, please check). Example:
</p><div class="source-code snippet"><div class="inner"><pre><a href="http://www.allegro.cc/manual/BITMAP" target="_blank"><span class="a">BITMAP</span></a><span class="k3">*</span> bmp <span class="k3">=</span> <a href="http://www.allegro.cc/manual/load_bitmap" target="_blank"><span class="a">load_bitmap</span></a><span class="k2">(</span><span class="s">"my_image.bmp"</span>, NULL<span class="k2">)</span><span class="k2">;</span>
<a href="http://www.allegro.cc/manual/draw_sprite" target="_blank"><span class="a">draw_sprite</span></a><span class="k2">(</span><a href="http://www.allegro.cc/manual/screen" target="_blank"><span class="a">screen</span></a>, bmp, <span class="n">20</span>, <span class="n">20</span><span class="k2">)</span><span class="k2">;</span> <span class="c">// if bmp is NULL, this can crash!</span>
</pre></div></div><p>
4) Calling class methods on NULL pointers. Example:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">class</span> foo <span class="k2">{</span>
  protected:
    <span class="k1">int</span> bar<span class="k2">;</span>
  public:
    <span class="k1">int</span> get_bar<span class="k2">(</span><span class="k2">)</span> <span class="k2">{</span> <span class="k1">return</span> bar<span class="k2">;</span> <span class="k2">}</span>
<span class="k2">}</span><span class="k2">;</span>

<span class="k1">int</span> main<span class="k2">(</span><span class="k2">)</span> <span class="k2">{</span>
  foo myfoo <span class="k3">=</span> NULL<span class="k2">;</span>
  cout <span class="k3">&lt;</span><span class="k3">&lt;</span> myfoo-&gt;get_bar<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span> <span class="c">// myfoo is NULL, so this will crash.</span>
<span class="k2">}</span>
</pre></div></div><p>
5) Not setting pointers to NULL after freeing their memory. Example:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">int</span><span class="k3">*</span> a <span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_551.html" target="_blank">malloc</a><span class="k2">(</span><span class="k1">sizeof</span><span class="k2">(</span><span class="k1">int</span><span class="k2">)</span> <span class="k3">*</span> <span class="n">15</span><span class="k2">)</span><span class="k2">;</span>
<span class="k1">int</span> i<span class="k2">;</span>
<span class="k1">for</span> <span class="k2">(</span>i <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span> i <span class="k3">&lt;</span> <span class="n">15</span><span class="k2">;</span> <span class="k3">+</span><span class="k3">+</span>i<span class="k2">)</span>
  a<span class="k3">&lt;</span>i&gt; <span class="k3">=</span> i<span class="k3">*</span>i<span class="k2">;</span>
<a href="http://www.delorie.com/djgpp/doc/libc/libc_350.html" target="_blank">free</a><span class="k2">(</span>a<span class="k2">)</span><span class="k2">;</span>
<a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"%i"</span>, a<span class="k2">[</span><span class="n">7</span><span class="k2">]</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
6) Overflowing buffers. (Not really a stray pointer example, but still a common cause for an access violation.) Example:
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">int</span><span class="k3">*</span> a <span class="k3">=</span> <a href="http://www.delorie.com/djgpp/doc/libc/libc_551.html" target="_blank">malloc</a><span class="k2">(</span><span class="k1">sizeof</span><span class="k2">(</span><span class="k1">int</span><span class="k2">)</span> <span class="k3">*</span> <span class="n">15</span><span class="k2">)</span><span class="k2">;</span>
<span class="k1">int</span> i<span class="k2">;</span>
<span class="k1">for</span> <span class="k2">(</span>i <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span> i <span class="k3">&lt;</span> <span class="n">15</span><span class="k2">;</span> <span class="k3">+</span><span class="k3">+</span>i<span class="k2">)</span>
  a<span class="k3">&lt;</span>i&gt; <span class="k3">=</span> i<span class="k3">*</span>i<span class="k2">;</span>
<a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"%i"</span>, a<span class="k2">[</span><span class="n">32</span><span class="k2">]</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>
7) Passing NULL to a function that doesn&#39;t expect it. Early versions of allegro&#39;s destroy_bitmap() had this problem IIRC.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Tobias Dammers)</author>
		<pubDate>Wed, 21 Feb 2007 22:06:34 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td>&#160;</td></tr><tr><td class="number">2</td><td><span class="c">// I guess I will run through the basics to make sure I remember.</span></td></tr><tr><td class="number">3</td><td><span class="k1">int</span> x<span class="k3">=</span><span class="n">5</span><span class="k2">;</span></td></tr><tr><td class="number">4</td><td><span class="k1">int</span><span class="k3">*</span> y<span class="k2">;</span></td></tr><tr><td class="number">5</td><td><span class="k1">int</span><span class="k3">*</span> z<span class="k2">;</span></td></tr><tr><td class="number">6</td><td><span class="k1">int</span><span class="k3">*</span><span class="k3">*</span> cRaZy<span class="k2">;</span></td></tr><tr><td class="number">7</td><td><span class="k1">int</span><span class="k3">*</span><span class="k3">*</span><span class="k3">*</span> YzArC<span class="k2">;</span></td></tr><tr><td class="number">8</td><td>myOBJECT<span class="k3">*</span> ptr_objObject <span class="k3">=</span> NULL<span class="k2">;</span></td></tr><tr><td class="number">9</td><td>myOBJECT objObject <span class="k3">=</span> NULL<span class="k2">;</span></td></tr><tr><td class="number">10</td><td>&#160;</td></tr><tr><td class="number">11</td><td><span class="c">// I wonder if it would also work to just define them on one line as...</span></td></tr><tr><td class="number">12</td><td><span class="k1">int</span><span class="k3">*</span> a, b<span class="k2">;</span>     <span class="c">// Would b also be a pointer or just a?</span></td></tr><tr><td class="number">13</td><td>&#160;</td></tr><tr><td class="number">14</td><td><span class="c">/*</span></td></tr><tr><td class="number">15</td><td><span class="c"> * I don't actually know how to release the memory of a pointer so I will</span></td></tr><tr><td class="number">16</td><td><span class="c"> * only guess. Please tell me how to do it correctly. Since I never set</span></td></tr><tr><td class="number">17</td><td><span class="c"> * a or b to an address do I need to call free()? What does free() do?</span></td></tr><tr><td class="number">18</td><td><span class="c"> */</span></td></tr><tr><td class="number">19</td><td>a<span class="k3">=</span>NULL<span class="k2">;</span></td></tr><tr><td class="number">20</td><td>b<span class="k3">=</span>NULL<span class="k2">;</span></td></tr><tr><td class="number">21</td><td>&#160;</td></tr><tr><td class="number">22</td><td><span class="c">/*</span></td></tr><tr><td class="number">23</td><td><span class="c"> * Can I set the value of y without it having an address set? I'm not very</span></td></tr><tr><td class="number">24</td><td><span class="c"> * familiar with malloc() (I think I've used it, likely in OpenGL tutorials),</span></td></tr><tr><td class="number">25</td><td><span class="c"> * but it seems like that would be what that is for - meaning this will not work</span></td></tr><tr><td class="number">26</td><td><span class="c"> * and could (likely will) crash.</span></td></tr><tr><td class="number">27</td><td><span class="c"> */</span></td></tr><tr><td class="number">28</td><td><span class="k3">*</span>y <span class="k3">=</span> <span class="n">3</span><span class="k2">;</span>        <span class="c">// Crash!! ???</span></td></tr><tr><td class="number">29</td><td>&#160;</td></tr><tr><td class="number">30</td><td><span class="c">// In order to point y to the value of x I would do this?</span></td></tr><tr><td class="number">31</td><td>y <span class="k3">=</span> <span class="k3">&amp;</span>x<span class="k2">;</span>    <span class="c">// Point to the value of x (5).</span></td></tr><tr><td class="number">32</td><td>&#160;</td></tr><tr><td class="number">33</td><td><span class="c">// In order to access the value of x I could now do either of these?</span></td></tr><tr><td class="number">34</td><td><a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"x=%d and *y=%d\n"</span>, x, <span class="k3">*</span>y<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">35</td><td>&#160;</td></tr><tr><td class="number">36</td><td><span class="c">// In order to modify the value of x I could now do either of these?</span></td></tr><tr><td class="number">37</td><td>x <span class="k3">=</span> <span class="n">6</span><span class="k2">;</span></td></tr><tr><td class="number">38</td><td><a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"x=%d and *y=%d\n"</span>, x, <span class="k3">*</span>y<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">39</td><td>&#160;</td></tr><tr><td class="number">40</td><td><span class="k3">*</span>y<span class="k3">+</span><span class="k3">+</span><span class="k2">;</span></td></tr><tr><td class="number">41</td><td><a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"x=%d and *y=%d\n"</span>, x, <span class="k3">*</span>y<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">42</td><td>&#160;</td></tr><tr><td class="number">43</td><td><span class="c">// In order to set z to x I could now do either of these?</span></td></tr><tr><td class="number">44</td><td>z <span class="k3">=</span> <span class="k3">&amp;</span>x<span class="k2">;</span></td></tr><tr><td class="number">45</td><td><a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"x=%d and *y=%d and *z=%d\n"</span>, x, <span class="k3">*</span>y, <span class="k3">*</span>z<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">46</td><td>&#160;</td></tr><tr><td class="number">47</td><td>z <span class="k3">=</span> y<span class="k2">;</span></td></tr><tr><td class="number">48</td><td><a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"x=%d and *y=%d and *z=%d\n"</span>, x, <span class="k3">*</span>y, <span class="k3">*</span>z<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">49</td><td>&#160;</td></tr><tr><td class="number">50</td><td><span class="c">/*</span></td></tr><tr><td class="number">51</td><td><span class="c"> * I'm guessing free() releases the memory pointed to by a pointer, but since z is</span></td></tr><tr><td class="number">52</td><td><span class="c"> * pointing to memory still in use by x and y I shouldn't free it, right?</span></td></tr><tr><td class="number">53</td><td><span class="c"> */</span></td></tr><tr><td class="number">54</td><td>z<span class="k3">=</span>NULL<span class="k2">;</span></td></tr><tr><td class="number">55</td><td>&#160;</td></tr><tr><td class="number">56</td><td><span class="c">// Set cRaZy to the address of pointer y. (I'm just trying to grasp it fully)</span></td></tr><tr><td class="number">57</td><td>cRaZy <span class="k3">=</span> <span class="k3">&amp;</span>y<span class="k2">;</span></td></tr><tr><td class="number">58</td><td>&#160;</td></tr><tr><td class="number">59</td><td><span class="c">// Set y to NULL - we don't need it anymore.</span></td></tr><tr><td class="number">60</td><td>y<span class="k3">=</span>NULL<span class="k2">;</span></td></tr><tr><td class="number">61</td><td>&#160;</td></tr><tr><td class="number">62</td><td><span class="c">// So to get the value of x from cRaZy I would do what?</span></td></tr><tr><td class="number">63</td><td><a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"**cRaZy=%d\n"</span>, <span class="k3">*</span><span class="k3">*</span>cRaZy<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">64</td><td>&#160;</td></tr><tr><td class="number">65</td><td><span class="c">// Set YzArC to the address of pointer cRaZy.</span></td></tr><tr><td class="number">66</td><td>YzArC <span class="k3">=</span> <span class="k3">&amp;</span>cRaZy<span class="k2">;</span></td></tr><tr><td class="number">67</td><td>&#160;</td></tr><tr><td class="number">68</td><td><span class="c">// Set cRaZy to NULL because I'm done with it.</span></td></tr><tr><td class="number">69</td><td>cRaZy <span class="k3">=</span> NULL<span class="k2">;</span></td></tr><tr><td class="number">70</td><td>&#160;</td></tr><tr><td class="number">71</td><td><span class="c">// So to get the value of x from YzArC I would do this?</span></td></tr><tr><td class="number">72</td><td><a href="http://www.delorie.com/djgpp/doc/libc/libc_624.html" target="_blank">printf</a><span class="k2">(</span><span class="s">"***YzArC=%d\n"</span>, <span class="k3">*</span><span class="k3">*</span><span class="k3">*</span>YzArC<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">73</td><td>&#160;</td></tr><tr><td class="number">74</td><td><a href="http://www.delorie.com/djgpp/doc/libc/libc_350.html" target="_blank">free</a><span class="k2">(</span>YzArC<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">75</td><td>YzArC<span class="k3">=</span>NULL<span class="k2">;</span></td></tr><tr><td class="number">76</td><td>&#160;</td></tr><tr><td class="number">77</td><td><span class="c">// At this point could a reference to x cause a crash/exception?</span></td></tr><tr><td class="number">78</td><td>&#160;</td></tr><tr><td class="number">79</td><td><span class="c">// So does the new operator create the object and return the address? For example:</span></td></tr><tr><td class="number">80</td><td>ptr_objObject <span class="k3">=</span> <span class="k1">new</span> myOBJECT<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">81</td><td>&#160;</td></tr><tr><td class="number">82</td><td><span class="c">/*</span></td></tr><tr><td class="number">83</td><td><span class="c"> * ptr_objObject is now equal to the address where the instance of myOBJECT</span></td></tr><tr><td class="number">84</td><td><span class="c"> * was created?</span></td></tr><tr><td class="number">85</td><td><span class="c"> */</span></td></tr><tr><td class="number">86</td><td>&#160;</td></tr><tr><td class="number">87</td><td><span class="c">// Call a method from object pointed to be ptr_objObject.</span></td></tr><tr><td class="number">88</td><td>ptr_objObject-&gt;method1<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">89</td><td>&#160;</td></tr><tr><td class="number">90</td><td><span class="c">// Set objObject equal to the object pointed to by ptr_objObject.</span></td></tr><tr><td class="number">91</td><td>objObject <span class="k3">=</span> <span class="k3">*</span>ptr_objObject<span class="k2">;</span></td></tr><tr><td class="number">92</td><td>&#160;</td></tr><tr><td class="number">93</td><td><span class="c">/*</span></td></tr><tr><td class="number">94</td><td><span class="c"> * Release objObject resources because I have a copy in objObject? I'm kinda</span></td></tr><tr><td class="number">95</td><td><span class="c"> * guessing...</span></td></tr><tr><td class="number">96</td><td><span class="c"> */</span></td></tr><tr><td class="number">97</td><td><a href="http://www.delorie.com/djgpp/doc/libc/libc_350.html" target="_blank">free</a><span class="k2">(</span>ptr_objObject<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">98</td><td>ptr_objObject <span class="k3">=</span> NULL<span class="k2">;</span></td></tr><tr><td class="number">99</td><td>&#160;</td></tr><tr><td class="number">100</td><td><span class="c">// Call a method from objObject.</span></td></tr><tr><td class="number">101</td><td>objObject.method1<span class="k2">(</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">102</td><td>&#160;</td></tr><tr><td class="number">103</td><td><span class="c">// Clean up objObject - Release resources.</span></td></tr><tr><td class="number">104</td><td><a href="http://www.delorie.com/djgpp/doc/libc/libc_350.html" target="_blank">free</a><span class="k2">(</span>objObject<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">105</td><td>objObject <span class="k3">=</span> NULL<span class="k2">;</span></td></tr><tr><td class="number">106</td><td>&#160;</td></tr><tr><td class="number">107</td><td><span class="c">// Hurray! We'll never see this, will we? ;)</span></td></tr><tr><td class="number">108</td><td><a href="http://www.delorie.com/djgpp/doc/libc/libc_298.html" target="_blank">exit</a><span class="k2">(</span><span class="n">0</span><span class="k2">)</span><span class="k2">;</span></td></tr></tbody></table></div></div><p>

Intended Output:</p><p>x=5 and *y=5<br />x=6 and *y=6<br />x=7 and *y=7<br />x=7 and *y=7 and *z=7<br />x=7 and *y=7 and *z=7<br />**cRaZy=7<br />***YzArC=7<br />method1() writes... Called!<br />method1() writes... Called!</p><p><b>EDIT</b></p><p>(Keep in mind I&#39;m not very experienced at this so the above code likely doesn&#39;t work at all. Some of it is right, but some parts are not.)</p><p>Thanks, guys. I couldn&#39;t remember the details of pointers and objects in C++, but this thread refreshed it a bit.</p><p><b>EDIT</b></p><p>And I just stumbed on my problem. I wrote this code late with work in the morning weighing on my shoulders. I was enjoying the coding and didn&#39;t want to have to stop. I wanted to get as much done as possible so I was rushing. <img src="http://www.allegro.cc/forums/smileys/embarassed.gif" alt=":-[" /></p><p>The tutorial creates a &quot;bounding box&quot; for collision detection using the top left corner position of the bitmap for the top and left edge of the bounding box. It also uses the width and height of the bitmap to get the right and bottom edge of the bounding box. It was on my mind to make sure all of these values were set before I called update_boundingbox() which sets them, but in my rush I neglected the bitmap <img src="http://www.allegro.cc/forums/smileys/sad.gif" alt=":(" />. The problem was as follows:</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td>&#160;</td></tr><tr><td class="number">2</td><td><span class="k1">void</span> Object::update_boundingbox<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span></td></tr><tr><td class="number">3</td><td><span class="k2">{</span></td></tr><tr><td class="number">4</td><td>    mobjBoundingBox-&gt;TopLeft-&gt;x<span class="k2">(</span>x<span class="k2">(</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">5</td><td>    mobjBoundingBox-&gt;TopLeft-&gt;y<span class="k2">(</span>y<span class="k2">(</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">6</td><td>&#160;</td></tr><tr><td class="number">7</td><td>    <span class="c">/*</span></td></tr><tr><td class="number">8</td><td><span class="c">     *  It was possible to get here before the bitmap was set, which was exactly</span></td></tr><tr><td class="number">9</td><td><span class="c">     *  what was happening. As a result, the bitmap was referencing inaccessible</span></td></tr><tr><td class="number">10</td><td><span class="c">     *  memory.</span></td></tr><tr><td class="number">11</td><td><span class="c">     */</span></td></tr><tr><td class="number">12</td><td>&#160;</td></tr><tr><td class="number">13</td><td>    mobjBoundingBox-&gt;BottomRight-&gt;x<span class="k2">(</span>x<span class="k2">(</span><span class="k2">)</span><span class="k3">+</span>mobjBitmap-&gt;w<span class="k2">(</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>   <span class="c">// Oh noes!</span></td></tr><tr><td class="number">14</td><td>    mobjBoundingBox-&gt;BottomRight-&gt;y<span class="k2">(</span>y<span class="k2">(</span><span class="k2">)</span><span class="k3">+</span>mobjBitmap-&gt;h<span class="k2">(</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span>   <span class="c">// Oh noes!</span></td></tr><tr><td class="number">15</td><td><span class="k2">}</span></td></tr></tbody></table></div></div><p>

The code has now been changed to this:</p><div class="source-code"><div class="toolbar"></div><div class="inner"><table width="100%"><tbody><tr><td class="number">1</td><td>&#160;</td></tr><tr><td class="number">2</td><td><span class="k1">void</span> Object::update_boundingbox<span class="k2">(</span><span class="k1">void</span><span class="k2">)</span></td></tr><tr><td class="number">3</td><td><span class="k2">{</span></td></tr><tr><td class="number">4</td><td>    <span class="k1">if</span><span class="k2">(</span>mobjBitmap <span class="k3">!</span><span class="k3">=</span> NULL <span class="k3">&amp;</span><span class="k3">&amp;</span> x<span class="k2">(</span><span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> NULL <span class="k3">&amp;</span><span class="k3">&amp;</span> y<span class="k2">(</span><span class="k2">)</span> <span class="k3">!</span><span class="k3">=</span> NULL<span class="k2">)</span></td></tr><tr><td class="number">5</td><td>    <span class="k2">{</span></td></tr><tr><td class="number">6</td><td>        mobjBoundingBox-&gt;TopLeft-&gt;x<span class="k2">(</span>x<span class="k2">(</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">7</td><td>        mobjBoundingBox-&gt;TopLeft-&gt;y<span class="k2">(</span>y<span class="k2">(</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">8</td><td>        mobjBoundingBox-&gt;BottomRight-&gt;x<span class="k2">(</span>x<span class="k2">(</span><span class="k2">)</span><span class="k3">+</span>mobjBitmap-&gt;w<span class="k2">(</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">9</td><td>        mobjBoundingBox-&gt;BottomRight-&gt;y<span class="k2">(</span>y<span class="k2">(</span><span class="k2">)</span><span class="k3">+</span>mobjBitmap-&gt;h<span class="k2">(</span><span class="k2">)</span><span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">10</td><td>    <span class="k2">}</span></td></tr><tr><td class="number">11</td><td>    <span class="k1">else</span></td></tr><tr><td class="number">12</td><td>    <span class="k2">{</span></td></tr><tr><td class="number">13</td><td>        mobjBoundingBox-&gt;TopLeft-&gt;x<span class="k2">(</span>NULL<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">14</td><td>        mobjBoundingBox-&gt;TopLeft-&gt;y<span class="k2">(</span>NULL<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">15</td><td>        mobjBoundingBox-&gt;BottomRight-&gt;x<span class="k2">(</span>NULL<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">16</td><td>        mobjBoundingBox-&gt;BottomRight-&gt;y<span class="k2">(</span>NULL<span class="k2">)</span><span class="k2">;</span></td></tr><tr><td class="number">17</td><td>    <span class="k2">}</span></td></tr><tr><td class="number">18</td><td><span class="k2">}</span></td></tr></tbody></table></div></div><p>

I can&#39;t guarantee it&#39;s the best way (in fact I see improvements to be made already), but it&#39;s mostly a place to start to get back into it... The program is currently running &#39;til close. <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bamccaig)</author>
		<pubDate>Wed, 21 Feb 2007 23:46:37 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Let me see.<br />OK, you have to separate 2 concepts in your head: Memory allocation and pointers.<br />Memory allocation is handled by malloc() and free(). Memory allocation means that the OS reserves a chunk of memory for you; after you have allocated some memory, it is &quot;yours&quot;, and you can write to it and read from it. </p><p>You can compare pointers to phone numbers:<br />the pointer itself - a rolodex card with a phone number<br />the pointer&#39;s value - a phone number<br />the memory pointed to - the phone connected to the number</p><p>Now, storing a value (any value) in a pointer is the same as writing down a phone number on a rolodex. Nothing bad happens when you write down a phone number that doesn&#39;t exist. But if you try to call it, you will get an error message (segfault). The problem is that you cannot see from the phone number alone whether it&#39;s valid or not. On a rolodex card, you might use a &#39;?&#39;, or a blank sheet - with pointers, we use the value NULL.<br />Now for the allocation. Allocating means telling the telephone company that you want to connect a new telephone (malloc()); the phone company will look for a free number, connect the phone for you and tell you the number (the return value of malloc()). When you don&#39;t need it anymore, you ask the company to disconnect the phone (you call free()); you need to give them the number for that (you pass the pointer as an argument to free()). Once the phone has been disconnected, you cannot call that number anymore; the phone company can now give the number to someone else.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Tobias Dammers)</author>
		<pubDate>Thu, 22 Feb 2007 20:41:12 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Thanks again, Tobias. I think I understand malloc()/free() now.</p><p>My next question is about new/delete. In my program, I&#39;m instanciating classes with the new operator:</p><div class="source-code snippet"><div class="inner"><pre>


PLAYER <span class="k3">*</span>objPlayer <span class="k3">=</span> <span class="k1">new</span> PLAYER<span class="k2">(</span><span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
SHIP <span class="k3">*</span>objShip <span class="k3">=</span> <span class="k1">new</span> SHIP<span class="k2">(</span><span class="n">0</span>, <span class="n">0</span><span class="k2">)</span><span class="k2">;</span>
</pre></div></div><p>

I&#39;m not sure the right way to clean up the memory so I wanted to check with you. I&#39;m not using malloc() to allocate their memory (at least not directly???), so will free() work to deallocate/release the memory?</p><p>Also the PLAYER and SHIP classes have pointers as members so I assumed I had to write a destructor to free that memory. Those members are also instanciated using the new operator. What I currently am doing (and not sure if it&#39;s actually cleanup up right) is:</p><div class="source-code snippet"><div class="inner"><pre>
<span class="k1">void</span> OBJECT::~OBJECT<span class="k2">(</span><span class="k2">)</span>   <span class="c">// PLAYER and SHIP inherit from OBJECT.</span>
<span class="k2">{</span>
    <span class="c">/*</span>
<span class="c">     * There is an allegro BITMAP in my class so I deallocate it the</span>
<span class="c">     * normal way:</span>
<span class="c">     */</span>
    <a href="http://www.allegro.cc/manual/destroy_bitmap" target="_blank"><span class="a">destroy_bitmap</span></a><span class="k2">(</span>mobjBitmap<span class="k2">)</span><span class="k2">;</span>

    <span class="c">// Destroy pointers...</span>
    <span class="k1">delete</span> mobjBoundingBox<span class="k2">;</span>
    <span class="k1">delete</span> mobjPosition<span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>

Then at the end of main I do this:</p><div class="source-code snippet"><div class="inner"><pre>
    <span class="c">// Cleanup pointers.</span>
    <a href="http://www.allegro.cc/manual/destroy_bitmap" target="_blank"><span class="a">destroy_bitmap</span></a><span class="k2">(</span>objBuffer<span class="k2">)</span><span class="k2">;</span>
    <span class="k1">delete</span> objPlayer<span class="k2">;</span>
    <span class="k1">delete</span> objShip<span class="k2">;</span>
</pre></div></div><p>

<img src="http://www.allegro.cc/forums/smileys/huh.gif" alt="???" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (bamccaig)</author>
		<pubDate>Thu, 22 Feb 2007 22:42:29 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
I&#39;m not using malloc() to allocate their memory (at least not directly???), so will free() work to deallocate/release the memory?
</p></div></div><p>
No -- new and malloc aren&#39;t guaranteed to use the same underlying system for allocating memory, so if you allocate with one system and try to free with the other, that will cause undefined behavior.  If you use new you <b>must</b> use delete, and if you use malloc you <b>must</b> use free.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Zaphos)</author>
		<pubDate>Thu, 22 Feb 2007 23:58:16 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>In fact, if you&#39;re using C++ and not C, use new and delete whenever you can, which is practically everywhere - don&#39;t touch malloc and free at all. Only if you really really have to, and in that case, never mix the two systems. Ever.</p><p>Of course, when dealing with external C libraries such as allegro, read the manual carefully about how you are supposed to use data structures defined by them. It is very common for such libraries to provide special functions for creating and destroying objects (à la create_bitmap() / destroy_bitmap()). C++ libraries generally assume that you will be using new / delete on the objects they define.</p><p>BTW, the difference between new / delete and malloc / free is not only that they aren&#39;t guaranteed to use the same underlying mechanism.<br />New calls an object&#39;s constructor right after allocating the memory, and delete calls its destructor right before deallocating the memory, while malloc only allocates memory, but leaves it up to the programmer to initialize it to something useful, and free really only frees the memory, but doesn&#39;t do any other kind of cleanup.<br />C doesn&#39;t have constructors / destructors, which is why there are functions such as create_bitmap().
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Tobias Dammers)</author>
		<pubDate>Fri, 23 Feb 2007 00:34:57 +0000</pubDate>
	</item>
</rss>
