Dolphin 3 crashes on startup

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Dolphin 3 crashes on startup

Davorin Mestric
the line SamplingInterval := ... crashes on faster machines during startup.
millisecondsToRun returns 0, and then there is a division by zero.

This happens to the development environment as well as to anything deployed.


this is the walkback that jumps when Dolphin can't start. I also included
part of the code.

Davorin Mestric



ProcessorScheduler>>zeroDivide:
[] in ProcessorScheduler>>vmi:list:no:with:
BlockClosure>>ifCurtailed:
ProcessorScheduler>>vmi:list:no:with:
SmallInteger>>/
InputState>>onStartup
DevelopmentSessionManager(SessionManager)>>basicPrimaryStartup
DevelopmentSessionManager(SessionManager)>>primaryStartup
DevelopmentSessionManager>>primaryStartup
DevelopmentSessionManager(SessionManager)>>onStartup:
ProcessorScheduler>>onStartup:
[] in ProcessorScheduler>>vmi:list:no:with:
BlockClosure>>ifCurtailed:
ProcessorScheduler>>vmi:list:no:with:
DevelopmentSessionManager>>snapshot:
DevelopmentSessionManager>>snapshot
DevelopmentSessionManager>>saveImageDefault
[] in DevelopmentSessionManager(SessionManager)>>saveImage
BlockClosure>>ensure:
DevelopmentSessionManager(SessionManager)>>saveImage







InputState
>>
onStartup

inputSemaphore := Semaphore new.

"Calculate a sampling interval of approximately 24576 on a P100"

SamplingInterval := (((24576 / (Time millisecondsToRun: [1 to: 68000 do: [:i
|]]) * 40) asInteger)

min: 1048576) "no longer than 2^20"

max: 16384. "no shorter than 2^14"



"Configure the VM"

...


Reply | Threaded
Open this post in threaded view
|

Re: Dolphin 3 crashes on startup

Blair McGlashan
Davorin

"Davorin Mestric" <[hidden email]> wrote in message
news:a33qd2$fmsk$[hidden email]...
> the line SamplingInterval := ... crashes on faster machines during
startup.
> millisecondsToRun returns 0, and then there is a division by zero.
>
> This happens to the development environment as well as to anything
deployed.

>
> ...
>
> ProcessorScheduler>>zeroDivide:
> [] in ProcessorScheduler>>vmi:list:no:with:
> BlockClosure>>ifCurtailed:
> ProcessorScheduler>>vmi:list:no:with:
> SmallInteger>>/
> InputState>>onStartup
>...

As I recall this bug was reported by Ian Bartholomew before the release of
Dolphin 4, and was fixed in D4 as follows:

...
 "Calculate a sampling interval of approximately 24576 on a P100"
 startTime := Delay millisecondClockValue.
 loops := 0.
 [ loops := loops + 1.
  1 to: 68000 do: [:i |].
  (ticks := Delay millisecondClockValue - startTime) <= 0] whileTrue.
 SamplingInterval := (((24576 * loops / ticks * 40) asInteger)
     min: 1048576)     "no longer than 2^20"
      max: 16384.   "no shorter than 2^14"
....

Hope this helps

Blair