Skip Menu |

This queue is for tickets about the Win32-Console-ANSI CPAN distribution.

Report information
The Basics
Id: 43592
Status: resolved
Priority: 0/
Queue: Win32-Console-ANSI

People
Owner: Nobody in particular
Requestors: sisyphus [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.01
Fixed in: (no value)



Subject: Won't work on Vista
Hi, The module compiles ok on Windows Vista SP1 but, as discussed at http://www.perlmonks.org/index.pl?node_id=744631 , it won't run on Windows Vista SP1. Attempting to load the module produces the following: C:\comp\Win32-Console-ANSI-1.01>perl -Mblib -le "use Win32::Console::ANSI" Can't load 'C:\_32\comp\Win32-Console-ANSI-1.01 \blib\arch/auto/Win32/Console/ANSI/ANSI.dll' for module Win32::Console::ANSI: load_file:Invalid access to memory location at C:/_32/ap825/lib/DynaLoader.pm line 226. at -e line 1 Compilation failed in require at -e line 1. BEGIN failed--compilation aborted at -e line 1. I don't know how to fix this, but if there's something I can do to help, please let me know. (It's the same problem on both perl-5.8.9 and perl-5.10.0.) Cheers, Rob
CC: sisyphus [...] cpan.org
Subject: Re: [rt.cpan.org #43592] Won't work on Vista
Date: Wed, 25 Feb 2009 12:41:14 +0100
To: bug-Win32-Console-ANSI [...] rt.cpan.org
From: Jean-Louis Morel <jl_morel [...] bribes.org>
Sisyphus via RT a écrit : Show quoted text
> Tue Feb 24 21:09:30 2009: Request 43592 was acted upon. > Transaction: Ticket created by SISYPHUS > Queue: Win32-Console-ANSI > Subject: Won't work on Vista > Broken in: 1.01 > Severity: Important > Owner: Nobody > Requestors: sisyphus@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=43592 > > > > Hi, > The module compiles ok on Windows Vista SP1 but, as discussed at > http://www.perlmonks.org/index.pl?node_id=744631 , it won't run on > Windows Vista SP1. Attempting to load the module produces the following: > > C:\comp\Win32-Console-ANSI-1.01>perl -Mblib -le "use > Win32::Console::ANSI" > Can't load 'C:\_32\comp\Win32-Console-ANSI-1.01 > \blib\arch/auto/Win32/Console/ANSI/ANSI.dll' for module > Win32::Console::ANSI: load_file:Invalid access to memory location at > C:/_32/ap825/lib/DynaLoader.pm line 226. > at -e line 1 > Compilation failed in require at -e line 1. > BEGIN failed--compilation aborted at -e line 1. > > I don't know how to fix this, but if there's something I can do to > help, please let me know. > > (It's the same problem on both perl-5.8.9 and perl-5.10.0.) > > Cheers, > Rob >
Hi Rob, Thank you for this report. I can't reproduct the bug on my Vista box (Vista Home Premium + SP1 - french version). All tests pass. Is there an anti-virus on your machine? I know that some antiviruses have a very aggressive strategy and lock the memory. Regards. -- J-L.M. http://www.bribes.org/perl
CC: <sisyphus [...] cpan.org>
Subject: Re: [rt.cpan.org #43592] Won't work on Vista
Date: Wed, 25 Feb 2009 23:43:52 +1100
To: "Jean-Louis Morel" <jl_morel [...] bribes.org>, <bug-Win32-Console-ANSI [...] rt.cpan.org>
From: "Sisyphus" <sisyphus1 [...] optusnet.com.au>
Show quoted text
----- Original Message ----- From: "Jean-Louis Morel" <jl_morel@bribes.org> [snip]
> Thank you for this report. I can't reproduct the bug on my Vista box > (Vista Home Premium + SP1 - french version). > All tests pass. > Is there an anti-virus on your machine? I know that some antiviruses > have a very aggressive strategy and lock the memory.
I have only the freely available clamwin, and it doesn't do anything in an "active" sense - so I don't think that's the problem. (About once a week I manually open clamwin and get it to scan my hard drive. Apart from that it does nothing, afaik.) I wonder if there could be some Vista security feature that you've disabled, but I haven't ... or a Vista security feature that I've enabled, but you haven't :-) Btw, I'm running Vista Business 64 (AMD64 chip) with SP1, English version. I don't know what the op in the perlmonks thread was running - except that it was Vista SP1. Cheers, Rob
Subject: Re: [rt.cpan.org #43592] Won't work on Vista
Date: Sat, 28 Feb 2009 20:54:47 +0100
To: bug-Win32-Console-ANSI [...] rt.cpan.org
From: Jean-Louis Morel <jl_morel [...] bribes.org>
Sisyphus via RT a écrit : Show quoted text
> Tue Feb 24 21:09:30 2009: Request 43592 was acted upon. > Transaction: Ticket created by SISYPHUS > Queue: Win32-Console-ANSI > Subject: Won't work on Vista > Broken in: 1.01 > Severity: Important > Owner: Nobody > Requestors: sisyphus@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=43592 > > >
Hi Rob, I have just loaded Win32-Console-ANSI-1.02 on the CPAN. According to tests on a Vista 64 box, the bug is fixed. Can you confirm? Thank you for your contribution. Regards. -- J-L.M. http://www.bribes.org/perl
Subject: Re: [rt.cpan.org #43592] Won't work on Vista
Date: Sun, 1 Mar 2009 18:41:17 +1100
To: <bug-Win32-Console-ANSI [...] rt.cpan.org>, <sisyphus [...] cpan.org>
From: "Sisyphus" <sisyphus1 [...] optusnet.com.au>
Show quoted text
> I have just loaded Win32-Console-ANSI-1.02 on the CPAN. > According to tests on a Vista 64 box, the bug is fixed. > Can you confirm?
Yes - that works fine for all of my 32-bit perls. All tests pass. On my 64-bit perl-5.10 (ActivePerl build 1004), the MakePtr macro needs some amendment. One solution is to replace the exisiting macro with #define MakePtr( cast, ptr, addValue ) (cast)((__int64)(ptr)+(DWORD)(addValue)) That works fine for all of my 32-bit and 64-bit builds, even MinGW (where __int64 is known because windows.h has been included). If you prefer to cast to __int64 *only* when it's needed, then something like this patch can be used: ######################### --- ANSI.xs_orig Sun Mar 1 05:59:08 2009 +++ ANSI.xs Sun Mar 1 18:32:18 2009 @@ -34,7 +34,12 @@ // ========== Global variables and constants // Macro for adding pointers/DWORDs together without C arithmetic interfering -#define MakePtr( cast, ptr, addValue ) (cast)( (DWORD)(ptr)+(DWORD)(addValue)) +#ifdef _WIN64 +#define _MY_CAST __int64 +#else +#define _MY_CAST DWORD +#endif +#define MakePtr( cast, ptr, addValue ) (cast)((_MY_CAST)(ptr)+(DWORD)(addValue)) HINSTANCE hDllInstance; // Dll instance handle HWND hConWnd; // Console window handle ################################# Thanks Jean-Louis. Cheers, Rob
The 1.04 version of the module works on Vista (32 and 64) and on Windows 7-beta (32 and 64).