http://qs1969.pair.com?node_id=219141

Nitrox has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to access a blessed reference to a tied hash from a child thread and I'm going nuts in the process. Could someone shed some light on how to accomplish this?

At the point the "object" is created by the parent print $HS returns:

Win32::OLE=HASH(0x296b448)

and print Dumper(\$HS) returns:

$VAR1 = \bless( { 'plugin' => undef, 'ThreadID' => 1124, 'NoLog' => 0, 'hwnd' => 1900794, 'DebugMode' => 0, 'EventCount' => 2, 'DeviceCount' => 2, 'LastCommandSelected' => undef, 'SunRise' => '7:02 AM', 'SunSet' => '4:13 PM' }, 'Win32::OLE' );
So all is good up to this point. The parent then spawns a child and the same code run in the child thread produces:

Win32::OLE=HASH(0x437c94c)

Calling Dumper(\$HS) in the child crashes the application without any output to stderr/out. Even trying print $HS->{SunSet} causes the same crash.

This is all I want for Christmas.

-Nitrox