I found a case where two member variables of b2WheelJoint remain uninitialized.
In the case of m_frequencyHz = 0.0f the members m_sAx and m_sBx are not set in InitVelocityConstraints() but are used in SolveVelocityConstraints() which leads to undefined behavior usually resulting in NANs in the system.
Setting m_sAx and m_sBx to 0.0f in the constructor resolves the problem.
In the case of m_frequencyHz = 0.0f the members m_sAx and m_sBx are not set in InitVelocityConstraints() but are used in SolveVelocityConstraints() which leads to undefined behavior usually resulting in NANs in the system.
Setting m_sAx and m_sBx to 0.0f in the constructor resolves the problem.