I've managed to pin down the heisenslug. It would seem that it was present in version 6.8, but to a much lesser extent, as you can see in the attached graph. My problem numbering will carry on from my first bug post.
Problem 3: DBPro's timers (the standard "Timer" command, the "Get Time$" command and "PerfTimer") fail to return correct values for the duration of the loading of many objects.
Problem Type: Heisenslug
Details: Compile and run the code below. You will need to use a stopwatch to time how long it takes to load a large number of objects because, as you should see, DBPro's timers do not provide an accurate result (hence why this is a heisenslug and not an ordinary slug). The time should be taken from when the screen turns black at the start to when the cubes appear on the screen.
Rem Project: V7_1b4 Heisenslug
Rem Created: 25/10/2008 16:01:52
Rem ***** Main Source File *****
Load Dll "kernel32.dll",1
Call Dll 1, "OutputDebugStringA", "Program Started..."
`=======================================
`INITIALIZATION
Sync On
Sync Rate 30
Disable EscapeKey
`***DEBUG***
Load_Time = Timer()
Real_Time_Start$ = Get Time$()
Debug_Perf_Timer As Double Integer
Debug_Perf_Timer = PerfTimer()
`***********
`=======================================
`OBJECT CREATION
Objects_Total = 10000
Make Object Cube 1,3.0
For X = 2 To Objects_Total
Instance Object X,1
Position Object X,Rnd(200) - 100,Rnd(200) - 100,Rnd(200) - 100
Next X
`=======================================
`***DEBUG***
Load_Time = Timer() - Load_Time
Real_Time_Finish$ = Get Time$()
Debug_Perf_Timer = PerfTimer() - Debug_Perf_Timer
Call Dll 1, "OutputDebugStringA", "Loading complete"
`***********
`***************************************
`MAIN LOOP
`***************************************
DO
`***DEBUG***
Text 0,0,"Loading time: " + Str$(Load_Time)
Text 0,10,"Real Time Start: " + Real_Time_Start$
Text 0,20,"Real Time End: " + Real_Time_Finish$
Text 0,30,"Debug PerfTimer: " + Str$(Debug_Perf_Timer)
Text 0,50,"Loading Complete"
`***********
If EscapeKey()=1 Then Close_Program(Total_Objects)
Control Camera Using ArrowKeys 0,1,2
Sync
Loop
`***************************************
`MAIN FUNCTIONS
`***************************************
`=======================================
`DELETE ENTITIES AND CLOSE THE PROGRAM
`=======================================
Function Close_Program(Total_Objects)
Delete Objects 1,Total_Objects
Flush Video Memory
End
EndFunction
Alter the "Objects_Total" variable to obtain results for different numbers of cubes. You should find that as this number is increased, the discrepancy between the time taken as stated by DBPro's timers, and your stopwatches should increase exponentially. You should test this in versions 6.8 and 7.1 beta 4 and you should find the discrepancies are larger overall in 7.1 beta 4 than in 6.8. A graph is attached with the data that I collected:
[img]Heisenslug_graph.jpg[/img]
pcRaider,
I confirm that the code in the "Break" command helpfile section doesn't work; in the first line, the "TO" is written with a zero, instead of an "O".