Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Broken if statements.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Freman  
View profile  
 More options Jul 21 2008, 10:03 pm
From: Freman <fre...@gmail.com>
Date: Mon, 21 Jul 2008 19:03:23 -0700 (PDT)
Local: Mon, Jul 21 2008 10:03 pm
Subject: Broken if statements.
G'day there.

I've managed to reproduce a bug that I've been having while debugging
with 1.2.0b6 in Firefox 3.0 on Linux (I admit to having not tried it
on Windows)

Code: http://pastebin.com/f3c17e463
Live: http://www.users.on.net/~freman/firebug-test.html

When run with script debugger and console enabled, and click on
testBug(), it works fine.

However, when you place a breakpoint on line 16 it fails (strings do
not match)
To further isolate the bug, I built the object a different way -
noBugHere(), if you place a breakpoint on line 31, it does not fail.

Can anyone confirm this bug?

Or is it just me?

Application: Firefox 3.0 (2008060309)
Operating System: Linux (x86-gcc3)

- Adblock Filterset.G Updater 0.3.1.3
- Adblock Plus 0.7.5.5
- CustomizeGoogle 0.72
- Delicious Bookmarks 2.0.72
- EditCSS 0.3.7
- Extension List Dumper 1.14.1
- Firebug 1.2.0b6
- Google Notebook 1.0.0.20
- Google Web Comments 1.4.20070529.0
        (Disabled, Incompatible)
- Greasemonkey 0.8.20080609.0
- HttpFox 0.8.2
- iMacros for Firefox 6.0.5.4
        (Disabled)
- It's All Text! 0.8.5
- Line Marker 2.0.2008040702
        (Disabled)
- Live HTTP headers 0.14
- MeasureIt 0.3.8
- NoScript 1.7.7
- SQLite Manager 0.3.4
- Tamper Data 10.0.4
- Ubuntu Firefox Modifications 0.5
- Vimperator 1.1
        (Disabled)
- Xdebug Helper 0.3
- YSlow 0.9.5b2
        (Disabled)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Freman  
View profile  
 More options Jul 22 2008, 12:51 am
From: Freman <fre...@gmail.com>
Date: Mon, 21 Jul 2008 21:51:54 -0700 (PDT)
Local: Tues, Jul 22 2008 12:51 am
Subject: Re: Broken if statements.
Ok, a little more testing and I can confirm that it's also a problem
in Firefox/Visa (for me)

Any one else?

Application: Firefox 3.0 (2008052906)
Operating System: WINNT (x86-msvc)

- Adblock Plus 0.7.5.5
- Bookmark Permissions 08.05.19.02
- ColorZilla 2.0
- CustomizeGoogle 0.72
- Delicious Bookmarks 2.0.72
- Extension List Dumper 1.14.1
- Firebug 1.2.0b6
- Flash Video Resources Downloader 1.0.1
- Google Browser Sync 1.3.20070523.0
        (Disabled, Incompatible)
- Google Notebook 1.0.0.20
- Greasemonkey 0.8.20080609.0
- gui:config 0.3.7
- Header Spy 1.3.2.2
- Java Console 6.0.01
- Live HTTP Headers 0.14
- Minimize To Tray Enhancer 0.7.5.3
- MinimizeToTray 0.0.1.2006102615+
        (Disabled, Incompatible)
- Sage 1.4.2
- User Agent Switcher 0.6.11
- Validaty 1.4.1
- VeriSign's OpenID SeatBelt 1.0.0.3623


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John J Barton  
View profile  
 More options Jul 22 2008, 1:07 am
From: John J Barton <johnjbar...@johnjbarton.com>
Date: Mon, 21 Jul 2008 22:07:14 -0700 (PDT)
Local: Tues, Jul 22 2008 1:07 am
Subject: Re: Broken if statements.
I do get different results depending on whether the debugger breaks or
not. That can't be a good thing.

If I break at line 16 and put
aObject.aString === "Hello World"
in the Watch expression it says "true". It continues to say true when
I single step.

If I set a breakpoint on 19, stop at 16, then Go, I break at 19 with
"true".

This suggests that the test is ok, but the control flow is broken. Can
you try it with more lines of code in the if /else blocks?

John.

On Jul 21, 7:03 pm, Freman <fre...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Freman  
View profile  
 More options Jul 23 2008, 6:21 pm
From: Freman <fre...@gmail.com>
Date: Wed, 23 Jul 2008 15:21:18 -0700 (PDT)
Local: Wed, Jul 23 2008 6:21 pm
Subject: Re: Broken if statements.
I have expanded my test to further test equality.

Code: http://pastebin.com/f441a494a
Live: http://www.users.on.net/~freman/firebug-test.html

A break on line 16 still results in a true test.
A break on line 17 results in a false test while line 22 still returns
true.

Is this about the time I make an official bug report?

On Jul 22, 3:07 pm, John J Barton <johnjbar...@johnjbarton.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Freman  
View profile  
 More options Jul 23 2008, 6:34 pm
From: Freman <fre...@gmail.com>
Date: Wed, 23 Jul 2008 15:34:30 -0700 (PDT)
Local: Wed, Jul 23 2008 6:34 pm
Subject: Re: Broken if statements.
Further to the test above, I've just tried something different.

I negated the if statement by changing line 17 to
if (aObject.aString !== "Hello World") {

Now by placing a breakpoint at line 17 it goes into the if statement
while it should be jumping to else

This shows that the break points are completely inverting the result
of if statements.

On Jul 24, 8:21 am, Freman <fre...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Freman  
View profile  
 More options Jul 23 2008, 6:45 pm
From: Freman <fre...@gmail.com>
Date: Wed, 23 Jul 2008 15:45:20 -0700 (PDT)
Local: Wed, Jul 23 2008 6:45 pm
Subject: Re: Broken if statements.
Here is a new test that contains all the checks I've done so far
http://pastebin.com/f398032e8
http://www.users.on.net/~freman/firebug-test3.html (The link for the
one above is supposed to be http://www.users.on.net/~freman/firebug-test2.html
but this file contains that test now anyway)

Note for the noBugHere() test, the only difference is that the object
is created in the function and not passed to the function...

You should be able to completely negate the output of if by breaking
on lines 18 and 26.

On Jul 24, 8:34 am, Freman <fre...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John J Barton  
View profile  
 More options Jul 24 2008, 1:28 am
From: John J Barton <johnjbar...@johnjbarton.com>
Date: Wed, 23 Jul 2008 22:28:58 -0700 (PDT)
Local: Thurs, Jul 24 2008 1:28 am
Subject: Re: Broken if statements.
Please post your example to http://code.google.com/p/fbug/issues/list.
Ideally add your comments above the buttons (and make them buttons so
we don't have to guess ;-).  Then we'll take this up with Firefox
folks.  My guess now, based on your excellent bug/noBug isolation is a
problem caused by FF3 security mechanism but I'm just guessing...

On Jul 23, 3:45 pm, Freman <fre...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rako  
View profile  
 More options Jul 24 2008, 4:53 am
From: Rako <mscam...@rakovszky.info>
Date: Thu, 24 Jul 2008 01:53:55 -0700 (PDT)
Local: Thurs, Jul 24 2008 4:53 am
Subject: Re: Broken if statements.
In my experience, it is just the line-indicator that is playing up!
In many "if" statements, if the result is false, the indicator jumps
to the last of the statements of depending on the if-condition.

Try to have a function-call as the last statment and step-through. You
will find, that the function is NOT called.
The "current-statement"-indicator seems to have a life of its own.
It is shown on lines never stepped through, etc.

On Jul 24, 12:45 am, Freman <fre...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John J Barton  
View profile  
 More options Jul 25 2008, 12:31 am
From: John J Barton <johnjbar...@johnjbarton.com>
Date: Thu, 24 Jul 2008 21:31:34 -0700 (PDT)
Local: Fri, Jul 25 2008 12:31 am
Subject: Re: Broken if statements.
Except that the test case shows, by print statements, that the
debugger changes the output.

On Jul 24, 1:53 am, Rako <mscam...@rakovszky.info> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »