I ran into this problem myself. I even attempted to build Maya's rockingTransform example, and it wouldn't duplicate either.
The solution to this problem is to make sure that you have runtime type information activated for your project (assuming compilation with Visual Studio). Maya uses RTTI in some cases, so if you turn that off, Maya operations that use the RTTI system will fail.
As a note to those who are further interested, I discovered this by making sure I had the debugging symbols for Windows and then debugging my plugin in Visual Studio. The initial crash occurs somewhere in msvcr71.dll (for Maya 7.0 on Windows XP, anyway), which still didn't have symbol information for me. I then discovered that Maya ships its own msvcr71.dll file in Maya7.0/bin, which of course doesn't have a matching version number for the dll that I have, and the pdb of symbols that I have. So, to see what was really going on, I temporarily renamed Maya's copy of the msvcr71.dll and watched when the problem arose in my copy of the runtime, with symbols. Sure enough, it was in a __RTDynamicCast call of some kind, where the area just before the vtable was being checked for some RTTI-related pointer. Mine was NULL, because I didn't have RTTI enabled. Enabling RTTI filled in that pointer and allowed duplication to work.