I would like to know if the attached patch (which prevents DBGRID32.OCX from crashing, as well as adding additional debugging information when a reference is not found) would step on anybody's toes (especially Robert Shearman, since he is sending several oleaut32 patches himself). As of 2005-12-01 CVS, any VisualBasic application that tries to use DBGRID32.OCX will systematically crash unless the patch is applied. However, since Robert Shearman is sending oleaut32 fixes, I think he might implement some functionality that will, as a side effect, fix the DBGRID32.OCX bug.
Alex Villacís Lasso
Alex Villacís Lasso wrote:
I would like to know if the attached patch (which prevents DBGRID32.OCX from crashing, as well as adding additional debugging information when a reference is not found) would step on anybody's toes (especially Robert Shearman, since he is sending several oleaut32 patches himself). As of 2005-12-01 CVS, any VisualBasic application that tries to use DBGRID32.OCX will systematically crash unless the patch is applied. However, since Robert Shearman is sending oleaut32 fixes, I think he might implement some functionality that will, as a side effect, fix the DBGRID32.OCX bug.
No, I have no plans to change anything that should affect this.
ITypeInfoImpl *This = (ITypeInfoImpl *)iface; HRESULT result = E_FAIL;
- if (hRefType == -1 &&
- (((ITypeInfoImpl*) This)->TypeAttr.typekind == TKIND_DISPATCH) &&
- (((ITypeInfoImpl*) This)->TypeAttr.wTypeFlags & TYPEFLAG_FDUAL))
- if (
(
hRefType == -1 &&
(This->TypeAttr.typekind == TKIND_DISPATCH) &&
(This->TypeAttr.wTypeFlags & TYPEFLAG_FDUAL)
)
||
(
(This->TypeAttr.typekind == TKIND_DISPATCH) &&
(This->TypeAttr.wTypeFlags & TYPEFLAG_FDISPATCHABLE)
)
{)
What hRefType is passed to the function? I don't think the above is quite correct. Can you try changing the if statement to something like this:
if (hRefType == -1 && (This->TypeAttr.typekind == TKIND_DISPATCH) && (This->TypeAttr.wTypeFlags & (TYPEFLAG_FDUAL|TYPEFLAG_FDISPATCHABLE)))
Robert Shearman wrote:
What hRefType is passed to the function? I don't think the above is quite correct. Can you try changing the if statement to something like this:
if (hRefType == -1 && (This->TypeAttr.typekind == TKIND_DISPATCH) && (This->TypeAttr.wTypeFlags & (TYPEFLAG_FDUAL|TYPEFLAG_FDISPATCHABLE)))
That would not keep the app from crashing. For the case of DBGRID32.OCX, hRefType is systematically == 19, and it says so in the ERR message just before the crash. However, on a second look, maybe the problem is not that the function performs the wrong action, but that it returns the wrong value (E_FAIL, should be TYPE_E_ELEMENTNOTFOUND). I have to check this alternate theory on my home machine.
Alex Villacís Lasso
Alex Villacís Lasso wrote:
Robert Shearman wrote:
What hRefType is passed to the function? I don't think the above is quite correct. Can you try changing the if statement to something like this:
if (hRefType == -1 && (This->TypeAttr.typekind == TKIND_DISPATCH) && (This->TypeAttr.wTypeFlags & (TYPEFLAG_FDUAL|TYPEFLAG_FDISPATCHABLE)))
That would not keep the app from crashing. For the case of DBGRID32.OCX, hRefType is systematically == 19, and it says so in the ERR message just before the crash. However, on a second look, maybe the problem is not that the function performs the wrong action, but that it returns the wrong value (E_FAIL, should be TYPE_E_ELEMENTNOTFOUND). I have to check this alternate theory on my home machine.
Alex Villacís Lasso
More information: if the flag dumping portion of the patch is applied, but the condition portion is not, and a dump of the available references is added, the following is the result when trying to load DBGRID32.OCX:
fixme:ole:ITypeInfo_fnGetRefTypeInfo pRefType->reference == 0x0640 fixme:ole:ITypeInfo_fnGetRefTypeInfo pRefType->reference == 0x0190 fixme:ole:ITypeInfo_fnGetRefTypeInfo pRefType->reference == 0x03e8 fixme:ole:ITypeInfo_fnGetRefTypeInfo pRefType->reference == 0x0031 fixme:ole:ITypeInfo_fnGetRefTypeInfo pRefType->reference == 0x0708 fixme:ole:ITypeInfo_fnGetRefTypeInfo pRefType->reference == 0x0258 fixme:ole:ITypeInfo_fnGetRefTypeInfo pRefType->reference == 0x00c8 fixme:ole:ITypeInfo_fnGetRefTypeInfo pRefType->reference == 0x003d fixme:ole:ITypeInfo_fnGetRefTypeInfo pRefType->reference == 0x0578 fixme:ole:ITypeInfo_fnGetRefTypeInfo pRefType->reference == 0x07d0 fixme:ole:ITypeInfo_fnGetRefTypeInfo pRefType->reference == 0xffffffff fixme:ole:ITypeInfo_fnGetRefTypeInfo Can't find pRefType for ref 19 fixme:ole:ITypeInfo_fnGetRefTypeInfo typekind is TKIND_DISPATCH fixme:ole:ITypeInfo_fnGetRefTypeInfo wTypeFlags are: TYPEFLAG_FHIDDEN TYPEFLAG_FNONEXTENSIBLE TYPEFLAG_FDISPATCHABLE wine: Unhandled page fault on read access to 0x00000010 at address 0x230f4f31 (thread 0009), starting debugger...
BTW, no luck on the bad-return-value theory, the app keeps crashing.
Alex Villacís Lasso