tags:

views:

188

answers:

0

in the latest symbolicatecrash for iPhone SDK 3.2 beta 2, i'm getting the error Error: can't parse OS Version string iPhone OS 3.1.2 when trying to symbolicate crash logs build on older crashlog formats.

the latest symbolicate crash has introduced a build and version string for the OS version. For older versions of the crash log, you will need to edit symbolicate crash to retain the older regex logic.

modify the following subroutine:

sub parse_OSVersion {
    my ($log_ref) = @_;
    my $section = parse_section($log_ref,'OS Version');
    if ( $section =~ /\s([0-9\.]+)\s+\(Build (\w+)/ ) {
            return ($1, $2)
    }
    if ( $section =~ /\s([0-9\.]+)\s+\((\w+)/ ) {
            return ($1, $2)
    }
    die "Error: can't parse OS Version string $section";
}

to the following:

sub parse_OSVersion {
    my ($log_ref) = @_;
    my $os = parse_section($log_ref,'OS Version');
    $os =~ /\(Build (\w+)/
      || $os =~ /\((\w+)\)/; # new format
    return $1;
}

That solved the issue for me