Even with today's modern imaging devices, bone fractures simply don't always show up during or after the operation. Most surgeons are very careful to take postoperative X-rays before the patient even leaves the operating room.
A hairline fracture may not show up until the patient puts enough weight on the leg to further stress the bone. Pain on weight-bearing is a classic sign of a fracture. It's good the diagnosis was made before she walked enough to displace the bone.
Studies show that most fractures related to hip joint replacement occur in older, obese women. Sometimes the size of the implant stem isn't a good match for the patient and a fracture can occur. Sizing implants can be very difficult, made worse by the patient who is osteoporotic.