I recently had a E-46 that had had body work done at some point and the connectors were exposed where they were supposed to be sealed and it required alot of time looking for a needle in a haystack, but still recently a mini-cooper with the same symptoms as the original post...It ultimately was an owner whom left the windows open in a rainstorm....cost alot of money before that customer owned up!.
The lock actuators as well as linkages can be a problem and someone with know-how can usually pinpoint it.
A GT-1 helps greatly...