IDE 6.80 crashed due to error in source code

DieterR

Member
Licensed User
Longtime User
My Basic4ppc IDE crashed when I tried to run the following erronous source code in the debug mode. (I was asked to report the bug to Microsoft, but I did not.)
The compiler (optimized comilation for Windows EXE or Device) ignored the problem, but the generated EXE crashed too when the faulty defined NumUpDown was tried to be used.

Here the important source code lines:
---------------------------------------------
Source File:
Version=6.80
:
addnum(paneldate,Num22,160,155,60,0,100,255,255,255,True,True)@
:
---------------------------------------------
Source Code:
Sub App_Start
:

Table4.AddCol (cString, "Name", 50)
:
Defaults
:
End Sub
:
:
Sub Defaults
:
Num22.Maximum=Table4.RowCount 'Problem: RowCount is 0 or unknown at the time when the program starts !?
Num22.Value=Table4.RowCount-1
:
End Sub
---------------------------------------------

I solved the problem, but the IDE should not crash in case of coding errors:sign0148:.

Further infos: Basic4ppc IDE Version 6.8, Win XP SP3, .NET Version: 2.0.50727.3603, the size of my source code is about 350 kByte, 3 modules, the compiled EXE is about 900 kByte.

Best regards
DieterR
 

DieterR

Member
Licensed User
Longtime User
Sorry agraham,

today, I spend some time to reproduce the crash, but I can't.:(
Now, in debug run or the compiler always the same error message as you have seen is reported:

"An error ocurred on sub_main_defaults"
~" -1 is invalid for Value, ...should be between 'Min..' and 'Max..' ..."

It is unbelievable! A few days ago the crash repeated any time after I had restarted the B4P IDE. But I didn't restart Windows (and .NET). :confused:

I solved the problem by moving the 2 lines in a sub that is executed when the panel containing 'num22' becomes visible and table4 is surely loaded (.RowCount > 0).

Thank You
DieterR
 
Top