I can reproduce it with pb 546 x64 linux (which might be the latest version at the time mk posted), getting IMA at WaitWindowEvent() with both codes when clicking a menu entry.But it works fine with the current pb 570 lts.

BTW:In the museum the version 5.46 is not listed on the page. But I could download it by using another download link and modifying the URL. Maybe It should be added on the page.