Frictional Games Forum (read-only)
Solutions to a few common problems. - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Open Source Collaboration (https://www.frictionalgames.com/forum/forum-27.html)
+--- Forum: Overture (https://www.frictionalgames.com/forum/forum-29.html)
+--- Thread: Solutions to a few common problems. (/thread-3617.html)



Solutions to a few common problems. - wally - 08-02-2010

Alright so I spent the better part of the last 6 or so hours figuring out how to get Penumbra compiled, and most of that time was not being able to find solutions to problems people already had. I figured it would be a idea to post them here for newcomers.

Problem 1:
Code:
In MeshLoaderColladaLoader.cpp, lines 1256,  1278 and 1300.
cString::FloatStringToArray(&vRawData[0],pVecText->Value(),lSize * 3);

This one tripped me up for a little while, until I commented it out and just used the code right above it. Worked like a charm, and I can find no real problems with doing said method.

Problem 2:
Crash upon entering the first real level, directly after opening the hatch that was covered in ice. This one was a little trickier to figure out, as there was no directly stated solution, but I have found that user Ricky has a solution that works for this. You can find his bugfixes for this problem here. (I'm assuming hes okay with me sharing his crafty bugfixes.) The fix for this particular problem is just modifying two lines in MeshLoaderCollada.cpp.

Problem 3:
Crash upon entering the storage room. This one I actually did myself, and am rather proud of in my amateur, sleep-deprived state. Line 470 and 471 in AINodeContainer.cpp sometimes causes a divide-by-zero error, which I somehow stumbled upon. You can see what I did to fix it here.

And thats all I've got. Hopefully this will help the uninitiated create some stuff.


RE: Solutions to a few common problems. - Thomas - 08-02-2010

Nice finds!

Strange problems with these never popped up on any of the platforms.

Telling Edward about it so it can be pushed (or what it is called) to the main source distro.


RE: Solutions to a few common problems. - Thomas - 08-02-2010

For the AiNodeContainer, I think a better fix would be:

Quote:cVector2l vGridPos(0);
if(mvGridSize.x >0)
vGridPos.x = (int)(vLocalPos.x / mvGridSize.x);
if(mvGridSize.y >0)
vGridPos.y = (int)(vLocalPos.y / mvGridSize.y);

Since other wise vGridPos might be uninitialized + it might be that the x-axis is 0 but not the y-axis of mvGridSize.


RE: Solutions to a few common problems. - Thomas - 08-02-2010

And oh,

your "Problem1" is probalby just fixed by using this fix:
Quote:vRawData.resize(lSize * 3);
(instead of vRawData.reserve(lSize * 3);



RE: Solutions to a few common problems. - wally - 08-02-2010

Thanks for the replies! Better fixes help a bunch.