in reply to perl crashes parsing huge script - how to find a line that crashes it?

What's the error message? That probably reports where the problem lies.
  • Comment on Re: perl crashes parsing huge script - how to find a line that crashes it?

Replies are listed 'Best First'.
Re^2: perl crashes parsing huge script - how to find a line that crashes it?
by Anonymous Monk on Feb 19, 2008 at 10:34 UTC
    No error message from perl. I just get standard "application has crashed and was terminated" window.
      I just get standard "application has crashed and was terminated" window

      I think that indicates that the program has compiled successfully - and that you're getting a segfault (ie runtime error) before any other output has been produced.

      Some print "Got to here\n"; statements sprinkled throughout should help determine where the error is occurring.

      Cheers,
      Rob
        It's a commandline script.

        It even crash perl if run with perl -c script.pl - i.e. it crashes during parsing, not during execution.

        I'll insert

        BEGIN { print STDERR "still alive at line " . __LINE__ . "\n";}
        in every 1000th line, this seems to be the best solution so far..
      Is this some gui-application, or a commandline program started by clicking an icon? Anyway, try to start it from a Dos command shell, i.e. Start->Run->cmd
      look at the properties for the shortcut and cd to the right drive / directory accordingly. Starting from a commandline will leave you at the commandline with the possibility that you get some more information when it chrashes.
      hth