Crash on closing DB due to cursor not nil
Ruslan Zasukhin
sunshine at public.kherson.ua
Wed Apr 25 14:30:49 CDT 2007
On 25/4/07 10:24 PM, "Steve Albin" <steve at steve-albin.com> wrote:
Hi Steve,
> I'm using RB2007r2 with V4RB 2.5.9. I've come across a situation where my app
> crashes on shutdown if I don't set a cursor to nil first.
>
> Here is my code for the close event in my app class:
>
> self.CloseWindows // close all windows that may be open
> if DBfile <> nil then // DBfile is class VDatabase
> self.DBfile.Flush
> self.DBfile = nil
> end if
> Valentina.ShutDown
>
>
> This works fine unless I do one particular function in a global module where I
> declare a VCursor as global. If I don't specifically set the VCursor to nil,
> the app crashes above where I set DBfile to nil.
>
> I have many VCursors declared in my windows, so I suppose the routine I use to
> close the windows solves this problem.
>
> I was under the impression that it was not necessary to set each cursor to nil
> before setting the DB to nil. Has something changed or was I misinformed?
>
> If this is a bug, I will set up a project and report it. But, I have a
> perfect workaround for my app.
Yes we fight against such crashes...
E.g. TEST project exactly have similar tests I think.
And may be you have discover one more special case.
Hard to say. It needs to get on hands project.
--
Best regards,
Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc
Valentina - Joining Worlds of Information
http://www.paradigmasoft.com
[I feel the need: the need for speed]
More information about the Valentina
mailing list