|
-
October 1st, 2001, 05:11 AM
#1
why VB crashed
When debug my application. If I press stop button my vb close suddenly. No error message. No conformation. So I lost my unsaved code.What may be problem. How can I solve it.
I using VB 6.0 SP 5 with SourceSafe
-
October 1st, 2001, 05:33 AM
#2
Re: why VB crashed
The stop button is equivalent to put an end instruction in code. That means your components do not execute the terminate code, nor even the unload or query unload code. So, if inside your porject you have referenced external components (dll, exe,..) you do not close them correctly. Even some Api (ie: timer Api, ...) require you close smoothly. So, to avoid matter, put a commandbutton on a form, or code you can activate where you need to stop, to unload all opened forms and release all referenced objects.
This should resolve the matter. Before testing, however, let me suggest you to reboot your machine this time: you may have a "dirty" memory situation right now.
Hope this helped.
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Micahel
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
October 1st, 2001, 05:52 AM
#3
Re: why VB crashed
I use only ADo and Crystal Report. My application has some bug and I want to find it. When I use breakpoints pause my application. Then run step by step. But my problem VB editor close after click stop button in Visual Basic toolbar.Each time I have to reopen project.
thanks
-
October 1st, 2001, 06:53 AM
#4
Re: ADo and Crystal Report
Normally none of above should crhas your application, but we may never say. Let's do some testing:
Open a standard exe project, add a commandbutton to the form, then perform some simple operations (like: Me.caption = "AAA"). Then add a breakpoint, run it then try stopping. Does it crashes like the complex one? If no, try adding ado, establish a connection, reading from a table and try gaing. It crashes? If no, add a Crystal report and try again...
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Micahel
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
October 1st, 2001, 04:20 PM
#5
Re: why VB crashed
hi,
I had a similar problem when i was using a certain DLL. This is also typical to endless or very long loops. Try finding the possible "problematic functions" and put "DoEvents" on both sides of these commands (before and after ofcourse).
then try pushing the Stop button.
----------
The @host is everywhere!
----------
-
October 1st, 2001, 04:57 PM
#6
Re: why VB crashed
Here is one trick I use when this sort of abort occurs. When debugging and you want to terminate program execution at a certain breakpoint, Wait unti the break triggers then instead of hitting thestop button, executs a UNLOAD ME statement as the next statement to be executed.
I have doe this by typing it in the Immediate window or adding it as the next line to execute or transferring control to a statement within the same subroutine that seay UNLOAD ME. This way VB will get a chance to close open interfaces to ADO Crystal reports, etc
John G
-
October 2nd, 2001, 12:47 AM
#7
thanks all reply
Now it's better
Thanks again

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|