Velocity resets after I jump?

Hi everyone. I'm currently working on a project using libgdx which has Box2D implemented. I'm not sure if this bug will happen without the port, but here goes:

When I make my body move in the X-axis and subsequently jump in the Y-axis (i tried both applyforce and applyLinearImpulse), it seems that my X velocity will reset on the next tick. Is there any particular reason for this?

here are some snippets of my code(in java):
Code:
      Vector2 temp = mPhyObj.getWorldCenter();
      
      if ( Global.gInputManager.CheckTopEvent(cInputEvent.INPUTTYPE.TOUCHDOWN))
      {
         Gdx.app.log("HERO", "TAPPED");
         if ( Global.gInputManager.GetTopEvent().mTouchX > 100 )
         {
            Gdx.app.log("HERO", "JUMP: " + mPhyObj.getLinearVelocity().x);
            //mPhyObj.applyForce(0.f, 10000.f, mPhyObj.getPosition().x, mPhyObj.getPosition().y);
            
            mPhyObj.applyLinearImpulse(0.f, 1000.f, temp.x, temp.y);
         }
      }
      
      Gdx.app.log("HERO", "NORM: " + mPhyObj.getLinearVelocity().x);
      
      mPhyObj.applyLinearImpulse(0.01f, 0.f, temp.x, temp.y);


I have (hopefully temporarily) replaced the last line with:
Code:
mPhyObj.setLinearVelocity( mSpeed , mPhyObj.getLinearVelocity().y);
mSpeed += mAcceleration *dt ;


and it works exactly as I wanted, just that I have to manage speed myself. However, I don't really enjoy replacing code without knowing what went wrong in the first place. Anyone care to shed some light on this?

Thanks,
Faylar
Everything seems ok there.
I am wondering about the size of those impulses though, they seem very large. One very slight possibility is that you may be hitting the velocity limit enforced on all bodies which is 2 units per timestep by default. If the velocity exceeds this limit it will be scaled down so that the velocity magnitude is 2 units per timestep. If you have an almost vertical vector (eg. 0.01, 1000) then this would be scaled down so that the vertical component is a little under 2, and the horizontal component would become... almost zero. Do you get the same problem when using smaller impulses for jumping?

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