Visual Basic Q&A

As a software engineer, I focus on .NET, especially asp.net, C#, WCF and so on, and I am also very interested in Search Engine Optimization.

Entries Tagged ‘access violation’

PRB: Cannot Use Data Transformation Services Event Handlers in Visual Basic with Execute Package Task

Symptoms
If you install Data Transformation Services (DTS) Package event handlers in a Visual Basic application, and the package you call uses an Execute Package task to call another package, an Exception Access Violation (AV) similar to the following may occur:

(1:Child Package) SubStep ‘<title of step> Step’ failed with the following error:
Need to run the object to perform this operation
(Microsoft Data Transformation Services (DTS) Package (80040005):
Provider generated code execution exception:EXCEPTION_ACCESS_VIOLATION)The Access Violation occurs when these conditions are true:You use DTS package event handlers in the Visual Basic application.You use a parent DTS package that uses an Execute Package task to call a child DTS package.
Resolution
Threading limitations in the design of Visual Basic 6.0 prevent the nested child package from reporting it’s events up through the parent package’s event handler.

FIX: Visual Basic 5.0 Crashes When Shutting Down Forms

Symptoms
Closing a modal form in the Visual Basic 5.0 design environment may causeone of the following errors:

“Access Violation: Unhandled exception in VB5.EXE 0xC0000005: AccessViolation” (Windows NT4)
-or-

“VB has caused an invalid page fault in module VB5.EXE at 0137:00419f1e”(Windows 95, Windows 98, and Windows Me)
Resolution
Visual Basic is trying to get the thread data from a control after it hasbeen unloaded. The error code that signaled that the control got unloadedis not handled properly.

BUG: VFP CDX with EMPTY Function is Not Recognized in VB

Symptoms
FoxPro indexes that contain the function EMPTY or ISBLANK will not berecognized in Visual Basic. Indexes with this function are recognizedby Visual Basic 4.0. The following error will be generated under NT and Windows 2000:

An application error has occurred
and an application error log is being generated.
VB5.exe
Exception Access Violation (0xc0000005),Address ………Visual Basic is terminated by this error.
In Windows 95 and Windows 98, no error is returned because the index is notseen.
Resolution
Compare field to ” ” instead of using EMPTY. The same results are achieved.

BUG: SSTab Control Containing OLE Control May Crash

Symptoms
On a Visual Basic form, an OLE control is placed on a Microsoft TabbedDialog control. You write code to embed a file into the OLE control usingthe CreateEmbed method. When the user clicks the tab that contains the OLEcontrol, one of the following errors occur and the application terminates:

VB5 caused an invalid page fault in module TABCTL32.OCX at0137:212f8b26.-or-

<Project Name> executed an invalid instruction in module OLE32.DLL at0137:65fa93ae.-or-

Exception: Access violation (0xc0000005), Address: 0×212f8b26
Resolution
To work around this problem, do one of the following:Place the OLE control inside a Frame control.
-or-Make the Tab that contains the OLE control the active tab before usingthe CreateEmbed method.

BUG: Find Next Crashes After Closing a Maximized Code Window

Symptoms
Closing a maximized code window after performing a Find and Find Nextsubsequently on the code window causes Visual Basic to crash.
The possible error messages are:

An application error has occurred.
VB6.exe
Exception: Access Violation (0×00000005) Address: 0×0fb16e90
-or-

An application error has occurred.
VB5.exe
Exception: Access Violation (0×00000005) Address: 0×0fb16e90
-or-

This program has performed an illegal operation and will be shut down.
-or-

Edit: VB6.EXE Application Error
The instruction at “0×0fa76bb1″ referenced memory at “0×00000058″. The
memory could not be “read”.
-or-

Edit: VB5.EXE Application Error
The instruction at “0×0fa76bb1″ referenced memory at “0×00000058″. The
memory could not be “read”.
Resolution
This problem does not occur if the code window is not maximized.