SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    38911 Basic Bytes Free johnuk's Avatar
    Join Date
    Jul 2008
    Location
    Somerset, England
    Posts
    458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    FF 3.6 + Firebug Enabled = errors

    Hey guys,

    Just a quick query. I have written a large web application which has been through unit testing on all major browsers.

    This morning I built my new PC, and Installed the latest version of FF and Firebug. For some reason when firebug is enabled one of my Javascripts fails at various points. If I disabled Firebug all is well.

    No problems in all other broswers, and really no problem in FF unless firebug is enabled. This was never a problem before, ive had firebug open for months prior to the new build.

    I was just wondering if anyone has experienced the same?

    Many thanks

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have experienced bugs in firebug, which always reminds me that using it must change things. Having it enabled simply has to alter the browser environment and behavior a tiny bit.

    I wouldn't be surprised if the broken code relies on time for correctness. Or maybe relied upon something unsuitable for synchronization or mutex purposes. Then again, you could say it was never really correct in the first place.

  3. #3
    38911 Basic Bytes Free johnuk's Avatar
    Join Date
    Jul 2008
    Location
    Somerset, England
    Posts
    458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi thanks for your reply.

    I have decided to warn my users to disable Firebug (a bit like Google mail does). But I cant help but wonder if its something ive done wrong still.

  4. #4
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your code is probably faulty. I say this because it's far more likely than a bug in the browser or firebug.

    You could do some debugging and find out what part of the code works unexpectedly.

  5. #5
    38911 Basic Bytes Free johnuk's Avatar
    Join Date
    Jul 2008
    Location
    Somerset, England
    Posts
    458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please explain why my code is faulty when it works fine in every single browser?

  6. #6
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Observing correct behavior in limited scenarios doesn't prove code to be correct.

    Anyway...it shouldn't take you very long to debug the code and find out what the problem is. Not much sense guessing about it.

  7. #7
    38911 Basic Bytes Free johnuk's Avatar
    Join Date
    Jul 2008
    Location
    Somerset, England
    Posts
    458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I really appreciate the input.

    I have stepped through things this morning, and it appears that the problem arises when Ajax get requests are made.

    Specifically it looks as if one click results in the call being made twice inclose succession (with firebug enabled only).

    Then instead of the javascript being evaluated (as it usually does), it gets spat out on screen. Thoughts welcome

  8. #8
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Since you have reason to believe the click event(or the code to handle the event) is sometimes firing more often than intended, I would examine that area a little closer. It's possible that it's happening whether firebug is enabled or not, but your current method of testing/examining doesn't reveal it, and the effect of it doesn't quite manifest itself all the way to the broken output.

    With that said, a lot of bugs I've seen in programs that use ajax are due to reliance on time, and using global variables(or variable who just have too large of a scope).

  9. #9
    38911 Basic Bytes Free johnuk's Avatar
    Join Date
    Jul 2008
    Location
    Somerset, England
    Posts
    458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey crmalibu,

    glad you replied. I was going to let you know how my debugging went. I had a think about the time issues you mentioned.

    I set - setTimeout("myAjaxCallHere()", 200); On the Ajax calls in question, and that immediatly corrected the problems

    There are no double calls, and everything appears to excute correctly regardless of firebug being enabled.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •