Heron Posted September 12, 2009 Report Share Posted September 12, 2009 Hi,I'm a competent C++ Developer (at least I think so) and I'm working with wxWidgets and boost (<-heavily). I took also a look at SDL.I've NO expirience with Java(Script) and I won't have, too. I've not much time, but I love your game and would like to contribute. So it would be great, if you have a small task to do for me. Quote Link to comment Share on other sites More sharing options...
janwas Posted September 12, 2009 Report Share Posted September 12, 2009 (edited) Greetings and thanks for your interest! Help is very welcome We've started looking through the list of tickets and adding a "simple" keyword to indicate the task is limited in scope and doesn't require knowledge of a large portion of the codebase.You can search for such tickets with the following query URL:http://trac.wildfiregames.com/query?keywords=%7EsimpleTwo of those are related to OpenGL and extension handling; another is basically a quick test of the game on a multiple-monitor system. If none of those strikes your fancy, please feel free to look through the list of tickets or post here and we'll find some more Edited September 12, 2009 by janwas Quote Link to comment Share on other sites More sharing options...
Heron Posted September 12, 2009 Author Report Share Posted September 12, 2009 Well, i've no multiple monitor system and I've never worked with OpenGL. I know that those are not the best conditions to get into such a game project, but I was always searching for an open source AOE clone and now I want to contribute.#113 is interesting, how many OpenGL skills will I need for that? Quote Link to comment Share on other sites More sharing options...
janwas Posted September 14, 2009 Report Share Posted September 14, 2009 OK hm, I'm afraid #113 might not be a good fit then - not only due to OpenGL (some knowledge would be good, to understand how the GUI renders its controls) but also because the GUI engine is also related to scripts (those drive the UI).Does anything else grab your eye? Quote Link to comment Share on other sites More sharing options...
Heron Posted September 16, 2009 Author Report Share Posted September 16, 2009 Hm, perhaps you can tell me, which ticket I could take? Quote Link to comment Share on other sites More sharing options...
janwas Posted September 18, 2009 Report Share Posted September 18, 2009 OK, I've made a second pass through the tickets and marked a few more - please have another look at the above query URL. In particular, 307 and 311 would be helpful and straightforward (duplicate the error, see what pointer is NULL and why, fix ), and #100 might be interesting if you have a thing for sound/music/OGG vorbis.(Will be away for the weekend; have a good one + see you after) Quote Link to comment Share on other sites More sharing options...
Heron Posted September 26, 2009 Author Report Share Posted September 26, 2009 Well, I cannot start the game: the self-compiled pyrogenesis_dbg executable terminates after clicking the "Start!" button [single player menu]. Cause: Unhandled exception "PSERROR_GUI_InvalidSetting" in GUIutil.cpp: PS_RESULT GUI<T>::GetSettingPointer(const IGUIObject *pObject, const CStr& Setting, T* &Value) Quote Link to comment Share on other sites More sharing options...
Sluzky Posted September 26, 2009 Report Share Posted September 26, 2009 (edited) fixed, thanks Edited September 26, 2009 by Sluzky Quote Link to comment Share on other sites More sharing options...
Heron Posted September 27, 2009 Author Report Share Posted September 27, 2009 Again just an error report, no fix: unhandled exeption 0x0c7f1d5a in pyrogenesis_dbg.exe: 0xC0000094: Integer division by zero. At: wrap_oal.dll [no symbols found]. Occurs right after the map has been loaded. Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted September 27, 2009 Report Share Posted September 27, 2009 Hmm, that sounds bad, and something that ought to be fixed, but I have no idea how. But a temporary workaround is to add "-quickstart" to the list of command-line arguments when running the game (which will disable audio and should avoid that problem). Quote Link to comment Share on other sites More sharing options...
Sluzky Posted September 27, 2009 Report Share Posted September 27, 2009 (edited) Again just an error report, no fix: unhandled exeption 0x0c7f1d5a in pyrogenesis_dbg.exe: 0xC0000094: Integer division by zero. At: wrap_oal.dll [no symbols found]. Occurs right after the map has been loaded.I get that too, but janwas didn't...can you tell us which sound card are you using? it seems to be hardware related...aside from that, I'm using the -quickstart fix for now Edited September 27, 2009 by Sluzky Quote Link to comment Share on other sites More sharing options...
Heron Posted September 27, 2009 Author Report Share Posted September 27, 2009 I've got just onboard-sound: "SoundMax Integrated Digital Audio" Quote Link to comment Share on other sites More sharing options...
janwas Posted September 27, 2009 Report Share Posted September 27, 2009 hm, I'm guessing here, but this bug appears to bite when an OpenAL source is reused (the second music track that's played when a map has loaded) and its properties somehow aren't reset correctly by AL and it doesn't handle the resulting divide-by-zero.I was foolhardy enough to rely on the documented defaults instead of always setting all properties - it would be better to always set every single property in vsrc_latch (even though that costs a bit of performance).Would you be interested in tackling this? That would be helpful, especially because I can't duplicate the problem (it apparently doesn't come up on X-fi, where the OpenAL implementation is a native driver instead of a software layer on top of DX) Quote Link to comment Share on other sites More sharing options...
Heron Posted October 11, 2009 Author Report Share Posted October 11, 2009 Sorry, not enough time the past weeks...I tracked issue #307 down to CTextureEntry::CTextureEntry(CTerrainPropertiesPtr props, const CStr& path). If CTerrainPropertiesPtr is NULL, OAD will crash at CTerrain::IsPassable in Terrain.cpp:bool CTerrain::IsPassable(const CVector2D &loc/*tile space*/, HEntity entity) const{ CMiniPatch *pTile = GetTile(loc.x, loc.y); if(!pTile->Tex1) { return false; // Invalid terrain type in the scenario file } CTextureEntry *pTexEntry = g_TexMan.FindTexture(pTile->Tex1); CTerrainPropertiesPtr pProperties = pTexEntry->GetProperties();// ugly workaround from here bool rv; if(pProperties) rv = pProperties->IsPassable(entity); //<- it would crash here else{ rv = false; LOGMESSAGE("pProperties was NULL"); } return rv;}With this workaround the game is at least playable. I wrote if (m_pProperties) m_Groups = m_pProperties->GetGroups();into the ctor of CTextureEntry and the Pyrogenesis Log looked like this:CRenderer::Open: depth bits 24CRenderer::Open: stencil bits 8CRenderer::Open: alpha bits 8I18n: No translation found for string 'Want to move some Dudes around or test something? Click here to start a new game on the default map.'I18n: No translation found for string 'Tired of playing with yourself? Fight against one or more human players in a multiplayer game.'I18n: No translation found for string 'Click here to change the civilization you would like to play.'I18n: No translation found for string 'Click this button to start a new game with the current settings.'Creating shadow texture (size 1024x1024) (format = DEPTH_COMPONENT) (using EXT_framebuffer_object)WARNING: setting cell_id was not found on object ldProgressBarI18n: No translation found for string 'CGameView init'WARNING: setting cell_id was not found on object ldProgressBarI18n: No translation found for string 'LoadTerrainTextures'WARNING: setting cell_id was not found on object ldProgressBarCTextureManager::RecurseDirectory(art/textures/terrain/types/): no terrains.xml (or errors while loading) - using parent propertiesCTextureManager::RecurseDirectory(art/textures/terrain/types/grass/): no terrains.xml (or errors while loading) - using parent propertiesWARNING: m_pProperties is NULLHope this is still useful for you! Quote Link to comment Share on other sites More sharing options...
janwas Posted October 11, 2009 Report Share Posted October 11, 2009 Thanks! A slightly modified version of that has been committed, and I've also added the terrains.xml for grass terrain type that was (for some reason) only present in mods/internal. Quote Link to comment Share on other sites More sharing options...
Heron Posted October 12, 2009 Author Report Share Posted October 12, 2009 Cool I tracked #311 now. I'm afraid I couldn't patch it because of lots and lots of side-effects.The crash occurs at the following lines of code when GetPatch(x/PATCH_SIZE,z/PATCH_SIZE) returns 0:float CTerrain::FlattenArea(float x0, float x1, float z0, float z1){ ssize_t tx0=clamp(ssize_t((x0/CELL_SIZE)), ssize_t(0), m_MapSize); ssize_t tx1=clamp(ssize_t((x1/CELL_SIZE)+1.0f), ssize_t(0), m_MapSize); ssize_t tz0=clamp(ssize_t((z0/CELL_SIZE)), ssize_t(0), m_MapSize); ssize_t tz1=clamp(ssize_t((z1/CELL_SIZE)+1.0f), ssize_t(0), m_MapSize); size_t count=0; size_t y=0; for (ssize_t x=tx0;x<=tx1;x++) { for (ssize_t z=tz0;z<=tz1;z++) { y+=m_Heightmap[z*m_MapSize + x]; count++; } } y/=count; for (ssize_t x=tx0;x<=tx1;x++) { for (ssize_t z=tz0;z<=tz1;z++) { m_Heightmap[z*m_MapSize + x]=(u16)y; CPatch* patch=GetPatch(x/PATCH_SIZE,z/PATCH_SIZE); patch->SetDirty(RENDERDATA_UPDATE_VERTICES); // crash! (#311) } } return y*HEIGHT_SCALE;}GetPatch(x/PATCH_SIZE,z/PATCH_SIZE) may return 0:CPatch* CTerrain::GetPatch(ssize_t i, ssize_t j) const{ // range check: >= 0 and < m_MapSizePatches if( (size_t)i >= (size_t)m_MapSizePatches || (size_t)j >= (size_t) m_MapSizePatches ) return 0; return &m_Patches[(j*m_MapSizePatches)+i];}Have a look at Terrain.cpp and you will notice that the result of GetPatch is always used unguarded, being a permanent source of trouble. I suggest using (at least) asserts there. Also I would use boost::smart_ptrs as often as possible - just my opinion.A simple if(patch) causes some (to me) strange effects, including a crash at shutdown. Just try.No more time today and probably the next few days to fix this. Hope I could help you, though. Quote Link to comment Share on other sites More sharing options...
Heron Posted October 23, 2009 Author Report Share Posted October 23, 2009 Update: Now I'm back again with my new Linux notebook, installation of 0AD went quite well (one package was missing; I think it was pkg-config - maybe you want to add it to the documentation).I took a look at CTerrain again and think I killed the bug. This is the fixed version, watch out for comments:///////////////////////////////////////////////////////////////////////////////// FlattenArea: flatten out an area of terrain (specified in world space// coords); return the average height of the flattened areafloat CTerrain::FlattenArea(float x0, float x1, float z0, float z1){ ssize_t tx0=clamp(ssize_t((x0/CELL_SIZE)), ssize_t(0), m_MapSize-1); //changed from ssize_t tx1=clamp(ssize_t((x1/CELL_SIZE)+1.0f), ssize_t(0), m_MapSize-1); //m_MapSize to ssize_t tz0=clamp(ssize_t((z0/CELL_SIZE)), ssize_t(0), m_MapSize-1); //m_MapSize-1 ssize_t tz1=clamp(ssize_t((z1/CELL_SIZE)+1.0f), ssize_t(0), m_MapSize-1); //the good old nasty indexing issue ;) size_t count=0; size_t y=0; for (ssize_t x=tx0;x<=tx1;x++) { for (ssize_t z=tz0;z<=tz1;z++) { y+=m_Heightmap[z*m_MapSize + x]; count++; } } y/=count; for (ssize_t x=tx0;x<=tx1;x++) { for (ssize_t z=tz0;z<=tz1;z++) { m_Heightmap[z*m_MapSize + x]=(u16)y; CPatch* patch=GetPatch(x/PATCH_SIZE,z/PATCH_SIZE); if(patch == 0) std::cerr << "CPATCH is 0" << std::endl; // just my debugging output else patch->SetDirty(RENDERDATA_UPDATE_VERTICES); // but since GetPatch may return 0 (and it does: #311) we'll check for that now. At this point I don't expect any performance issues. } } return y*HEIGHT_SCALE;}Keep me up to date if there's something small to do for me. Quote Link to comment Share on other sites More sharing options...
janwas Posted November 8, 2009 Report Share Posted November 8, 2009 I'm sorry about the lack of a response - this thread got lost in my flood of open tabs. Thanks again for tracking down the bug, and also asking about its status via IM! The issue is now fixed, I've checked all call sites and also improved the indexing logic in the rest of terrain.cpp. Quote Link to comment Share on other sites More sharing options...
rannugrot Posted January 10, 2010 Report Share Posted January 10, 2010 Ok.. im not involved in the programing here. Just sitting on the sideline eager to test this. But i updated with tortoise today. Cleaned solution amd rebuilt it. Started the debuging. Choose single player. Load a game and then i get: Unhandled exception at 0x0a991d5a in pyrogenesis_dbg.exe: 0xC0000094: Integer division by zero.I have not been able to test the game yet.But i think this is a wonderful project and im really looking forward to se it for my self. Quote Link to comment Share on other sites More sharing options...
janwas Posted January 10, 2010 Report Share Posted January 10, 2010 Greetings!hm, I've just successfully tested Win32 VC2005 debug and release builds of r7264, loading the default map with command line argument -onlyPublicFiles. Are you doing anything different?Are you able to see where exactly it is crashing in the debugger? (If you're getting our "Much to our regret.." dialog box without a meaningful call stack, you can comment out the __try and __except lines in source\lib\sysdep\os\win\wseh.cpp to let the IDE handle the exception - it has somewhat studlier handling of debug information) Quote Link to comment Share on other sites More sharing options...
rannugrot Posted January 14, 2010 Report Share Posted January 14, 2010 i did an upgrade today and still get the same error. im running the debug in VC2008 and XP sp3 if thats mean anything. i dont know where or how to run manual commands and arguments. please let me know what exactly to do different. Quote Link to comment Share on other sites More sharing options...
janwas Posted January 18, 2010 Report Share Posted January 18, 2010 It looks like this is a sound-related issue (possibly due to a bug in OpenAL), see http://trac.wildfiregames.com/ticket/449Do you by any chance have an onboard sound chip? (See %appdata%/0ad/logs/system_info.txt)It probably won't help in this case, but in future if you need to run 0ad with command line arguments, one way to do so is to open up a shell (cmd.exe), change directory to the 0ad/binaries/system folder, then type pyrogenesis.exe -quickstart -otherArgumentsAsNeeded and hit enter. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.