Help the noob, objects not always colliding

Hello,
this is my first time writing a game and first time using a physics engine. I thought I'll write a simple arkanoid-clone just to gain some experience with box2d before moving onto something bigger.
In the game there is a ball bouncing off everything (0 gravity) and a "stick" with which you save the ball from falling into the abyss at the bottom. The ball bounces great but I have a problem with the stick. It appears that if it has constant linear velocity applied it sometimes passes through the walls or let's the ball through. What am I doing wrong? My code: (the stick is "palbody", the last definition)
Code:
worldAABB.lowerBound.Set(-100.0f, -100.0f);
   worldAABB.upperBound.Set(100.0f, 100.0f);
   
   b2Vec2 gravity(0.0f, 0.0f);
   bool doSleep = false;
   
   b2World world(worldAABB, gravity, doSleep);
   
   b2BodyDef groundBodyDef;
   groundBodyDef.position.Set(3.2f, 4.78f);
   
   b2Body* groundBody = world.CreateBody(&groundBodyDef);
   b2PolygonDef groundShapeDef;
   groundShapeDef.SetAsBox(3.2f, 0.1f);
   
   groundBody->CreateShape(&groundShapeDef);
   
   b2BodyDef groundBodyDef2;
   groundBodyDef2.position.Set(3.2f, 0.0f);
   
   b2Body* groundBody2 = world.CreateBody(&groundBodyDef2);
   b2PolygonDef groundShapeDef2;
   groundShapeDef2.SetAsBox(3.2f, 0.1f);
   
   groundBody2->CreateShape(&groundShapeDef2);
   
   
   //Wall left
   b2BodyDef wallDef1;
   wallDef1.position.Set(0.0f, 2.4f);
   
   b2Body* wallBody1 = world.CreateBody(&wallDef1);
   b2PolygonDef wallShapeDef1;
   wallShapeDef1.SetAsBox(0.1f, 2.4f);
   
   wallBody1->CreateShape(&wallShapeDef1);
   
   
   //Wall right
   b2BodyDef wallDef2;
   wallDef2.position.Set(6.4f, 2.4f);
   
   b2Body* wallBody2 = world.CreateBody(&wallDef2);
   b2PolygonDef wallShapeDef2;
   wallShapeDef2.SetAsBox(0.1f, 2.4f);
   
   wallBody2->CreateShape(&wallShapeDef2);
   
   b2BodyDef bodyDef;
   bodyDef.position.Set(1.0f, 1.0f);
   bodyDef.isBullet=true;
   b2Body* body = world.CreateBody(&bodyDef);
   b2CircleDef shapeDef;
   shapeDef.radius=0.05f;
   shapeDef.density = 0.1f;
   shapeDef.friction = 0.0f;
   shapeDef.restitution = 1.0f;
   body->CreateShape(&shapeDef);
   body->SetMassFromShapes();
   
   b2BodyDef palbodyDef;
   palbodyDef.position.Set(4.0f, 2.0f);
   b2Body* palbody = world.CreateBody(&palbodyDef);
   b2PolygonDef palshapeDef;
   palshapeDef.SetAsBox(1.0f,0.05f);
   palshapeDef.density = 1.0f;
   palshapeDef.friction = 0.0f;
   palshapeDef.restitution = 0.0f;
   palbody->CreateShape(&palshapeDef);
   palbody->SetMassFromShapes();
   
   float32 timeStep = 1.0f / 60.0f;
   int32 iterations = 10;


Then I render to screen with something like that (Using Simple directmedia layer):
Code:
                world.Step(timeStep, iterations);
      b2Vec2 ballposition = body->GetPosition();
      b2Vec2 palposition = palbody->GetPosition();
      apply_surface( 0, 0, background, screen );
      apply_surface( ballposition.x*100, ballposition.y*100, foo, screen );
      apply_surface( (palposition.x*100)-100, (palposition.y*100)-5, paletka, screen );
if( SDL_Flip( screen ) == -1 )
      {
         return 1;
      }


Code for moving the stick:
Code:
case SDLK_LEFT:
                  palbody->SetLinearVelocity(b2Vec2(-1.8f,palbody->GetLinearVelocity().y)); break;


Please help... I can make a video of what exactly is happening or send you the compiled code (only for mac os x I'm afraid...)
Ok, I figured out what the problem is... the collision is working fine but my stick is rotating after each collision. I don't want that, how can I make it not rotate?
moving static shapes (like platforms in mario) are a common problem in this forum, and I haven't seen a good solution yet. but here are some solutions for you that I could think of:

solution #1: it's not a bug, it's a feature! Wow what an cool twist!

solution #2: create distance joints that are connected to the ends of the stick. you could attach them to the opposite wall. you could dynamically move them with the platform, or do other cool stuff to manipulate the stick

also, you might want to use the debugdraw to draw your "stick" (turn on the drawShapes and drawJoints bits) so you can see the stick and the joints.
For the moment I came up with a very untidy solution... doing a palbody->SetXForm(palbody->GetPosition();,0.0f); every frame which resets the angle. Probably it's going to give me some other problems (like performance...) but for now it works. I'll look into the joints... thank you for your help 🙂
Maybe I'll look into box2d code... would it be hard to add a property norotate=true that would bypass all rotation calculations for the given body?

Original thread: https://box2d.org/forum/viewtopic.php?t=3557