You need to find out where in perl the call occurs.
You also need to rule out PDK as a factor.
You could use
Devel::Trace to help you, or sprinkle print statements in your code.
You could also recompile
Win32::GUI with
debug flags turned on for additional hints...
then write code to reproduce that error on demand, something you can send in bug report
rt://Win32-GUI (or to PDK, if PDK helps cause error).