Hi,
I'd like to report a problem that might be a Perl bug. I'm rather new to
Perl so it may be that there's a simple explanation of which I'm not aware.
The issue occurs hwen trying to use OLE together with threading. Minimal
sample code:
use strict;
use warnings;
use threads;
use Win32::OLE;
my $thread = threads->create(sub { print while(<STDIN>) } );
$thread->join(); # Crash!
Upon running this everything works fine till inputting ctrl+z and the
anonymous sub function ends. when reaching the join bit, the Perl
interpreter crashes and needs to be closed down by Windows. perl does report
an error message after my last input saying:
Free to wrong pool 3c970 not 32770 during global destruction.
I don't actually use the OLE module, although I intend to, merely loading it
seems to be enough to trigger the error. Commenting out the OLE line
eliminates the chrash as does replacing the join with something else such as
sleep 10.
I'm running XP SP2 on a laptop computer with all of the latest fixes
applied. IF more machine info is needed, I can send the dot NFO file rar:ed
or zipped off-list.
perl -V reports:
Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
Platform:
osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=de
fine
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cl', ccflags
='-nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -
DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DPERL_IMPLICIT_CONTEXT -DPERL_IMPL
ICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX',
optimize='-MD -Zi -DNDEBUG -O1',
cppflags='-DWIN32'
ccversion='', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64',
lseeksi
ze=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='link', ldflags
'-nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:
\Perl\lib\CORE" -machine:x86'
libpth=\lib
libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32
.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib
ws2_
32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib
perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comd
lg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib
uuid.lib
ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib
libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl58.lib
gnulibc_version='undef'
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ',
lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -
libpath:"C:\Perl\lib\CORE" -machine:x86'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_
CONTEXT PERL_IMPLICIT_SYS
Locally applied patches:
ActivePerl Build 811
21540 Fix backward-compatibility issues in if.pm
23565 Wrong MANIFEST.SKIP
Built under MSWin32
Compiled at Dec 13 2004 09:52:01
@INC:
C:/Perl/lib
C:/Perl/site/lib
.
I didn't manage to get the WIn32::OLE version info from PPM. Looking in the
PM file (C:\Perl\site\lib\Win32\OLE.pm) manually revealed the version
number, however:
$VERSION = '0.1403';
I'm not exactly sure where I got that particular version as a number of
modules I'm using seem to require OLE.
Is this a real bug or some newbie mistake related to OLE or threading in
Perl? I know Java threads at some levle but am just experimenting with those
of Perl. If the crashing problem is a real bug, will updating to the latest
version of Win32::OLE and or Active State Perl fix it? Lastly, where can I
get the latest version of Win32::OLE using PPM?
Hope this can be of help and sorry in advance, if the solution seems to be
some obvious newbie error rather than something as magical and mighty as a
real Perl bug <smile>.
With kind regards Veli-Pekka Tätilä ([EMAIL PROTECTED])
Accessibility, game music, synthesizers and programming:
http://www.student.oulu.fi/~vtatila/
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs