Why is some code being skipped in the BGE? This is my code:

def textanim():
    print("GOGO")
    print("end")
    scene = bge.logic.getCurrentScene()
    print("end")
    scoreAnim = scene.objectsInactive["scoreAnim"]
    print("endNach anim")
    scoreSpawn = scene.objects["TextSpawn"]
    print(scoreAnim)
    print("end")
    c = scene.objects["Cube"]
    newText = scene.addObject(scoreAnim,scoreSpawn)
    newText["anim"] = True
    print("all lines were ececutet (hopefully)")


This is my result:



As you can see, not all the lines are executed, but there aren't errors either.
As Chebhou said the problem is the line where i try to load the FontObject:
scoreAnim = scene.objectsInactive["scoreAnim"]
I copied this at the beginning of another function and than this function isn't executed anymore.
So there is any problem with loading Font objects. Although I have it on an Inactive layer

This function should duplicate a score text object. The duplicated object than should then play an animation and slide to a corner. The score is saved.

Here you can download the .blend
2D car Game
After some time i now found the solution.
The problem was that this code was executed in a Try execept function. thats why i got no error (my bad). But the actual problem was that the object i was looking for wasn't in the list. this is caused beacause the object was parented to an object on an active layer but the object itself was on an inactive layer. I searched in both lists (scene.objectsInactive and scene.objects) but the object wasn't in any of them. 

fazit: you shouldn't parent objects on different layer when one of those layer is Inactive.