{"author_name":"Gaeel","cat":"LD #21","comments":[],"epoch":1313913360,"likes":0,"metadata":{"p_key":"64239","p_author":"Gaeel","p_authorkey":"1561","p_urlkey":"100026","p_title":"Why oh why oh why (are you segfaulting)? (I\u2019m Out)","p_cat":"LD #21","p_event":"LD21","p_time":"1313913360","p_likes":"0","p_comments":"0","p_status":"UPD5","us_key":"1561","us_name":"Gaeel","us_username":"gaeel","event_start":"1313712000","event_key":"7","event_name":"LD21"},"text":"<p>OK, so my world terrain is a class with an array of enums for the different tiles.<\/p>\n <p>The enum has 5 possible values, of which I&#8217;m only using hardWall and nothing.<\/p>\n <p>The array is 1200 tiles, 40*30.<\/p>\n <p>But for some FRUSTRATING reason, my collision detection segfaults when I try to look at ANY tile, (I tested by cheating and making it look at a tile I KNEW was there). Since the array isn&#8217;t dynamic it only get&#8217;s deleted in the destructor, and the display code works fine, reading from the array and drawing the appropriate tiles to the screen.<\/p>\n <p>I tried adding an sf::Image that is black for empty and white for wall, and it 40*30 pixels, but it STILL segfaults for no apparent reason, even when I force it to read pixels I KNOW are there.<\/p>\n <p>Without this I don&#8217;t have a game, and I&#8217;m having other retarded issues too.<\/p>\n <p>Watch me rant about how annoying this all is last night :<\/p>\n <p><a href=\"http:\/\/www.youtube.com\/watch?v=UdG1LmRT0H4\">http:\/\/www.youtube.com\/watch?v=UdG1LmRT0H4<\/a><\/p>\n <p>&nbsp;<\/p>","time":"August 21st, 2011 2:56 am","title":"Why oh why oh why (are you segfaulting)? (I\u2019m Out)"}