I track a point on my clip and apply tracking data to null, then a create a simple shape and link its position to the null's position and that shape suddenly jumps somewhere, it does not take coords of the null's tracking data.
The same problem happens when I create a shape A and shape B and link shape B's position to shape A's position (via Pick Whip). Shape B jumps to some location other than shape A's location. I found out it's somehow connected to the anchor point of shape B. It's located in the middle of my clip. When I drag shape B's anchor point to its center, then shape B jumps to the correct location, after I link it to shape A's position.
Afaik it's not supposed to work this way. What is going on? Did I accidentally change some settings in the menu that I'm not aware of?
I think you should not link but parent the layer to the null. As soon as you use the linking for position objets, the shape layer inherits the exact same position of the null object. And if your shape is not exaclty at position 0,0 inside the shape layer container this can create an offset between the shaep layer position and the position of the null object.
If you want an object in a shape layer to snap to the position of a null, you have to make sure that the Anchor point for the shape layer is in the right place. Preferences has an option to automatically move the Anchor Point to the center of the first shape you draw, but this is off by default. You can also snap the Anchor point to the center of any object in a shape layer by enabling snapping and using the Anchor Point tool (y). You can also see if the shape is not at the default position by pressing the 'u' key twice.
If you hold down the Shift key when Parenting a layer to another layer (your null), the child will snap to the same position, orientation, and scale as the Parent layer. If you use the Parent/Link pickwhip, the layer will snap to the 'parent' layer's position unless you add a value + prefix to the expression.
We would have to see an embedded screenshot of your timeline with all of the modified properties of your problem layers showing. Press the 'u' key twice and drag the screenshot to the reply field instead of the Drag and Drop here button, so we can see what is going on. I suspect the only problem is the shape layer's Anchor Point.
As per your description it works as it always has. Shape layers have centered anchor points, all other layer types use the top left corner as the origin for their coordinates. Furthermore shape layers can of course have individual transforms for each sub-group, further complicating things if the values are not perfectly zerored out/ set the same. So for what it's worth you may simply need to make it a habit to check those things before getting into your parenting and pickwhipping.