Bug? strange behavior of the debugger in B4A Ver. 5.5 (bug?)

PCastagnetti

Member
Licensed User
Longtime User
after upgrading to the new version, sometimes it happens that the value of some variable is changed automatically (reset).
The activity that has the problem consists of over 20,000 lines of code.
For now I'm back to the version 5.20




Thank you
 
Last edited:

PCastagnetti

Member
Licensed User
Longtime User
Hi Erel
Thanks for the reply

With version 5.20 using the rapid debugger, the problem does not occur.

I try to give some element for the research of the problem.

* The variable is declared in Sub Globals
Dim MyVariable As Long

* The first value is assigned to the variable in this way:
MyVariable = SubTest (Subtest is declared in this way : Sub SubTest As Long)
SubTest consists of 800 lines of code



Now begins a processing (SubTest2) which can last even two seconds before the variable is read.
At the end of the routine, the variable not has the value assigned previously.
I realized this morning that putting a breakpoint in the routine Subtest2 the problem does not occur.

The problem occurs with or without the attribute #DebuggerDisableOptimizations


Thank you
 
Last edited:

PCastagnetti

Member
Licensed User
Longtime User
After more tests done today, I found that
by setting the attribute '#DebuggerDisableOptimizations: True' the problem is resolved.


Omitting this attribute (or setting it to False) the problem disappears only reducing the number of lines of code.

I consider my problem solved by setting the attribute to true.

thank you
 
Top