Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

SEGV signal termination in Win32::NetAdmin ver 0.12 on Win64 w ActiveStatePerl5.16.3 X64

by suzun30 (Acolyte)
on Apr 03, 2014 at 20:10 UTC ( #1080998=perlquestion: print w/ replies, xml ) Need Help??
suzun30 has asked for the wisdom of the Perl Monks concerning the following question:

Hi

I am trying to use the Win32::NetAdmin module(0.12 under site/lib and 0.11 under lib) to get the local admin users via the LocalGroupGetMembersWithDomain() function call. My program dies and kicks out of the cmd. When run under debug mode, it gives this error. This is with Perl64 on a Windows 64 bit machine. The script fails in one particular machine only. Is this a version compatibility issue between the module and the windows system ? Following is a simple test script to check the modules functionality.

System Spec: Windows 64 bit ActiveStatePerl 5.16.3 for X64 Win32::NetAdmin 0.12(C:/Perl64/site/lib/)

use strict; use warnings; use Win32::NetAdmin; my %UserList = (); my $server_name = 'Server'; my $local_group_name = 'Administrators'; Win32::NetAdmin::LocalGroupGetMembersWithDomain($server_name, $local_g +roup_name, \%UserList); my @users = keys(%UserList); foreach my $user (@users) { print "User: $user\n"; }
Error:
Signal SEGV at C:/Perl64/lib/perl5db.pl line 7597 , <INFILE> line 23. +DB::diesignal('SEGV')called at GetLocalAdmins.pl

Searching about SEGV showed its difficult to trace. I am at not sure where else to look about this error. Please guide me to any pointers to go digging about.

Thanks

Comment on SEGV signal termination in Win32::NetAdmin ver 0.12 on Win64 w ActiveStatePerl5.16.3 X64
Select or Download Code
Re: SEGV signal termination in Win32::NetAdmin ver 0.12 on Win64 w ActiveStatePerl5.16.3 X64
by ww (Bishop) on Apr 04, 2014 at 00:13 UTC

    Are you sure you've given us all relevant code and messages?

    When I execute what you gave us, under 32 bit Win7, AS 5.16.3, with the original install (v = .11) of Win32::NetAdmin, I see:

    Reference found where even-sized list expected at D:\_wo_sch\1080998.pl line 4.

    That's as expected; if you delete the " = {}" so line 4 becomes "my %UserList;", you may have better success (emphasis on the "may", as I'm not playing with 64 bit 'doze.


    Questions containing the words "doesn't work" (or their moral equivalent) will usually get a downvote from me unless accompanied by:
    1. code
    2. verbatim error and/or warning messages
    3. a coherent explanation of what "doesn't work actually means.
      Hi,

      Thanks for your response. I corrected that to (). It was a mistake while trying to simplify the code for display here. But essentially that's the code. I am looking for any inputs on the SEGV issue. Please let me know if you have any pointers on that subject.

      Thanks,
        SEGVs dont really happen on Win32 (excluding Cygwin). They are called Exceptions with error code 0xC0000005 and perl signals can not catch them. Therefore "Signal SEGV at C:/Perl64/lib/perl5db.pl line 7597 , <INFILE> line 23. DB::diesignal('SEGV')called at GetLocalAdmins.pl " is manually generated. Therefore, there is code you are not showing us. There is no line 23 in your script and no <> operator. I see only upto line 14. The line 7597 in your script is http://perl5.git.perl.org/perl.git/blob/25fdf527591b902c99f699bb9d51d4f6ce49a6fc:/lib/perl5db.pl#l8503 in git perl. The line in ActivePerl is
        # Tell us all about it. &warn( Carp::longmess("Signal @_") );
        , not _db_warn. Something called $signalLevel, to allow diesignal to run and nothing uses http://grep.cpan.me/?q=signalLevel on CPAN, so its your code.
Re: SEGV signal termination in Win32::NetAdmin ver 0.12 on Win64 w ActiveStatePerl5.16.3 X64
by BrowserUk (Pope) on Apr 15, 2014 at 00:21 UTC
    I am trying to use the Win32::NetAdmin module(0.12 under site/lib and 0.11 under lib) to get the local admin users via the LocalGroupGetMembersWithDomain() function call.

    How did you install the module?

    When run under debug mode, it gives this error.

    What error do you get without debug?


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1080998]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2014-08-22 10:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (155 votes), past polls