Very odd behaviour when usb connected!?

Some REALLY weird stuff happen and oh boy have I got no idea what the hell causes it! Here’s what I’ve figured out:

  1. The game runs out of memory after loading fonts, which iError on loading bitmap that it can’t find it (tries to load FreeSans, which it obviously already loaded properly) after 30 seconds of playing ~~> only when usb is connected!
    1a. if I disable background particles, doesn’t happen
    1b. if I disable asteroid fire particles, doesn’t happen
  2. If I lock and unlock the screen the game 1. freezes 2. the background sprite ceases to exist 3. some particles become weirdly stretched, like if it were badly damaged polygons in a low-poly game 3. few particles weird out and become superbig, stretched, cut and more ‘errors’
  3. The performance is nearly constant, which is nice but it seems the same even when some particles aren’t rendered at all!
  4. If I exit out of the main game scene into menu and back, or used to be before if I doubleclicked ‘play’ really fast, it sometimes crashes, the debug messages are 100 registry non-sense.
  5. Sometimes when I lock the screen and come back to the menu, after a few seconds the background texture becomes stretched upwards… and suddenly drops to 0.6 FPS during the ‘switch’…

4 and 5 are sometimes patched when I dealloc unused textures. But the second I press play it crashes. Once again debug is 100 registry non-sense.
6. Most of the time CCLog doesn’t work. How do I use it properly? I just imagine you can’t use it in init.
7. onEnter and onEnd methods don’t get called/execute, on any object, anywhere, anytime.
8. Sometimes it never crashes, just sits there for an hour and nothing. You can play the game like nothing and it’s not giving any surprises. Sometimes I load the gamescene and it immediately crashes. The same build, same phone, same conditions…
9. Only on the phone, sometimes specific particles just weird out~~ live long beyond their death, are super-huge, go into weird directions in random speeds, but don’t have the stretching behaviour…

Anyway I’ve decided to rewrite the game from scratch one more time. The GIT build seems to be stable, what doesn’t is just my code. Or maybe it is Ice Cream Sandwich? Shouldn’t be but still…

It’s just so weird, maybe someone could tell me what kind of bad programming habits could cause this kind of problems?