http://www.perlmonks.org?node_id=988297

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

Hello, I am running a perl script that collects files and I get this error since yesterday

returned- 1073741819 <\p>

I have looked the error online and it says its due to the fact that windows shuts down the script. Can someone help me resolve this issue? It's really frustrating

Thank you so much!

Replies are listed 'Best First'.
Re: error 1073741819
by BrowserUk (Patriarch) on Aug 19, 2012 at 07:57 UTC

    The error code you are getting is -1073741819 which in hex is: 0xFFFFFFFFC0000005 on a 64-bit platform and is equivalent to 0xC0000005 on a 32-bit platform.

    Which is: The error 0xC0000005 is generated by an illegal "memory access violation".

    It generally occurs when a program attempts to access memory through a bad or null pointer.

    And if you are getting this in Perl, it usually means you are doing something pretty hookey.

    Install Devel::Trace, and run your script using: perl -d:Trace yourScript.pl -- it may take a long time to finish, but when it does, the line of your script that created the error should be the last line traced on the screen.


    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.

    The start of some sanity?

      I am still learning so nothing fancy or weird. I think it may be a map problem? because I am using map instead of slurp after finding out it is much faster. I will see what line is giving me the error with Devel::Trace! Thank you so much!

        I think it may be a map problem?

        On the surface of things, map is an unlikely candidate It should not be possible to create this particular error using normal Perl.

        It would certainly be easier to make suggestions if you posted the code.


        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.

        The start of some sanity?

      I followed ur suggestion and used Devel::Trace. I found that code stops here after looping through many files. The perl script just goes through files and counts if certain words are present and then records the file names to a csv file. Here is the part that is causing the problem.

      Again, the file runs fine up to a point that the csv file is about a size of 700KB and then dies

      According to Devel::Trace this is where it stops

      if($data=~m/${query}/io) { $match_found=1; $fcount=()=$data=~m/(?^:\n.*(?:(?:(?:(?:authoritative|revenue\s+ +recognition|invaluable\s+practical|valuable|regulatory|technical|unde +r\s+the|staff's|judicial|SEC|FDA|Treasury(?:\s+Department)?|specific| +implementation|their|government|any\s+ruling|college|absent|\s+his|in +terim|intrepretive|transition|administrative|procedural|related|appli +cable|accounting|definitive|supreme\s+court|superceding|IRS|Internal\ +s+Revenue\s+Service|valued|EITF\s+accounting)|provides?\s+guidance\s+ +(?:on\s+(?:how)?|for)\s+(?:to\s+identify|uncertain\s+tax|whether)|(?: +interpretation|permits|knowledge|regulations|successor\s+statutes|pol +icy(?:\s+statements)?)\s+(?:or|\,)|board\s+will\s+continue\s+to\s+pro +vide\s+guidance|guidance\s+requiring\s+the\s+credit|(?:directive|navi +gation|exemption|practice|judgments|doctrine|forecast),|FD\s+Disclosu +re\s+of\s+Form\s+8-K\s+in\s+accordance\s+with\s+guidance|guidance\s+d +ocument\s+promulgated|seek\s+guidance\s+from|employee\s+handbook\s+fo +r|(?:SAB\s+101|FIN\s+48|EITF\s+00\-14|SOP98\-\d|SFAS\s+\d\d\d?)\s+(?: +also\s+)?provides\s+guidance(?:\s+on\s+whether|related)|Item\s+\d\d?\ +s+pursuant\s+to|(?:other|applicable)\s+guidance\s+issued|according\s+ +to\s+the\s+guidance\s+contained|provide\s+guidance\s+to\s+directors|r +eceiving)\s+guidanc|(?:\"projection\"|\"intend\")(?:\s+and\s+|\,)"out +look"|company\s+follows\s+the\s+guidance\s+of|guidance\s+should\s+be\ +s+applied\s+prospectively|provides\s+guidance\s+for\s+using\s+fair\s+ +valu)e|guidance\s+(?:(?:from\s+(?:the\s+)?(?:FDA|Financial\s+Accounti +ng\s+Standards\s+Board)|(?:counsel|advice|information|circular|regula +tion|code)\s+and|(?:prescribed|set\s+forth|issued)\s+by(?:\s+the\s+(? +:Department|Treasury|AICPA|FASB|SEC))?|(?:action|policy|orders)\s+or) +\s+guidance|(?:and\s+rules|promulgated(?:\s+thereunder)?|in\s+SFAS)|( +?:provided|issued)\s+by\s+(?:the\s+)?(?:SEC|Securities\s+and\s+Exchan +ge\s+Commission|Internal\s+Revenue\s+Service|Secretary|United\s+State +s|Financial\s+Accounting)|(?:on|of|in)\s+(?:de\-recognition|APB\s+25| +S?FAS\s+No\.\s+144|SFAS\s+No\.\s+(?:150|13|123)|ARB|SEC\s+Release|SOP +\s+90-7|Emerging\s+Issues|SAB\s+101|determining\s+whether\s+multiple) +|(?:is\s+effective|which\s+allowed)|(?:comply\s+with\s+guidance\s+set +\s+forth\s+by|guidance\s+available\s+from)\s+the\s+(?:treasury|intern +al\s+revenue\s+service|IRS|SEC|FASB|AICPA)|disseminated\s+by\s+the\s+ +SEC|additional\s+guidance\s+to\s+physicians|FASB\s+issued\s+final\s+g +uidance|informed\s+of\s+the\s+guidance\s+relating|on\s+(?:recognizing +|the\s+application|the\s+identification|when\s+to\s+assess|accounting +\s+for\s+revenue))|(?:regarding\s+management's\s+plans,\s+goals,\s+ex +pectations,\s+guidance|To\s+obtain\s+guidance\s+on|for\s+additional\s ++guidance\s+on\s+which\s+number\s+to\s+repor|under\s+the\s+guidance\s ++and\s+(?:advice\s+of|Procedures|leadership|counsel|support)|company\ +s+follows\s+the\s+guidance\s+set\+forth\s+in\s+statemen|(?:future\s+s +tatutes|ordinances|orders|rules|regulations),\s+guidance|pursuant\s+t +o\s+SEC\s+guidance|Outlook\s+Pointe|guidance\s+line\s+of\s+credi)t|ou +tlook\s+for\s+any\s+rating|(?:rating|if\s+on\s+negative|Microsoft|sug +gesting\s+an|may\s+contain\s+statements\s+about\s+future\s+events\,|b +usiness\s+conditions\s+and\s+the)\s+outlook|guidance\s+(?:to\s+approv +e|facility)|the\s+guidance\s+from\s+the\s+OCA|Internal\s+Revenue\s+Se +rvice\s+has\s+issued\s+guidance|(?:wisdom|technical\s+assistance|nece +ssary\s+supervision|leadership)\s+and\s+guidances?|(?:current|other)\ +s+guidance\s+(?:under|from)|assumes\s+guidance\s+of\s+(?:the|a)\s+(?: +company|board|talented\s+team|compensation)|guidance\s+(?:system|soft +ware|technology)|forward\s+to\s+his\s+guidance|guidance\s+received\s+ +by\s+the\s+Company|section\s+409A\s+transition\s+guidance|absent\s+gu +idance\s+from\s+the\s+(?:Commission|government)|Statements\s+in\s+thi +s\s+press\s+release\s+concerning\s+the\s+company's\s+business\s+outlo +ok|guidance\s+regarding\s+the\s+acceptance\s+of\s+gifts)) /xig; }

      I built this regex using regex::assemble. Please let me know if there are better ways to speed up regex. Thank you again!

        Hm. You are not giving us accurate information. That regex is invalid and would never run. It stops immediately with:

        Sequence (?^...) not recognized in regex; marked by <-- HERE in m/(?^ +<-- HERE :\n.*(? ...

        Ie. The third character in the regex is a syntax error. There is no way for it to ever run, much less process many files correctly.

        Surely you didn't type that lot in by hand instead of cutting and pasting? And if you cut and pasted, where is the Devel::Trace line information prefix?


        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.

        The start of some sanity?

Re: error 1073741819
by davido (Cardinal) on Aug 19, 2012 at 07:56 UTC

    I see no problem with the code you posted.


    Dave

      What code? There was code but it was updated away?

        My apologies, bulk88. It was a joke. I see no problem in posted code because there is no code posted. I should have just come out and said it: I'd like to see some code. From there one of us might spot a potential problem.

        Or I should have stuck with the more familiar, "Your problem is on line 42." remark.


        Dave

Re: error -1073741819
by Athanasius (Archbishop) on Aug 19, 2012 at 07:56 UTC

    From http://www.symantec.com/connect/forums/intermittent-failure-vbscript-returns-1073741819-w2k8-r2#comment-6378581:

    The negative return code -1073741819 is actually the translation of 0xC0000005. This code mean[s] ACCESS_VIOLATION.... Usually this kind of problem is caused by an AntiVirus software running on the machine.

    So, this is probably possibly not a Perl problem — especially if, as your question seems to imply, you suddenly started getting this error on a script which was working OK previously? Have you just installed or updated your AV software?

    Athanasius <°(((><contra mundum

      It is not antivirus software. This is a called a seg fault in Unix. And what would an antivirus scanner that hooks VBScript (similar to javascript, and just as good for ActiveX sploiting), have to do with hooking the perl interp then crashing it? Perl is not Internet Explorer or COM/ActiveX.
Re: error 1073741819
by nikosv (Deacon) on Aug 19, 2012 at 09:49 UTC
    are you doing some external calls with Win32::API/COM ? if yes then they are the most likely candidates and not Perl map for sure
Re: error 1073741819
by Anonymous Monk on Aug 19, 2012 at 07:49 UTC

    I have looked the error online and it says its due to the fact that windows shuts down the script. Can someone help me resolve this issue?

    So how are you running the script?

      I use Komodo and active perl. The script runs file but at certain moment after the file size of the collected text exceeds 600-700K, it shuts down. returning the "returned- 1073741819" message.

        Run the script outside of komodo and see if it still gives an access violation. (Betting not!)


        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.

        The start of some sanity?

Re: error 1073741819
by Anonymous Monk on Aug 19, 2012 at 21:08 UTC

    Funny :)

    $ perl -E " die $^E=-1073741819 " Unknown error #0xC0000005 (lookup 0x13D) at -e line 1.