Home » Language IDEs » Java Development Tools (JDT) » Suspected Debugger bug
Suspected Debugger bug [message #93634] |
Tue, 09 September 2003 17:21  |
Eclipse User |
|
|
|
Hi -
I am encountering something which I can only guess is a problem with the
debugger and is rather bizarre. I have an abstract base class with some
static member fields and a few methods. I am attempting to set a
breakpoint in one of these methods, and monitor the value of the class
fields within the variables window in the debug view. When I reach a
breakpoint, I then attempt to single step through my code using the Step
Over and Step Into buttons. What I am seeing happen is very strange, it
is as if there is a second mysterious thread starting up and executing
my code. This second thread seems to also stop at the breakpoint, but
when I hit the step over or into button, it acts as if this second
thread is released an allowed to run freely, which it apparently does
until it hits my breakpoint again.
I know this is difficult to follow, so let me explain why I think this
is happening. I embedded a series of System.out.println statements in
the method I am trying to debug. When I hit the step over button, to
execute a single line of code within the method, I will suddenly see
ALL the output from ALL of the println statements, (and all of the rest
of the code within the method gets executed somehow) while the thread I
am debugging only proceeds for the single step. The stack view ONLY
shows a single thread hitting my breakpoint and stopping there, but as I
explained, each time I do a single step, the behavior is as if a second
thread is released and can resume running... I have attempted to catch
this second thread by using a synchronized object to surround my method
and that is not affecting this behavior.
Now for the kicker, this seems to be related to the usage of the
variable view window in the debugger. IF I do not touch anything in this
window, such as opening up a field to view its internal components, this
behavior DOES NOT occur. However it I do open up anything, then this
mysterious second thread seems to start up, runs and proceeds to my next
breakpoint. Furthermore, when I simply click on some of the fields to
open them up for viewing, this mysterious thread will be released from a
breakpoint, and will continue to run again!!! I have demonstrated this
again by simply seeing all of my println statements appear each time I
JUST open and close some of the fields within this variable view window,
so the problem is NOT confined simply to the Step Over and Step Into
buttons.
Because I am setting some static fields, this second mysterious thread
is breaking my program, and I am not starting any threads other than
things like an event handling thread for my GUI. I have double checked
and double checked to make sure it is not any of my applications other
threads which are running, as this mysterious thread. I KNOW this is
bizarre and not normal behavior of a program, but I strongly suspect
there is something going on with the debugger and within the VM to cause
this....
Has anyone got any ideas for me to try or pursue? I am certainly stumped
now! I am running Version 2.1.1 of Eclipse and using the Java JRE
version 1.4.1_02 Thanks for any help offered....
Marc Chamberlin
|
|
|
Re: Suspected Debugger bug [message #93651 is a reply to message #93634] |
Tue, 09 September 2003 17:30   |
Eclipse User |
|
|
|
I would start by looking at:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=8441
Then try moving to a newer 1.4.1 VM or trying a 1.4.2 VM.
HTH
Darins
"Marc Chamberlin" <marcc@easystreet.com> wrote in message
news:3F5E4463.1000002@easystreet.com...
> Hi -
>
> I am encountering something which I can only guess is a problem with the
> debugger and is rather bizarre. I have an abstract base class with some
> static member fields and a few methods. I am attempting to set a
> breakpoint in one of these methods, and monitor the value of the class
> fields within the variables window in the debug view. When I reach a
> breakpoint, I then attempt to single step through my code using the Step
> Over and Step Into buttons. What I am seeing happen is very strange, it
> is as if there is a second mysterious thread starting up and executing
> my code. This second thread seems to also stop at the breakpoint, but
> when I hit the step over or into button, it acts as if this second
> thread is released an allowed to run freely, which it apparently does
> until it hits my breakpoint again.
>
> I know this is difficult to follow, so let me explain why I think this
> is happening. I embedded a series of System.out.println statements in
> the method I am trying to debug. When I hit the step over button, to
> execute a single line of code within the method, I will suddenly see
> ALL the output from ALL of the println statements, (and all of the rest
> of the code within the method gets executed somehow) while the thread I
> am debugging only proceeds for the single step. The stack view ONLY
> shows a single thread hitting my breakpoint and stopping there, but as I
> explained, each time I do a single step, the behavior is as if a second
> thread is released and can resume running... I have attempted to catch
> this second thread by using a synchronized object to surround my method
> and that is not affecting this behavior.
>
> Now for the kicker, this seems to be related to the usage of the
> variable view window in the debugger. IF I do not touch anything in this
> window, such as opening up a field to view its internal components, this
> behavior DOES NOT occur. However it I do open up anything, then this
> mysterious second thread seems to start up, runs and proceeds to my next
> breakpoint. Furthermore, when I simply click on some of the fields to
> open them up for viewing, this mysterious thread will be released from a
> breakpoint, and will continue to run again!!! I have demonstrated this
> again by simply seeing all of my println statements appear each time I
> JUST open and close some of the fields within this variable view window,
> so the problem is NOT confined simply to the Step Over and Step Into
> buttons.
>
> Because I am setting some static fields, this second mysterious thread
> is breaking my program, and I am not starting any threads other than
> things like an event handling thread for my GUI. I have double checked
> and double checked to make sure it is not any of my applications other
> threads which are running, as this mysterious thread. I KNOW this is
> bizarre and not normal behavior of a program, but I strongly suspect
> there is something going on with the debugger and within the VM to cause
> this....
>
> Has anyone got any ideas for me to try or pursue? I am certainly stumped
> now! I am running Version 2.1.1 of Eclipse and using the Java JRE
> version 1.4.1_02 Thanks for any help offered....
>
> Marc Chamberlin
>
>
>
|
|
|
Re: Suspected Debugger bug [message #93738 is a reply to message #93651] |
Tue, 09 September 2003 18:56   |
Eclipse User |
|
|
|
Thanks Darin for your suggestions.. But I am afraid it was not the
answer. I upgraded to the 1.4.2 VM, and that did not help. I looked at
the bug report you suggested, and while it is somewhat similar, I can't
say definitively that it is the same bug. As I pointed out, the problem
is also occurring simply when I click on a field variable shown in the
variable view window....
Marc Chamberlin..
Darin Swanson wrote:
> I would start by looking at:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=8441
> Then try moving to a newer 1.4.1 VM or trying a 1.4.2 VM.
>
> HTH
> Darins
>
> "Marc Chamberlin" <marcc@easystreet.com> wrote in message
> news:3F5E4463.1000002@easystreet.com...
>
>>Hi -
>>
>>I am encountering something which I can only guess is a problem with the
>>debugger and is rather bizarre. I have an abstract base class with some
>>static member fields and a few methods. I am attempting to set a
>>breakpoint in one of these methods, and monitor the value of the class
>>fields within the variables window in the debug view. When I reach a
>>breakpoint, I then attempt to single step through my code using the Step
>>Over and Step Into buttons. What I am seeing happen is very strange, it
>>is as if there is a second mysterious thread starting up and executing
>>my code. This second thread seems to also stop at the breakpoint, but
>>when I hit the step over or into button, it acts as if this second
>>thread is released an allowed to run freely, which it apparently does
>>until it hits my breakpoint again.
>>
>>I know this is difficult to follow, so let me explain why I think this
>>is happening. I embedded a series of System.out.println statements in
>>the method I am trying to debug. When I hit the step over button, to
>>execute a single line of code within the method, I will suddenly see
>>ALL the output from ALL of the println statements, (and all of the rest
>>of the code within the method gets executed somehow) while the thread I
>>am debugging only proceeds for the single step. The stack view ONLY
>>shows a single thread hitting my breakpoint and stopping there, but as I
>>explained, each time I do a single step, the behavior is as if a second
>>thread is released and can resume running... I have attempted to catch
>>this second thread by using a synchronized object to surround my method
>>and that is not affecting this behavior.
>>
>>Now for the kicker, this seems to be related to the usage of the
>>variable view window in the debugger. IF I do not touch anything in this
>>window, such as opening up a field to view its internal components, this
>>behavior DOES NOT occur. However it I do open up anything, then this
>>mysterious second thread seems to start up, runs and proceeds to my next
>>breakpoint. Furthermore, when I simply click on some of the fields to
>>open them up for viewing, this mysterious thread will be released from a
>>breakpoint, and will continue to run again!!! I have demonstrated this
>>again by simply seeing all of my println statements appear each time I
>>JUST open and close some of the fields within this variable view window,
>>so the problem is NOT confined simply to the Step Over and Step Into
>>buttons.
>>
>>Because I am setting some static fields, this second mysterious thread
>>is breaking my program, and I am not starting any threads other than
>>things like an event handling thread for my GUI. I have double checked
>>and double checked to make sure it is not any of my applications other
>>threads which are running, as this mysterious thread. I KNOW this is
>>bizarre and not normal behavior of a program, but I strongly suspect
>>there is something going on with the debugger and within the VM to cause
>>this....
>>
>>Has anyone got any ideas for me to try or pursue? I am certainly stumped
>>now! I am running Version 2.1.1 of Eclipse and using the Java JRE
>>version 1.4.1_02 Thanks for any help offered....
>>
>> Marc Chamberlin
>>
>>
>>
>
>
>
|
|
|
Re: Suspected Debugger bug [message #93768 is a reply to message #93738] |
Tue, 09 September 2003 19:17   |
Eclipse User |
|
|
|
Marc,
Can you please log a bug report against JDT Debug with your reproducible
test case and we will have a closer look
Thanks
Darins
"Marc Chamberlin" <marcc@easystreet.com> wrote in message
news:3F5E5A89.6070108@easystreet.com...
> Thanks Darin for your suggestions.. But I am afraid it was not the
> answer. I upgraded to the 1.4.2 VM, and that did not help. I looked at
> the bug report you suggested, and while it is somewhat similar, I can't
> say definitively that it is the same bug. As I pointed out, the problem
> is also occurring simply when I click on a field variable shown in the
> variable view window....
>
> Marc Chamberlin..
>
>
>
> Darin Swanson wrote:
> > I would start by looking at:
> > https://bugs.eclipse.org/bugs/show_bug.cgi?id=8441
> > Then try moving to a newer 1.4.1 VM or trying a 1.4.2 VM.
> >
> > HTH
> > Darins
> >
> > "Marc Chamberlin" <marcc@easystreet.com> wrote in message
> > news:3F5E4463.1000002@easystreet.com...
> >
> >>Hi -
> >>
> >>I am encountering something which I can only guess is a problem with the
> >>debugger and is rather bizarre. I have an abstract base class with some
> >>static member fields and a few methods. I am attempting to set a
> >>breakpoint in one of these methods, and monitor the value of the class
> >>fields within the variables window in the debug view. When I reach a
> >>breakpoint, I then attempt to single step through my code using the Step
> >>Over and Step Into buttons. What I am seeing happen is very strange, it
> >>is as if there is a second mysterious thread starting up and executing
> >>my code. This second thread seems to also stop at the breakpoint, but
> >>when I hit the step over or into button, it acts as if this second
> >>thread is released an allowed to run freely, which it apparently does
> >>until it hits my breakpoint again.
> >>
> >>I know this is difficult to follow, so let me explain why I think this
> >>is happening. I embedded a series of System.out.println statements in
> >>the method I am trying to debug. When I hit the step over button, to
> >>execute a single line of code within the method, I will suddenly see
> >>ALL the output from ALL of the println statements, (and all of the rest
> >>of the code within the method gets executed somehow) while the thread I
> >>am debugging only proceeds for the single step. The stack view ONLY
> >>shows a single thread hitting my breakpoint and stopping there, but as I
> >>explained, each time I do a single step, the behavior is as if a second
> >>thread is released and can resume running... I have attempted to catch
> >>this second thread by using a synchronized object to surround my method
> >>and that is not affecting this behavior.
> >>
> >>Now for the kicker, this seems to be related to the usage of the
> >>variable view window in the debugger. IF I do not touch anything in this
> >>window, such as opening up a field to view its internal components, this
> >>behavior DOES NOT occur. However it I do open up anything, then this
> >>mysterious second thread seems to start up, runs and proceeds to my next
> >>breakpoint. Furthermore, when I simply click on some of the fields to
> >>open them up for viewing, this mysterious thread will be released from a
> >>breakpoint, and will continue to run again!!! I have demonstrated this
> >>again by simply seeing all of my println statements appear each time I
> >>JUST open and close some of the fields within this variable view window,
> >>so the problem is NOT confined simply to the Step Over and Step Into
> >>buttons.
> >>
> >>Because I am setting some static fields, this second mysterious thread
> >>is breaking my program, and I am not starting any threads other than
> >>things like an event handling thread for my GUI. I have double checked
> >>and double checked to make sure it is not any of my applications other
> >>threads which are running, as this mysterious thread. I KNOW this is
> >>bizarre and not normal behavior of a program, but I strongly suspect
> >>there is something going on with the debugger and within the VM to cause
> >>this....
> >>
> >>Has anyone got any ideas for me to try or pursue? I am certainly stumped
> >>now! I am running Version 2.1.1 of Eclipse and using the Java JRE
> >>version 1.4.1_02 Thanks for any help offered....
> >>
> >> Marc Chamberlin
> >>
> >>
> >>
> >
> >
> >
>
|
|
|
Re: Suspected Debugger bug [message #93958 is a reply to message #93634] |
Wed, 10 September 2003 09:51  |
Eclipse User |
|
|
|
When a variable is selected in the variable view, and the detail pane is
visible, the debugger performs an evaluation of 'toString()' on the selected
variable. This actually resumes the thread you see in the debug view to
perform the evaluation. We "hide" this thread resume/suspend from the user.
Could this be what you are seeing?
Darin Wright
"Marc Chamberlin" <marcc@easystreet.com> wrote in message
news:3F5E4463.1000002@easystreet.com...
> Hi -
>
> I am encountering something which I can only guess is a problem with the
> debugger and is rather bizarre. I have an abstract base class with some
> static member fields and a few methods. I am attempting to set a
> breakpoint in one of these methods, and monitor the value of the class
> fields within the variables window in the debug view. When I reach a
> breakpoint, I then attempt to single step through my code using the Step
> Over and Step Into buttons. What I am seeing happen is very strange, it
> is as if there is a second mysterious thread starting up and executing
> my code. This second thread seems to also stop at the breakpoint, but
> when I hit the step over or into button, it acts as if this second
> thread is released an allowed to run freely, which it apparently does
> until it hits my breakpoint again.
>
> I know this is difficult to follow, so let me explain why I think this
> is happening. I embedded a series of System.out.println statements in
> the method I am trying to debug. When I hit the step over button, to
> execute a single line of code within the method, I will suddenly see
> ALL the output from ALL of the println statements, (and all of the rest
> of the code within the method gets executed somehow) while the thread I
> am debugging only proceeds for the single step. The stack view ONLY
> shows a single thread hitting my breakpoint and stopping there, but as I
> explained, each time I do a single step, the behavior is as if a second
> thread is released and can resume running... I have attempted to catch
> this second thread by using a synchronized object to surround my method
> and that is not affecting this behavior.
>
> Now for the kicker, this seems to be related to the usage of the
> variable view window in the debugger. IF I do not touch anything in this
> window, such as opening up a field to view its internal components, this
> behavior DOES NOT occur. However it I do open up anything, then this
> mysterious second thread seems to start up, runs and proceeds to my next
> breakpoint. Furthermore, when I simply click on some of the fields to
> open them up for viewing, this mysterious thread will be released from a
> breakpoint, and will continue to run again!!! I have demonstrated this
> again by simply seeing all of my println statements appear each time I
> JUST open and close some of the fields within this variable view window,
> so the problem is NOT confined simply to the Step Over and Step Into
> buttons.
>
> Because I am setting some static fields, this second mysterious thread
> is breaking my program, and I am not starting any threads other than
> things like an event handling thread for my GUI. I have double checked
> and double checked to make sure it is not any of my applications other
> threads which are running, as this mysterious thread. I KNOW this is
> bizarre and not normal behavior of a program, but I strongly suspect
> there is something going on with the debugger and within the VM to cause
> this....
>
> Has anyone got any ideas for me to try or pursue? I am certainly stumped
> now! I am running Version 2.1.1 of Eclipse and using the Java JRE
> version 1.4.1_02 Thanks for any help offered....
>
> Marc Chamberlin
>
>
>
|
|
|
Goto Forum:
Current Time: Fri Jun 06 09:47:15 EDT 2025
Powered by FUDForum. Page generated in 0.07611 seconds
|