Game crashing after switching to PVRs
by Alain Labrie · in iTorque 2D · 04/03/2010 (10:11 am) · 15 replies
I'm in the process of optimizing my game and I just changed some of my game art to PVRs from PNGs. Now I get the following error code: EXC_BAD_ACCESS when the game exits. I traced it to t2dImageMapDatablock::unloadSrcBitmap. The funny thing is if I delete the PVRs and go back to PNGs the problem goes away. Has anyone had this issue before?
Alain
Alain
About the author
#2
04/04/2010 (7:40 pm)
I installed PVRTexTool_2.05.25.0871.msi that is located in the "\Tools" directory of iTGB 1.3.1.
#3
04/05/2010 (6:02 am)
This is what I use as well. What settings are you going with? Do all your PVRs have the ".pvr" extension. Have you removed the ".png" from the PVR'd images in the datablocks file?
#4
Alain
p.s. this problem does not happen if I use PNGs?
04/05/2010 (8:27 am)
I use opengl ES 1.0 with pvr4bpp selected, and the datablocks have the png extensions removed. The PVRs themselves are being loaded just fine and the game uses them. My problem is when I use Build\Run option to deploy to the device the game runs correctly until I decide to quit then I get the EXC_BAD_ACCESS. But if I profile the game using Activity Monitor, all is fine and the game exits without any errors. Also if I run the game from my device (without xcode) there is no (visible) problem.Alain
p.s. this problem does not happen if I use PNGs?
#5
04/05/2010 (9:06 am)
Can't add anymore then, sorry.
#6
That should help you to determine what is going wrong.
though given its only a debugger thing its either strange or no direct error but for example some breakpoint or alike.
04/05/2010 (9:44 am)
you can check the error the app fires in the GDB console on the debug view.That should help you to determine what is going wrong.
though given its only a debugger thing its either strange or no direct error but for example some breakpoint or alike.
#7
GarageGames staff? any ideas?
04/06/2010 (9:12 pm)
I've been able to confirm this issue as well. The game will crash every single time when it tries to unload the textures, when the texture is PVR! GarageGames staff? any ideas?
#8
04/07/2010 (2:01 am)
Can you post your image map datablock here please?
#9
04/07/2010 (1:45 pm)
new t2dImageMapDatablock(sky1ImageMap) {
imageName = "~/data/images/sky1";
imageMode = "FULL";
frameCount = "-1";
filterMode = "SMOOTH";
filterPad = "1";
preferPerf = "1";
cellRowOrder = "1";
cellOffsetX = "0";
cellOffsetY = "0";
cellStrideX = "0";
cellStrideY = "0";
cellCountX = "-1";
cellCountY = "-1";
cellWidth = "0";
cellHeight = "0";
preload = "1";
allowUnload = "0";
compressPVR = "0";
optimised = "0";
force16bit = "0";
};
#10
04/07/2010 (1:56 pm)
Have you tried setting optimised for your PVRs?
#11
04/07/2010 (4:34 pm)
I do not own any of these products but what happens if you set allowUnload = "1"?
#12
My only solution was to never unload pvr images.
04/08/2010 (7:52 am)
I had the same problem back in Feb 2009: http://www.torquepowered.com/community/forums/viewthread/85479My only solution was to never unload pvr images.
#13
compressPVR = "1";
optimised = "1";
in my datablock.cs file... Hope this helps somebody else.
04/10/2010 (7:30 am)
The problem seems to have gone away after I manually set these flags:compressPVR = "1";
optimised = "1";
in my datablock.cs file... Hope this helps somebody else.
#14
Cheers
04/10/2010 (11:27 am)
I believe you don't need the compressPVR option? Just the optimised.Cheers
#15
04/11/2010 (9:23 am)
There may then be a bug if you use PVRs without the Optimized flag set to true? Can anyone else confirm this crash in that instance.
Torque Owner Scott Wilson-Billing
MeYuMe