Changing Configuration from "Debug" to "Release" causes Graphics Bugs

I was working on Version 1.4 of my Game Tactica, added quite a lot new features and when I finally finished everything and it worked smoothly I wanted to change "Release", build, and upload the update to itunes Connect.
After building for the configuration "Release", xCode asked me, whether I would like to install the corresponding Provisioning Profile on my iPod because he lacked the "Sale"-mobileprovisioning - profile to run it.

I did so, started my app and everything worked ok.
But when I entered my 3D Open GL screen I had all kinds of weird graphics bugs.
So I changed back into the "Debug"-Profile and everything worked nice again.

I can't get rid of those graphics errors, what may be the reason for this sudden change?

My "Debug" and "Release" Configuration Profiles are virtually identic, except for the Code Signing Profiles.
Everything worked smoothly the last time I submitted a new version, except that I upgraded xcode and my ipad to iOS 4.0 in between.

But what problem could iOS4 do to my "Release"-Config, that it wouldn't do to my "Debug"-Config?

90% of the time when I've had issues like that it's because of accidentally using junk data initialized variables. In debug mode, the code isn't optimized and you get different patterns of random left-over data in your uninitialized variables because of it. Another potential issue is that with optimizations on, you are running into floating point precision problems because the results aren't quite the same. I would find this highly unlikely though.

I mean, its not a definite part of my Geometry that is causing the error, if I turn the viewing angle, I can see all parts clearly at different angles.

And wouldn't I have problems in debug mode too, if I had junk-initialized any variable? (In Debug-Mode everything works fine and was tested many many times)

Can you explain where floating point errors could come in?

I mean everything worked fine before, I just don't see what could have changed the behaviour between the last two builds...
Thank you for your suggestions though!

EDIT: Here's a picture of the bug:

EDIT2: The bug is really strange, when I turn the map the hexagons stay the same, but units disappear and pop up again randomly. But turning the view doesn't invoke any of my Code, its all handled inside OpenGL, since I'm not changing the arrays I give to OpenGL as long as the underlying Geometries don't change. Which they don't do , as long as I only change viewing angles.

EDIT3: The Error has some connection to the flags on top of the flagpoles next to the bunkers. If I start the game with only the blue player, everything is fine except for the flags of the poles, that don't appear. If I start with blue and green player, I get the mentioned graphics bug, but somehow its connected to the green flags. In "Debug" Mode the flags appear to be fine again.

Sorry about bothering you, it was all my fault,
the line that was supposed to calculate the direction a flag was facing looked like this:

Code:

float si=sinf(angle),co=co;

Appearently I stopped typing after the "co..", its just weird that at worked and all and xcode never complained.

This post is solved and may be deleted

EDIT: Just for clarification, this line of code is more than 2 months old, compiled and ran without problems and was a part of my "New and Noteworthy" App
(And nobody saw that some flags looked weird if you zoomed in very close, namingly the ones with sinf(angle) = 0 )

Quote: And wouldn't I have problems in debug mode too, if I had junk-initialized any variable?

Yes, but particularly with floats the problem can go unnoticed for a long time. Half of the the valid floating point numbers are less than 1.0, and half of those are extremely tiny. So if you meant to initialize the variable to something that was less than 1.0, it might just end up being close enough every time that you don't notice that it's wrong.