From: MM on 26 May 2010 07:35 I've just realised that the reason my app keeps crashing out of VB IDE is because the duration I'm setting is zero! I'm now testing whether the delta time = 0 and if so, setting it arbitrarily to 5. But why the crash? MM
From: Karl E. Peterson on 26 May 2010 12:53 MM wrote: > I've just realised that the reason my app keeps crashing out of VB IDE > is because the duration I'm setting is zero! > > I'm now testing whether the delta time = 0 and if so, setting it > arbitrarily to 5. But why the crash? No idea. First time I've heard that, and of course it's been over 10 years since I was inside that project so details aren't as vivid as they once were. Can you create a simple repro case for me to look at? -- ..NET: It's About Trust! http://vfred.mvps.org Customer Hatred Knows No Bounds at MSFT ClassicVB Users Regroup! comp.lang.basic.visual.misc Free usenet access at http://www.eternal-september.org
From: MM on 27 May 2010 02:09 On Wed, 26 May 2010 09:53:37 -0700, Karl E. Peterson <karl(a)exmvps.org> wrote: > >MM wrote: >> I've just realised that the reason my app keeps crashing out of VB IDE >> is because the duration I'm setting is zero! >> >> I'm now testing whether the delta time = 0 and if so, setting it >> arbitrarily to 5. But why the crash? > >No idea. First time I've heard that, and of course it's been over 10 >years since I was inside that project so details aren't as vivid as >they once were. > >Can you create a simple repro case for me to look at? Create a new VB6 project and include Reference to CCRP High Performance Timer. Add a label, Label1, to Form1. Code: Option Explicit Implements ICcrpCountdownNotify Private cntNotify As ccrpCountdown Private TimeLeft As Long Private Sub Form_Load() TimeLeft = 3000 Set cntNotify = New ccrpCountdown cntNotify.Interval = 100 Set cntNotify.Notify = Me cntNotify.Duration = TimeLeft cntNotify.Enabled = True End Sub Private Sub ICcrpCountdownNotify_Timer() cntNotify.Enabled = False DoSomething End Sub Sub DoSomething() Label1 = TimeLeft TimeLeft = TimeLeft - 1000 cntNotify.Duration = TimeLeft cntNotify.Enabled = True End Sub It crashes when the Duration is set to 0. ("VB6 caused an exception 10H in module MSVBVM60.DLL") This is running SP6. MM
From: Karl E. Peterson on 27 May 2010 12:59 MM wrote: > On Wed, 26 May 2010 09:53:37 -0700, Karl E. Peterson <karl(a)exmvps.org> > wrote: > >> >> MM wrote: >>> I've just realised that the reason my app keeps crashing out of VB IDE >>> is because the duration I'm setting is zero! >>> >>> I'm now testing whether the delta time = 0 and if so, setting it >>> arbitrarily to 5. But why the crash? >> >> No idea. First time I've heard that, and of course it's been over 10 >> years since I was inside that project so details aren't as vivid as >> they once were. >> >> Can you create a simple repro case for me to look at? > > Create a new VB6 project and include Reference to CCRP High > Performance Timer. Add a label, Label1, to Form1. > > Code: > > Option Explicit > > Implements ICcrpCountdownNotify > Private cntNotify As ccrpCountdown > Private TimeLeft As Long > > Private Sub Form_Load() > TimeLeft = 3000 > Set cntNotify = New ccrpCountdown > cntNotify.Interval = 100 > Set cntNotify.Notify = Me > cntNotify.Duration = TimeLeft > cntNotify.Enabled = True > End Sub > > Private Sub ICcrpCountdownNotify_Timer() > cntNotify.Enabled = False > DoSomething > End Sub > > Sub DoSomething() > Label1 = TimeLeft > TimeLeft = TimeLeft - 1000 > cntNotify.Duration = TimeLeft > cntNotify.Enabled = True > End Sub > > It crashes when the Duration is set to 0. > ("VB6 caused an exception 10H in module MSVBVM60.DLL") > > This is running SP6. Huh. Weird. Easy enough to repro, thanks. So help me understand the goal, here. You want to have a series of events, occuring at a decreasing interval? I'm having trouble understanding why you're setting a duration of zero. Odds are, this one is going to have the answer, "Don't do that." There always were "issues" with resetting those properties during an event callback. That was one of the prime reasons I've considered opening the source up to public scrutiny, and seeing if a better implementation might occur to anyone. -- ..NET: It's About Trust! http://vfred.mvps.org Customer Hatred Knows No Bounds at MSFT ClassicVB Users Regroup! comp.lang.basic.visual.misc Free usenet access at http://www.eternal-september.org
From: MM on 27 May 2010 15:08 On Thu, 27 May 2010 09:59:56 -0700, Karl E. Peterson <karl(a)exmvps.org> wrote: >MM wrote: >> On Wed, 26 May 2010 09:53:37 -0700, Karl E. Peterson <karl(a)exmvps.org> >> wrote: >> >>> >>> MM wrote: >>>> I've just realised that the reason my app keeps crashing out of VB IDE >>>> is because the duration I'm setting is zero! >>>> >>>> I'm now testing whether the delta time = 0 and if so, setting it >>>> arbitrarily to 5. But why the crash? >>> >>> No idea. First time I've heard that, and of course it's been over 10 >>> years since I was inside that project so details aren't as vivid as >>> they once were. >>> >>> Can you create a simple repro case for me to look at? >> >> Create a new VB6 project and include Reference to CCRP High >> Performance Timer. Add a label, Label1, to Form1. >> >> Code: >> >> Option Explicit >> >> Implements ICcrpCountdownNotify >> Private cntNotify As ccrpCountdown >> Private TimeLeft As Long >> >> Private Sub Form_Load() >> TimeLeft = 3000 >> Set cntNotify = New ccrpCountdown >> cntNotify.Interval = 100 >> Set cntNotify.Notify = Me >> cntNotify.Duration = TimeLeft >> cntNotify.Enabled = True >> End Sub >> >> Private Sub ICcrpCountdownNotify_Timer() >> cntNotify.Enabled = False >> DoSomething >> End Sub >> >> Sub DoSomething() >> Label1 = TimeLeft >> TimeLeft = TimeLeft - 1000 >> cntNotify.Duration = TimeLeft >> cntNotify.Enabled = True >> End Sub >> >> It crashes when the Duration is set to 0. >> ("VB6 caused an exception 10H in module MSVBVM60.DLL") >> >> This is running SP6. > >Huh. Weird. Easy enough to repro, thanks. > >So help me understand the goal, here. You want to have a series of >events, occuring at a decreasing interval? > >I'm having trouble understanding why you're setting a duration of zero. This happened during development of an app. I'd expect the Duration (if set to 0 or minus) to throw a runtime error, but not crash the IDE. >Odds are, this one is going to have the answer, "Don't do that." There >always were "issues" with resetting those properties during an event >callback. That was one of the prime reasons I've considered opening >the source up to public scrutiny, and seeing if a better implementation >might occur to anyone. What I'm doing is to take a subtitle file and calculate the delta times between subtitles. My current workround is to test each delta time and, if zero, set it to 5 (milliseconds). These are the deltas between display of subtitles for a movie. (Not every subtitle file was created pristine by its originator!) I've also added a function to check the integrity and watch for this kind of error (where subtitles overlap [which they shouldn't]). So it's not a deal-breaker. However, I'd expect the CCRP part to throw a trappable error, not barf uncontrollably... ;) Thanks for your feedback. MM
|
Next
|
Last
Pages: 1 2 Prev: Identifying Modified Database Fields Next: Problem with Right Context Menu Entry |