Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Substitution replacement not terminated (Read 6492 times)
Monni
Senior Member
****
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Re: Substitution replacement not terminated
Reply #11 - Aug 30th, 2014 at 7:24pm
Print Post  
Switched over to Perl 5.14.3, hopefully it behaves better... Couldn't install any newer version as the server doesn't allow sudo.
  
Back to top
IP Logged
 
Monni
Senior Member
****
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Re: Substitution replacement not terminated
Reply #10 - Aug 29th, 2014 at 4:58pm
Print Post  
Dandello wrote on Aug 29th, 2014 at 4:14pm:
All you can do is keep watching and hope you can find it. (My bet is still on a bad interaction with HTML::Entities.)


All I can do is wait and listen to Dr. Bombay and look silly having no clue whatsoever...  Smiley
  
Back to top
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 1759
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Re: Substitution replacement not terminated
Reply #9 - Aug 29th, 2014 at 4:14pm
Print Post  
All you can do is keep watching and hope you can find it. (My bet is still on a bad interaction with HTML::Entities.)
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Monni
Senior Member
****
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Re: Substitution replacement not terminated
Reply #8 - Aug 29th, 2014 at 3:44pm
Print Post  
Dandello wrote on Aug 29th, 2014 at 3:24pm:
Yeah - it's hard to find/fix a bug when you can't trigger it.  Wink


The worst bugs are the ones that need special circumstances to reveal themselves. Sometimes it's combination of several things that usually don't happen at the same time. Without knowing the exact circumstances, it might take a long time to figure out where the culprit is.
  
Back to top
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 1759
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Re: Substitution replacement not terminated
Reply #7 - Aug 29th, 2014 at 3:24pm
Print Post  
Yeah - it's hard to find/fix a bug when you can't trigger it.  Wink
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Monni
Senior Member
****
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Re: Substitution replacement not terminated
Reply #6 - Aug 29th, 2014 at 2:49pm
Print Post  
I tried posting a thread full of smilies, but that didn't trigger the error in error log... Only thing different now is that none of the smiley descriptions contain high ASCII characters. All I can do now is to constantly monitor the error log if some other user manages to trigger the error again. It isn't easy as the error log is flooded by Google crawlers triggering non-fatal error in "viewprofile".
  
Back to top
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 1759
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Re: Substitution replacement not terminated
Reply #5 - Aug 29th, 2014 at 2:18pm
Print Post  
Here's an experiment for you - in that section replace the substitution code with:
Code
Select All
    $message =~ s~(\W|^)\[smil(ie|ey)=(\S+?\.(gif|jpg|png|bmp))\]~$1<img class="smil" data-rel="\[smil$2=$3\]" src="$yyhtml_root/Smilies/$3"  alt="$post_txt{'287'}" title="$post_txt{'287'}" />~gism;
    $message =~ s~(\W|^);-?\)~$1<img class="smil" data-rel=";&#45;&#41;" src="$imagesdir/wink.gif" alt="$post_txt{'292'}" title="$post_txt{'292'}" />~gsm;
    $message =~ s~(\W|^);D~$1<img class="smil" data-rel=";D" src="$imagesdir/grin.gif" alt="$post_txt{'293'}" title="$post_txt{'293'}" />~gsm;
    $message =~ s~(\W|^):'\(~$1<img class="smil" data-rel="&#58;'&#40;" src="$imagesdir/cry.gif" alt="$post_txt{'530'}" title="$post_txt{'530'}" />~gsm;
    $message =~ s~(\W|^):-/~$1<img class="smil" data-rel="&#58;&#45;/" src="$imagesdir/undecided.gif" alt="$post_txt{'528'}" title="$post_txt{'528'}" />~gsm;
    $message =~ s~(\W|^):-X~$1<img class="smil" data-rel="&#58;&#45;X" src="$imagesdir/lipsrsealed.gif" alt="$post_txt{'527'}" title="$post_txt{'527'}" />~gsm;
    $message =~ s~(\W|^):-\[~$1<img class="smil" data-rel="&#58;&#45;\[" src="$imagesdir/embarassed.gif" alt="$post_txt{'526'}" title="$post_txt{'526'}" />~gsm;
    $message =~ s~(\W|^):-\*~$1<img class="smil" data-rel="&#58;&#45;\*" src="$imagesdir/kiss.gif" alt="$post_txt{'529'}" title="$post_txt{'529'}" />~gsm;
    $message =~ s~(\W|^)&gt;:\(~$1<img class="smil" data-rel="&gt;:&#40;" src="$imagesdir/angry.gif" alt="$post_txt{'288'}" title="$post_txt{'288'}" />~gsm;
    $message =~ s~(\W|^)::\)~$1<img class="smil" data-rel="&#58;&#58;&#41;" src="$imagesdir/rolleyes\.gif" alt="$post_txt{'450'}" title="$post_txt{'450'}" />~gsm;
    $message =~ s~(\W|^):P~$1<img class="smil" data-rel=":P" src="$imagesdir/tongue\.gif" alt="$post_txt{'451'}" title="$post_txt{'451'}" />~gsm;
    $message =~ s~(\W|^):-?\)~$1<img class="smil" data-rel="&#58;&#45;&#41;" src="$imagesdir/smiley\.gif" alt="$post_txt{'287'}" title="$post_txt{'287'}" />~gsm;
    $message =~ s~(\W|^):D~$1<img class="smil" data-rel="&#58;D" src="$imagesdir/cheesy.gif" alt="$post_txt{'289'}" title="$post_txt{'289'}" />~gsm;
    $message =~ s~(\W|^):-?\(~$1<img class="smil" data-rel="&#58;&#45;&#40;" src="$imagesdir/sad.gif" alt="$post_txt{'291'}" title="$post_txt{'291'}" />~gsm;
    $message =~ s~(\W|^):o~$1<img class="smil" data-rel="&#58;o" src="$imagesdir/shocked.gif" alt="$post_txt{'294'}" title="$post_txt{'294'}" />~gism;
    $message =~ s~(\W|^)8-\)~$1<img class="smil" data-rel="8-&#41;" src="$imagesdir/cool.gif" alt="$post_txt{'295'}" title="$post_txt{'295'}" />~gsm;
    $message =~ s~(\W|^):-\?~$1<img class="smil" data-rel="&#58;-\?" src="$imagesdir/huh.gif" alt="$post_txt{'296'}" title="$post_txt{'296'}" />~gsm;
    $message =~ s~(\W|^)\^_\^~$1<img class="smil" data-rel="\^_\^" src="$imagesdir/happy.gif" alt="$post_txt{'801'}" title="$post_txt{'801'}" />~gsm;
    $message =~ s~(\W|^):thumb~$1<img class="smil" data-rel="&#58;thumb" src="$imagesdir/thumbup.gif" alt="$post_txt{'282'}" title="$post_txt{'282'}" />~gsm;
    $message =~ s~(\W|^)&gt;:-D~$1<img class="smil" data-rel="&gt;&#58;-D" src="$imagesdir/evil.gif" alt="$post_txt{'802'}" title="$post_txt{'802'}" />~gsm; 



It replaces the substitution brackets with '~' and allows the '/'s to be un-escaped. 

You could also go through and replace the lines one by one and really track down the culprit.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Monni
Senior Member
****
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Re: Substitution replacement not terminated
Reply #4 - Aug 29th, 2014 at 1:39pm
Print Post  
Dandello wrote on Aug 29th, 2014 at 1:23pm:
Line 42 is the line that handles 'angry'. Angry and cry are the 3 part smilies.
What version of Perl is running where this is happening?

And is it possible the problem is with a character going through HTML::Entities creating a problem on one of the lines?


Perl 5.10.1

Usually that error is caused by unbalanced "/" somewhere above the line Perl mentions... It is possible that the closing "/" isn't actually missing but Perl thinks the closing "/" on the line is part of quoted literal string.
  
Back to top
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 1759
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Re: Substitution replacement not terminated
Reply #3 - Aug 29th, 2014 at 1:23pm
Print Post  
Line 42 is the line that handles 'angry'. Angry and cry are the 3 part smilies.
What version of Perl is running where this is happening?

And is it possible the problem is with a character going through HTML::Entities creating a problem on one of the lines?
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Monni
Senior Member
****
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Re: Substitution replacement not terminated
Reply #2 - Aug 29th, 2014 at 1:04pm
Print Post  
I tried one by one to run the smiley lines to check if any of the lines could cause any problems whatsoever... Only line that didn't work straight was the "cry" smiley, because it had unbalanced ' and "... But even that shouldn't cause any issues as it isn't inside quoted literal string.

I suspect the error happens earlier and the line it mentions is where some character appears second time and closes quotation.

I'm seriously considering it is a bug in Perl and upgrading Perl might solve or clarify it.
  
Back to top
IP Logged
 
Dandello
Forum Administrator
*****
Offline


I love YaBB 2.7!

Posts: 1759
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Re: Substitution replacement not terminated
Reply #1 - Aug 28th, 2014 at 7:59pm
Print Post  
I'll check it as soon as maintenance on my main machine is done - there's also a bit of weirdness with the advanced email check not finding a sub routine it needs.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Monni
Senior Member
****
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Substitution replacement not terminated
Aug 28th, 2014 at 7:24pm
Print Post  
I found this in YaBB's error log:

Quote:

Substitution replacement not terminated at Sources/YaBBC.pm line 42.Compilation failed in require at ./Sources/Subs.pm line 2968.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint