I think it may caused by wrong map projection, in your map you should set map projection (I use EPSG:900913 in the example), such as:
map = new OpenLayers.Map('testmap', {
numZoomLevels: 10,
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG: 4326")
});
if you don't do that, map.getProjectionObject() will still get the EPSG:4326 projection.