I think there is a bug and I would not know how to fix it
The problem and the following
When I open a dialog in Photoshop
Win = new Window ("dialog"
Everything is alright
If then I open a palette panel
Win = new Window ("palette"
This does not work and everything stops
And I'm forced to close photoshop
Losing the work done so far.
Instead I do not use the dialog box and only use palettes
This works well.
I use mac and photoshop cc 2014