Or maybe with the INSERT macro, though I don't think this is the case.
Anyways, I'm trying to use INSERT to, well, insert something in front of something else. Afterwards I'm calling CHECK_LINKS just to make sure everything is still working like it should be and the mud hangs. Here's what the log file shows for the last session when this happened.
Mon Jul 13 08:26:18 2009 :: [*****] BUG: CHECK_LINKS(ship->first_module): 0x91d3088:->prev != 0x91cf000. Fixing.
Mon Jul 13 08:26:18 2009 :: [*****] BUG: CHECK_LINKS(ship->first_module): 0x91d3088:->prev != 0x91d3088. Fixing.
Now, looking at the CHECK_LINKS macro, ship->first_module(*ptr)->prev is getting checked against *pptr, which should be NULL. This is, apparently, not the case. It also appears to be stuck in an infinite loop, which is why I believe the mud is hanging, because, as you can see, *pptr is changing, but it's not changing *ptr, which looks to be stuck on ship->first_module.
Then again, it only happens after using INSERT, so maybe it is the other way around?