Hallo,
also heute ist irgendwie der Wurm drin: nach einem Update heute Morgen, bekomme ich immer mal wieder folgende Zeilen im LOG:
2017.02.20 11:32:49 1: PERL WARNING: Use of uninitialized value $value in pattern match (m//) at fhem.pl line 4850, <GEN11> line 17.
2017.02.20 11:32:49 1: PERL WARNING: Use of uninitialized value $value in pattern match (m//) at fhem.pl line 4855, <GEN11> line 17.
2017.02.20 11:32:49 1: PERL WARNING: Use of uninitialized value $cmd in pattern match (m//) at fhem.pl line 4811, <GEN11> line 17.
Kann es damit zusammenhängen, dass ich "csrfToken" deaktiviert habe?
https://forum.fhem.de/index.php/topic,67477.0.html (https://forum.fhem.de/index.php/topic,67477.0.html)
Gruß
Blueberry63
Bitte schalte stacktrace an https://forum.fhem.de/index.php/topic,16311.msg206874.html#msg206874 und poste dann mal den Log-Auszug. Dann sieht man auch mehr.
Gruß, Christian
Wenn ich VERBOSE=5 setze, dann wir mir das LOG mit folgenden Zeilen zugeballert:
2017.02.20 15:11:28 4: WEB_192.168.99.128_42621 GET /fhem/tablet/index.html?XHR=1&inform=type=status;filter=room=all×tamp=1487599892570; BUFLEN:0
Das ist so massiv, dass ich das unmöglich über mehrere Minuten laufen lassen kann; FHEM läuft bei mir auf einem Einplatinen-Computer und dies würde das System lahmlegen.
Gruß
Blueberry63
Hi,
das kommt wohl vom TabletUI. Warum macht das bei Dir so massiv viele Abfragen? Da stimmt doch schonmal was nicht.
Außerdem: Schau mal nach, was in der fhem.pl in den Zeilen 4850, 4855 und 4811 steht.
Gruß,
Thorsten
Ich bin mir nicht ganz sicher, aber die Warnungen kommen wohl immer beim Aufruf von folgendem AT:
+*00:10:00 {
my $dewAussen=ReadingsVal("WetterYahoo","dewpoint","100");
my $dewKeller=ReadingsVal("SENS_THP","dewpoint","0")-1;
my $tempKeller=ReadingsVal("SENS_THP","temperature","0")-3;
my $dewDiff=$dewKeller-$dewAussen;
fhem("set KellerLueften off") if ($dewAussen >= $dewKeller && Value("KellerLueften") ne "off");;
fhem("set KellerLueften on") if ($dewAussen < $dewKeller && Value("KellerLueften") ne "on");;
fhem("set DewpointDiff $dewDiff");;
#fhem("trigger SchimmelKeller") if ($dewKeller > $tempKeller);;
#fhem("setstate SchimmelKeller defined") if ($dewKeller < $tempKeller);;
}
Muss ich hier seit der Version 5.8 etwas beachten?
Gruß
Blueberry63
Ich habe das o.g. AT mal auf DISABLE gesetzt, aber die Warnings kommen immer noch. Nun habe ich die Vermutung, dass es über TABLETUI kommt...
Gruß
Blueberry63
Zitat von: blueberry63 am 21 Februar 2017, 14:13:34
Ich habe das o.g. AT mal auf DISABLE gesetzt, aber die Warnings kommen immer noch. Nun habe ich die Vermutung, dass es über TABLETUI kommt...
Ignorierst Du mich?
und vermutlich liegt auch hier der Grund hier: https://forum.fhem.de/index.php/topic,67543.15.html
Grüße Markus
ZitatIgnorierst Du mich?
Sorry, ich habe im Moment leider nicht viel Zeit für FHEM. Das Problem mit TABLETUI gehe ich am Wochenende mal an. Bei den Zeilen in der fhem.pl geht es um die Sub-Routine "parseParam". Hier hoffe ich ebenfalls, dass ich am Wochenende hinter die Ursache komme.
Gruß
Blueberry63
Ich habe das Ereignis nun doch schon mit VERBOSE=5 undS TACKTRACE=1 geloggt bekommen:
2017.02.23 13:06:19 1: PERL WARNING: Use of uninitialized value $value in pattern match (m//) at fhem.pl line 4850, <GEN11> line 985.
2017.02.23 13:06:19 1: stacktrace:
2017.02.23 13:06:19 1: main::__ANON__ called by fhem.pl (4850)
2017.02.23 13:06:19 1: main::parseParams called by fhem.pl (4809)
2017.02.23 13:06:19 1: main::perlSyntaxCheck called by ./FHEM/90_at.pm (82)
2017.02.23 13:06:19 1: main::at_Define called by ./FHEM/90_at.pm (192)
2017.02.23 13:06:19 1: main::at_Exec called by fhem.pl (2900)
2017.02.23 13:06:19 1: main::HandleTimeout called by fhem.pl (606)
2017.02.23 13:06:19 1: PERL WARNING: Use of uninitialized value $value in pattern match (m//) at fhem.pl line 4855, <GEN11> line 985.
2017.02.23 13:06:19 1: stacktrace:
2017.02.23 13:06:19 1: main::__ANON__ called by fhem.pl (4855)
2017.02.23 13:06:19 1: main::parseParams called by fhem.pl (4809)
2017.02.23 13:06:19 1: main::perlSyntaxCheck called by ./FHEM/90_at.pm (82)
2017.02.23 13:06:19 1: main::at_Define called by ./FHEM/90_at.pm (192)
2017.02.23 13:06:19 1: main::at_Exec called by fhem.pl (2900)
2017.02.23 13:06:19 1: main::HandleTimeout called by fhem.pl (606)
2017.02.23 13:06:19 1: PERL WARNING: Use of uninitialized value $value in pattern match (m//) at fhem.pl line 4850, <GEN11> line 985.
2017.02.23 13:06:19 1: stacktrace:
2017.02.23 13:06:19 1: main::__ANON__ called by fhem.pl (4850)
2017.02.23 13:06:19 1: main::parseParams called by fhem.pl (4809)
2017.02.23 13:06:19 1: main::perlSyntaxCheck called by ./FHEM/90_at.pm (82)
2017.02.23 13:06:19 1: main::at_Define called by ./FHEM/90_at.pm (192)
2017.02.23 13:06:19 1: main::at_Exec called by fhem.pl (2900)
2017.02.23 13:06:19 1: main::HandleTimeout called by fhem.pl (606)
2017.02.23 13:06:19 1: PERL WARNING: Use of uninitialized value $value in pattern match (m//) at fhem.pl line 4855, <GEN11> line 985.
2017.02.23 13:06:19 1: stacktrace:
2017.02.23 13:06:19 1: main::__ANON__ called by fhem.pl (4855)
2017.02.23 13:06:19 1: main::parseParams called by fhem.pl (4809)
2017.02.23 13:06:19 1: main::perlSyntaxCheck called by ./FHEM/90_at.pm (82)
2017.02.23 13:06:19 1: main::at_Define called by ./FHEM/90_at.pm (192)
2017.02.23 13:06:19 1: main::at_Exec called by fhem.pl (2900)
2017.02.23 13:06:19 1: main::HandleTimeout called by fhem.pl (606)
2017.02.23 13:06:19 1: PERL WARNING: Use of uninitialized value $value in pattern match (m//) at fhem.pl line 4850, <GEN11> line 985.
2017.02.23 13:06:19 1: stacktrace:
2017.02.23 13:06:19 1: main::__ANON__ called by fhem.pl (4850)
2017.02.23 13:06:19 1: main::parseParams called by fhem.pl (4809)
2017.02.23 13:06:19 1: main::perlSyntaxCheck called by ./FHEM/90_at.pm (82)
2017.02.23 13:06:19 1: main::at_Define called by ./FHEM/90_at.pm (192)
2017.02.23 13:06:19 1: main::at_Exec called by fhem.pl (2900)
2017.02.23 13:06:19 1: main::HandleTimeout called by fhem.pl (606)
2017.02.23 13:06:19 1: PERL WARNING: Use of uninitialized value $value in pattern match (m//) at fhem.pl line 4855, <GEN11> line 985.
2017.02.23 13:06:19 1: stacktrace:
2017.02.23 13:06:19 1: main::__ANON__ called by fhem.pl (4855)
2017.02.23 13:06:19 1: main::parseParams called by fhem.pl (4809)
2017.02.23 13:06:20 1: main::perlSyntaxCheck called by ./FHEM/90_at.pm (82)
2017.02.23 13:06:20 1: main::at_Define called by ./FHEM/90_at.pm (192)
2017.02.23 13:06:20 1: main::at_Exec called by fhem.pl (2900)
2017.02.23 13:06:20 1: main::HandleTimeout called by fhem.pl (606)
2017.02.23 13:06:20 1: PERL WARNING: Use of uninitialized value $value in pattern match (m//) at fhem.pl line 4850, <GEN11> line 985.
2017.02.23 13:06:20 1: stacktrace:
2017.02.23 13:06:20 1: main::__ANON__ called by fhem.pl (4850)
2017.02.23 13:06:20 1: main::parseParams called by fhem.pl (4809)
2017.02.23 13:06:20 1: main::perlSyntaxCheck called by ./FHEM/90_at.pm (82)
2017.02.23 13:06:20 1: main::at_Define called by ./FHEM/90_at.pm (192)
2017.02.23 13:06:20 1: main::at_Exec called by fhem.pl (2900)
2017.02.23 13:06:20 1: main::HandleTimeout called by fhem.pl (606)
2017.02.23 13:06:20 1: PERL WARNING: Use of uninitialized value $value in pattern match (m//) at fhem.pl line 4855, <GEN11> line 985.
2017.02.23 13:06:20 1: stacktrace:
2017.02.23 13:06:20 1: main::__ANON__ called by fhem.pl (4855)
2017.02.23 13:06:20 1: main::parseParams called by fhem.pl (4809)
2017.02.23 13:06:20 1: main::perlSyntaxCheck called by ./FHEM/90_at.pm (82)
2017.02.23 13:06:20 1: main::at_Define called by ./FHEM/90_at.pm (192)
2017.02.23 13:06:20 1: main::at_Exec called by fhem.pl (2900)
2017.02.23 13:06:20 1: main::HandleTimeout called by fhem.pl (606)
2017.02.23 13:06:20 1: PERL WARNING: Use of uninitialized value $value in pattern match (m//) at fhem.pl line 4850, <GEN11> line 985.
2017.02.23 13:06:20 1: stacktrace:
2017.02.23 13:06:20 1: main::__ANON__ called by fhem.pl (4850)
2017.02.23 13:06:20 1: main::parseParams called by fhem.pl (4809)
2017.02.23 13:06:20 1: main::perlSyntaxCheck called by ./FHEM/90_at.pm (82)
2017.02.23 13:06:20 1: main::at_Define called by ./FHEM/90_at.pm (192)
2017.02.23 13:06:20 1: main::at_Exec called by fhem.pl (2900)
2017.02.23 13:06:20 1: main::HandleTimeout called by fhem.pl (606)
2017.02.23 13:06:20 1: PERL WARNING: Use of uninitialized value $value in pattern match (m//) at fhem.pl line 4855, <GEN11> line 985.
2017.02.23 13:06:20 1: stacktrace:
2017.02.23 13:06:20 1: main::__ANON__ called by fhem.pl (4855)
2017.02.23 13:06:20 1: main::parseParams called by fhem.pl (4809)
2017.02.23 13:06:20 1: main::perlSyntaxCheck called by ./FHEM/90_at.pm (82)
2017.02.23 13:06:20 1: main::at_Define called by ./FHEM/90_at.pm (192)
2017.02.23 13:06:20 1: main::at_Exec called by fhem.pl (2900)
2017.02.23 13:06:20 1: main::HandleTimeout called by fhem.pl (606)
2017.02.23 13:06:20 1: PERL WARNING: Use of uninitialized value $cmd in pattern match (m//) at fhem.pl line 4811, <GEN11> line 985.
2017.02.23 13:06:20 1: stacktrace:
2017.02.23 13:06:20 1: main::__ANON__ called by fhem.pl (4811)
2017.02.23 13:06:20 1: main::perlSyntaxCheck called by ./FHEM/90_at.pm (82)
2017.02.23 13:06:20 1: main::at_Define called by ./FHEM/90_at.pm (192)
2017.02.23 13:06:20 1: main::at_Exec called by fhem.pl (2900)
2017.02.23 13:06:20 1: main::HandleTimeout called by fhem.pl (606)
2017.02.23 13:06:20 1: PERL WARNING: Use of uninitialized value $cmd in pattern match (m//) at fhem.pl line 4811, <GEN11> line 985.
2017.02.23 13:06:20 1: stacktrace:
2017.02.23 13:06:20 1: main::__ANON__ called by fhem.pl (4811)
2017.02.23 13:06:20 1: main::perlSyntaxCheck called by ./FHEM/90_at.pm (82)
2017.02.23 13:06:20 1: main::at_Define called by ./FHEM/90_at.pm (192)
2017.02.23 13:06:20 1: main::at_Exec called by fhem.pl (2900)
2017.02.23 13:06:20 1: main::HandleTimeout called by fhem.pl (606)
2017.02.23 13:06:20 1: PERL WARNING: Use of uninitialized value $cmd in pattern match (m//) at fhem.pl line 4811, <GEN11> line 985.
2017.02.23 13:06:20 1: stacktrace:
2017.02.23 13:06:20 1: main::__ANON__ called by fhem.pl (4811)
2017.02.23 13:06:20 1: main::perlSyntaxCheck called by ./FHEM/90_at.pm (82)
2017.02.23 13:06:20 1: main::at_Define called by ./FHEM/90_at.pm (192)
2017.02.23 13:06:20 1: main::at_Exec called by fhem.pl (2900)
2017.02.23 13:06:20 1: main::HandleTimeout called by fhem.pl (606)
2017.02.23 13:06:20 1: PERL WARNING: Use of uninitialized value $cmd in pattern match (m//) at fhem.pl line 4811, <GEN11> line 985.
2017.02.23 13:06:20 1: stacktrace:
2017.02.23 13:06:20 1: main::__ANON__ called by fhem.pl (4811)
2017.02.23 13:06:20 1: main::perlSyntaxCheck called by ./FHEM/90_at.pm (82)
2017.02.23 13:06:20 1: main::at_Define called by ./FHEM/90_at.pm (192)
2017.02.23 13:06:20 1: main::at_Exec called by fhem.pl (2900)
2017.02.23 13:06:20 1: main::HandleTimeout called by fhem.pl (606)
2017.02.23 13:06:20 1: PERL WARNING: Use of uninitialized value $cmd in pattern match (m//) at fhem.pl line 4811, <GEN11> line 985.
2017.02.23 13:06:20 1: stacktrace:
2017.02.23 13:06:20 1: main::__ANON__ called by fhem.pl (4811)
2017.02.23 13:06:20 1: main::perlSyntaxCheck called by ./FHEM/90_at.pm (82)
2017.02.23 13:06:20 1: main::at_Define called by ./FHEM/90_at.pm (192)
2017.02.23 13:06:20 1: main::at_Exec called by fhem.pl (2900)
2017.02.23 13:06:20 1: main::HandleTimeout called by fhem.pl (606)
Kann jemand damit etwas anfangen? Falls dieser Thread in einen anderen Bereich sollte, bitte melden.
Gruß
Blueberry63
Außerdem: Schau mal nach, was in der fhem.pl in den Zeilen 4850, 4855 und 4811 steht.
Kannst Du das mal machen? Vielleicht mit ein bisschen Coding außenrum.
Gruß,
Thorsten
Hier ist der Code-Block aus fhem.pl. Die relevanten Zeilen habe ich mit *** markiert:
#####################################
sub
perlSyntaxCheck($%)
{
my ($exec, %specials)= @_;
my $psc = AttrVal("global", "perlSyntaxCheck", ($featurelevel>5.7) ? 1 : 0);
return undef if(!$psc || !$init_done);
my ($arr, $hash) = parseParams($exec, ';');
for my $cmd (@{$arr}) {
*** next if($cmd !~ m/^\s*{/); # } for match
$cmd = EvalSpecials("{return undef; $cmd}", %specials);
my $r = AnalyzePerlCommand(undef, $cmd);
return $r if($r);
}
return undef;
}
#####################################
sub
parseParams($;$)
{
my($cmd, $separator) = @_;
$separator = ' ' if( !$separator );
my(@a, %h);
my @params;
if( ref($cmd) eq 'ARRAY' ) {
@params = @{$cmd};
} else {
@params = split($separator, $cmd);
}
while (@params) {
my $param = shift(@params);
my ($key, $value) = split( '=', $param, 2 );
if( !defined( $value ) ) {
$value = $key;
$key = undef;
}
#collect all parts until the closing ' or "
while( $param && $value =~ m/^('|")/ && $value !~ m/$1$/ ) {
my $next = shift(@params);
last if( !defined($next) );
$value .= $separator . $next;
}
#remove matching ' or " from the start and end
*** if( $value =~ m/^('|")/ && $value =~ m/$1$/ ) {
$value =~ s/^.(.*).$/$1/;
}
#collect all parts until opening { and closing } are matched
*** if( $value =~ m/^{/ ) { # } for match
my $count = 0;
for my $i (0..length($value)-1) {
my $c = substr($value, $i, 1);
++$count if( $c eq '{' );
--$count if( $c eq '}' );
}
while( $param && $count != 0 ) {
my $next = shift(@params);
last if( !defined($next) );
$value .= $separator . $next;
for my $i (0..length($next)-1) {
my $c = substr($next, $i, 1);
++$count if( $c eq '{' );
--$count if( $c eq '}' );
}
}
}
if( defined($key) ) {
$h{$key} = $value;
} else {
push @a, $value;
}
}
return(\@a, \%h);
}
# get "Porbably Associated With" list for a devicename
sub
getPawList($)
{
my ($d) = @_;
my $h = $defs{$d};
my @dob;
foreach my $dn (sort keys %defs) {
next if(!$dn || $dn eq $d);
my $dh = $defs{$dn};
if(($dh->{DEF} && $dh->{DEF} =~ m/\b$d\b/) ||
($h->{DEF} && $h->{DEF} =~ m/\b$dn\b/)) {
push(@dob, $dn);
}
}
return @dob;
}
Gruß
Blueberry63
Schmeiss mal die doppelten Strichpunkte aus dem Perl-Teil Deines at.
Gruß,
Thorsten
ZitatSchmeiss mal die doppelten Strichpunkte aus dem Perl-Teil Deines at.
Wie hast Du das denn rausgefunden und in welchem AT sollen die Strichpunkte denn sein? Ich sehe nur "90_at.pm" im Stacktrace
Gruß
Blueberry63
Zitat von: blueberry63 am 24 Februar 2017, 09:09:36
Wie hast Du das denn rausgefunden und in welchem AT sollen die Strichpunkte denn sein? Ich sehe nur "90_at.pm" im Stacktrace
Das Coding in fhem.pl sieht so aus, als ob da was an ";" gesplittet wird. Ich glaube, dass es ein Problem ist, wenn zwischen zwei ";" nichts ist.
Dann etwas zurück hier im Thread (21. Februar) und da sieht man es...
Könntest Du das ausprobieren? Falls es dann nicht mehr auftritt, sollten wir das ggf. an Rudi weitergeben, da das ja auch sowas wie ein Syntaxfehler ist, der eigentlich von Rudis Check gefunden werden sollte.
Gruß,
Thorsten
An dem o.g. AT kann es nicht liegen, denn dieses habe ich auf DISABLE gesetzt, aber die Meldungen kamen danach immer noch.
Na und? Vielleicht läuft die Syntaxprüfung trotzdem.
Könntest Du es einfach ausprobieren?
Vielleicht hast Du auch noch anderes Perl-Coding mit doppelten ";"?
Gruß,
Thorsten
doppelte ";" kommt mir bekannt vor:
guckst du --> https://forum.fhem.de/index.php/topic,67571.msg592753.html#msg592753
fhem update von heute würde in dem fall reichen
Zitat von: the ratman am 24 Februar 2017, 12:06:17fhem update von heute würde in dem fall reichen
Ah, dann hat Rudi das schon behandelt?
Gruß,
Thorsten
Ich habe die doppelten Strichpunkte mal korrigiert und jetzt kommen die Meldungen nicht mehr! :)
Danke an Alle für Eure Mithilfe!
Gruß
Blueberry63