Page Index Toggle Pages: [1] 2 
Topic Tools
Hot Topic (More than 10 Replies) Perl Error: Attempt to free unreferenced scalar (Read 11,094 times)
AndyInSpain
Full Member
***
Offline



Posts: 283
Perl Error: Attempt to free unreferenced scalar
Jun 9th, 2009 at 7:30am
Post Tools
Hello all,

One Three of our members at The Science Forums has reported that they receive the following error when they try to open any threads in any board:

An Error Has Occurred! Attempt to free unreferenced scalar: SV 0xc523c0, Perl interpreter: 0x604010 at ./Sources/ExtendedProfiles.pl line 476

This seems to be a Perl interpreter error rather than a YaBB one, but it does reference ExtendedProfiles.pl

I have dug up the relevant section of code from ExtendedProfiles.pl (line 476 is highlighted):

# make sure the field is visible and the user allowed to view the current field
                 if (($visible == 1) && ($field{'active'} == 1) && (&ext_has_access($users,$groups) == 1)) {
                       if ($displayfieldname == 1) { $displayedfieldname = "$field{'name'}: "; } else { $displayedfieldname = ""; }
                       if ($output eq "") { $output = qq~$ext_spacer_br\n~; }
                       # format the output dependend of the field type
                       if (($field{'type'} eq "text" && $value ne "") ||
                           ($field{'type'} eq "text_multi" && $value ne "") ||
                           $field{'type'} eq "select" ||
                           $field{'type'} eq "radiobuttons" ||
                           ($field{'type'} eq "date" && $value ne "") ||
                           $field{'type'} eq "checkbox") {
                             $output .= qq~$displayedfieldname$value<br />\n~;
                             $previous = "";
                       } elsif ($field{'type'} eq "spacer") {
                             # those tags are required to keep the doc XHTML 1.0 valid
                             if ($previous ne "</small>$value<small>") {
                                   $previous = qq~</small>$value<small>~;
                                   $output .= $previous;
                             }
                       } elsif ($field{'type'} eq "email" && $value ne "") {
                             $output .= $displayedfieldname . &enc_eMail($img_txt{'69'},$value,'','') . qq~<br />\n~;
                             $previous = "";
                       } elsif ($field{'type'} eq "url" && $value ne "") {
                             $output .= qq~$displayedfieldname<a href="$value" target="_blank">$value</a><br />\n~;
                             $previous = "";
                       } elsif ($field{'type'} eq "image" && $value ne "") {
                             $output .= qq~$displayedfieldname$value<br />\n~;
                             $previous = "";
                       }
                 }
           }
     }




Only this one user has reported the error....so far

Does anybody have any ideas what's causing this and how it can be fixed?

The forums are YaBB version 2.4, upgraded. The problem appeared today: the forums have been fine up until now.

Many thanks

Andy.

Edited:
Researching this problem hasn't really turned up anything definitive, but somebody on the web seems to think they know what the cause of the error is:" This is an XS error and should appear if you apply sv_2mortal to a scalar SV more then one time, like sv_2mortal(sv_2mortal(newSViv(0)))." This means nothing to me, but does it to anybody else? Three of our members have now reported this problem, so I would be most grateful for any help.........
« Last Edit: Jun 9th, 2009 at 3:52pm by AndyInSpain »  
Back to top
 
IP Logged
 
deti
Legacy Dev Team
Development Team
****
Offline



Posts: 2,650
Location: Prien am Chiemsee, Germany
Re: Perl Error: Attempt to free unreferenced scalar
Reply #1 - Jun 22nd, 2009 at 6:23pm
Post Tools
Thank you!!!

There is really a bug in this file. Please replace your file with the one in the attached zip and report here. Thanks!
« Last Edit: Jun 30th, 2009 at 3:00pm by deti »  

ExtendedProfiles.zip ( 14 KB | 269 Downloads )

Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
J. W. Goethe
Back to top
WWW  
IP Logged
 
AndyInSpain
Full Member
***
Offline



Posts: 283
Re: Perl Error: Attempt to free unreferenced scalar
Reply #2 - Jun 22nd, 2009 at 6:35pm
Post Tools
Thanks so much Deti! You are very kind.

I have replaced the file, and I am now going to PM the users who experienced the problem to ask them to try opening a thread.

I will let you know very soon.

Kind regards

Andy.

  
Back to top
 
IP Logged
 
AndyInSpain
Full Member
***
Offline



Posts: 283
Re: Perl Error: Attempt to free unreferenced scalar
Reply #3 - Jun 22nd, 2009 at 9:41pm
Post Tools
Sorry Deti........the users are still getting the same error. It seems your new file hasn't made a difference.  Embarrassed

It's odd (to me, anyway!) that only three users are reporting this error. If there were a bug in ExtendedProfiles.pl, I would have expected all users to have the same problem.

Kind regards

Andy.
  
Back to top
 
IP Logged
 
deti
Legacy Dev Team
Development Team
****
Offline



Posts: 2,650
Location: Prien am Chiemsee, Germany
Re: Perl Error: Attempt to free unreferenced scalar
Reply #4 - Jun 24th, 2009 at 5:11pm
Post Tools
Hmmm, can you tell me your "Admin" > "Profile Fields" settings, so I can try to reproduce the error?

Active - Field Name - Field Type      



Limit Length:
     
Rows:

Cols:

Allow UBBC:

Comment:

Required On Registration:

Visible In ViewProfile:
limit to users:      
limit to groups:      

Visible In Posts:
display fieldname:      
limit to users:      
limit to groups:      

Visible In Posts (as popup):
display fieldname:      
limit to users:      
limit to groups:      

Visible In Memberlist:
limit to users:      
limit to groups:      

Editable By User:
  

Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
J. W. Goethe
Back to top
WWW  
IP Logged
 
AndyInSpain
Full Member
***
Offline



Posts: 283
Re: Perl Error: Attempt to free unreferenced scalar
Reply #5 - Jun 24th, 2009 at 7:15pm
Post Tools
Hi Deti,

Here's the information you asked for in the form of three screenshots. I hope this is sufficient for you to replicate the error. Let me know if you need any more information.

And thanks very much for your help.

Kind regards

Andy
  

ProfileFields.jpg ( 257 KB | 322 Downloads )
ProfileFields.jpg
ProfileFields2.jpg ( 197 KB | 338 Downloads )
ProfileFields2.jpg
Back to top
 
IP Logged
 
AndyInSpain
Full Member
***
Offline



Posts: 283
Re: Perl Error: Attempt to free unreferenced scalar
Reply #6 - Jun 24th, 2009 at 7:17pm
Post Tools
...and the third screenshot.
  

ProfileFields3.jpg ( 216 KB | 314 Downloads )
ProfileFields3.jpg
Back to top
 
IP Logged
 
deti
Legacy Dev Team
Development Team
****
Offline



Posts: 2,650
Location: Prien am Chiemsee, Germany
Re: Perl Error: Attempt to free unreferenced scalar
Reply #7 - Jun 24th, 2009 at 7:23pm
Post Tools
AndyInSpain wrote on Jun 24th, 2009 at 7:15pm:
Let me know if you need any more information.

Thanks. At the moment no. I will give a look at it tomorrow evening.
  

Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
J. W. Goethe
Back to top
WWW  
IP Logged
 
deti
Legacy Dev Team
Development Team
****
Offline



Posts: 2,650
Location: Prien am Chiemsee, Germany
Re: Perl Error: Attempt to free unreferenced scalar
Reply #8 - Jun 28th, 2009 at 7:32pm
Post Tools
Hmmmm, I can't reproduce this error. Anyway I updated my zip in post #1 with some code improvements. Please test it on your server again and ask your members for a copy of the error message they get now - if any.
  

Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
J. W. Goethe
Back to top
WWW  
IP Logged
 
AndyInSpain
Full Member
***
Offline



Posts: 283
Re: Perl Error: Attempt to free unreferenced scalar
Reply #9 - Jun 28th, 2009 at 10:08pm
Post Tools
Hi Deti,

No joy I'm afraid. The three affected members are still receiving the same error:

An Error Has Occurred! Attempt to free unreferenced scalar: SV 0xcac280, Perl interpreter: 0x604010 at ./Sources/ExtendedProfiles.pl line 476.


Thanks


Andy.
  
Back to top
 
IP Logged
 
deti
Legacy Dev Team
Development Team
****
Offline



Posts: 2,650
Location: Prien am Chiemsee, Germany
Re: Perl Error: Attempt to free unreferenced scalar
Reply #10 - Jun 29th, 2009 at 12:49pm
Post Tools
Andy, are you absolutely sure you uploaded the right file on the right server/directory?

I ask because the number of the lines have changed in the file and therefore it's nearly impossible that you get exactly the same error message as with the default file in your first post.

AndyInSpain wrote on Jun 9th, 2009 at 7:30am:
An Error Has Occurred! Attempt to free unreferenced scalar: SV 0xc523c0, Perl interpreter: 0x604010 at ./Sources/ExtendedProfiles.pl line 476

AndyInSpain wrote on Jun 28th, 2009 at 10:08pm:
An Error Has Occurred! Attempt to free unreferenced scalar: SV 0xcac280, Perl interpreter: 0x604010 at ./Sources/ExtendedProfiles.pl line 476.

  

Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
J. W. Goethe
Back to top
WWW  
IP Logged
 
AndyInSpain
Full Member
***
Offline



Posts: 283
Re: Perl Error: Attempt to free unreferenced scalar
Reply #11 - Jun 29th, 2009 at 3:17pm
Post Tools
My apologies, Deti. I had copied the right file, but pasted the wrong error message...... Embarrassed

The same three users now get this message....essentially the same one, but with a different line number now.

Quote:
An Error Has Occurred! Attempt to free unreferenced scalar: SV 0xcae7b0, Perl interpreter: 0x604010 at ./Sources/ExtendedProfiles.pl line 471.


No other users have reported problems. How very strange.

Many thanks for your help........much appreciated.

Andy.
  
Back to top
 
IP Logged
 
deti
Legacy Dev Team
Development Team
****
Offline



Posts: 2,650
Location: Prien am Chiemsee, Germany
Re: Perl Error: Attempt to free unreferenced scalar
Reply #12 - Jun 29th, 2009 at 6:30pm
Post Tools
Hmmm, Ok.

Please try the new zip in post #1 and tell me what error message you get now.
  

Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
J. W. Goethe
Back to top
WWW  
IP Logged
 
AndyInSpain
Full Member
***
Offline



Posts: 283
Re: Perl Error: Attempt to free unreferenced scalar
Reply #13 - Jun 30th, 2009 at 7:24am
Post Tools
Deti,

Are you sure you've updated the zip? The file has an older modification date (28/6 21:23) than the previous version (29/6 16:19).

Thanks

Andy.
  
Back to top
 
IP Logged
 
deti
Legacy Dev Team
Development Team
****
Offline



Posts: 2,650
Location: Prien am Chiemsee, Germany
Re: Perl Error: Attempt to free unreferenced scalar
Reply #14 - Jun 30th, 2009 at 11:22am
Post Tools
Yes. I downloaded it right now from here to check what you wrote and for me it shows:

29.06.2009   20:23

Did your browser get it accidentaly from his cache?
  

Was immer Du tun kannst
oder erträumst tun zu können,
beginne es.
Kühnheit besitzt Genie,
Macht und magische Kraft.
Beginne es jetzt.
Whatever you can do
or dream you can,
begin it.
Boldness has genius,
power and magic in it.
Begin it now.
J. W. Goethe
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: [1] 2 
Topic Tools
 
  « Board Index ‹ Board  ^Top