TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,972
  • Latest: Lineo
Stats
  • Total Posts: 196,165
  • Total Topics: 21,346
  • Online today: 678
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 494
  • Total: 494

Stack Overflow and Memory Error Messages - can't fix

Started by oneway, July 05, 2006, 10:31:45 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

oneway

I should have known you'd be watching G6, thankyou. :) You're very faithful. (I don't feel lonely any more!) :up:

Quote from: eeek on July 11, 2006, 07:54:38 PM
Im watching :)

Now this may be nothing to do with anything..Just browsing from me laptop with visual studio on it..went to your site and got the error with the option to debug :)

If I open the page in Visual Studio it tries to debug /Themes/default/script.js

and points to a function called -> window_oldAvatarOnload();

find it here
Quoteif (typeof(window_oldAvatarOnload) != "undefined" && window_oldAvatarOnload)
   {
      window_oldAvatarOnload();
      window_oldAvatarOnload = null;
   }

No idea what it means  :o other than have you done anything to Avatars? or got any strange ones?

Thanks eeek. (Ditto to above!)

No, I haven't been near script.js. Wouldn't be game! I don't have any strange Avatars. I have changed an Avatar. And I did enlarge the size of Avatars in a file somewhere, so I better have a look for this to see where I did it, and what - just in case script.js wasn't happy about that...


oneway

Quote from: eeekNow this may be nothing to do with anything..Just browsing from me laptop with visual studio on it..went to your site and got the error with the option to debug :)

If I open the page in Visual Studio it tries to debug /Themes/default/script.js

and points to a function called -> window_oldAvatarOnload();

find it here
Quoteif (typeof(window_oldAvatarOnload) != "undefined" && window_oldAvatarOnload)
   {
      window_oldAvatarOnload();
      window_oldAvatarOnload = null;
   }

No idea what it means  :o other than have you done anything to Avatars? or got any strange ones?

Guys at SMF have commented on this debugging. I basically understand nothing of this, eeek, so I always bow to superior knowledge - from whatever source! Anyway, for what it's worth, here's what they said:

Quote: "I don't use Windows myself, but I think the 'option to debug' stuff popping up is a bi-product of installing the Visual Studio Developer Tools, nothing actually to do with your site's code as such."

Quote: "Correct. If you have Visual Studio installed, it adds itself as a system debugger. When something crashes, and you choose to debug, it will open up (or if you have multiple system debuggers, you'll get a list of which one to choose)."

eeek

QuoteI basically understand nothing of this,

That'll make 2 of us then :)

I know how it works with normal programming but I suspected it would be of no good.  Just though it might be a pointer to something you had changed.

If you aint found it yet, I try comparing your files with known good ones. Id use UltraEdit (becasuse I have it) but there are other "file compare" apps. Other than that Im kinda out of suggestions. 

oneway

#33
Quote from: eeekIf you aint found it yet, I try comparing your files with known good ones. Id use UltraEdit (becasuse I have it) but there are other "file compare" apps. Other than that Im kinda out of suggestions.

Your suggestions, help, and just 'being here' have been wonderful, eeek, thankyou so much!

Goodness, I had NOT thought of a file compare program (should have, but hadn't). What a fabbo idea. I am chasing this up as I'm speaking - well, writing! :D So you've made a suggestion that's gonna help so much, and get me going on that problem so much easier than I was expecting.

BTW I just love your username - it's a classic!

oneway

GOT IT!!

Rejoice with me, please! Almost a week and a half with a website down is pretty drastic.

I would not have got it without God's help nor without eeek writing as he did that Visual Studio had given him the need to debug this on my pages:

if (typeof(window_oldAvatarOnload) != "undefined" && window_oldAvatarOnload)
   {
      window_oldAvatarOnload();
      window_oldAvatarOnload = null;
   }


And he asked if I'd done anything with Avatars. That was the necessary clue! (Next time eeek I'll head straight for you, okay, and I will take notice of what Visual Studio says!!)

Tonight, near the top of my pages (SMF 1.1RC2 and TP 0.86) code concerning avatars suddenly caught my eye. Even more interesting was that it was within script coding.

So in TP pages near the top, straight after RSS and above leftbar upshrinking as you can see... were just a few lines of apparently innocuous Javascript (the first 6 below):

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_avatarMaxWidth = 86;
var smf_avatarMaxHeight = 86;
var window_oldAvatarOnload = window.onload;
window.onload = smf_avatarResize;
// ]]></script>

        <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[

                var current_leftbar = false;



                function shrinkHeaderLeftbar(mode)

                {

                        smf_setThemeOption("collapse_leftbar", mode ? 1 : 0);

                        document.getElementById("upshrinkLeftbar").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");


You'll note 'avatarMaxWidth = 86'. As I said to eeek I had increased the size that Avatars can be. If I hadn't changed this, there would have been no code in the pages to do it! - and no problem. However this still wouldn't normally have caused any problem. But under Forum, Attachments and Avatars, Avatar Settings, If the avatar is too large...

are setting options like 'Let the HTML resize it' (the default I think) AND THE PROBLEM ONE: 'Resize it with Javascript' which I happened to use thinking how good JS is at manipulating graphics!

That's what did it!!! It was JS as clever people had worked out. And above is the almost unbelievable line of circumstances that led to my website being quite unusable for all this time. As I'm a total novice with JS I can't say whether there's an error there or not but I presume there must be something. In any case big thanks to everyone and especially you eeek, and...

I HAVE MY WEBSITE/FORUM BACK! Yee-har!!!  :) ;) :D ;D 8)

EDIT. I hope I'll be forgiven for 'shouting'. You should have heard me here when suddenly all my pages were working again! And G6, you can guide me about whether this should be mentioned to Bloc? (Just that I'd hate anyone else to go through what I just have. I've literally chased all round the world trying to find an answer - and just about decided Forums are too, too difficult to manage...)

IchBin

WOOHOO!!! Congrats on finding that POS problem. I can only imagine how good it feels to have squashed that bug. Please, feel free to shout all you want!

eeek

Glad its fix, well done on tracking it down. ;D  :up: :up:


oneway

Quote from: IchBinâââ,¬Å¾Ã,¢WOOHOO!!! Congrats on finding that POS problem. I can only imagine how good it feels to have squashed that bug. Please, feel free to shout all you want!

Wow IchBin, 'squashed that bug' is a great way to put it! ;D Yeah, I guess I did hey (with help). The 'never give up' approach works good though, as I know you know. What is POS? *being dense* All I can think of is Point of Sale??!!

Quote from: eeekGlad its fix, well done on tracking it down. Grin  thumbsup! thumbsup!

Thanks eeek! I'm still feeling pretty chuffed that I'm not totally hopeless with this complicated stuff that sometimes blows my brain... :P


oneway

Like I said, being dense. Tch, tch, and here's me thinking I was going to learn some fandangulous new computer term!

This website is proudly hosted on Crocweb Cloud Website Hosting.