Firefox 4 beta 8 -> get_accChild() returns E_INVALIDARG

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Firefox 4 beta 8 -> get_accChild() returns E_INVALIDARG

sylvain.werdefroy
Hi all,

This code was OK on beta 6, but fails on beta 8 (not tested on beta
7). This code simply tries to get the first child of an object:

hr=AccessibleObjectFromWindow(w,(DWORD)OBJID_CLIENT,IID_IAccessible,
(void**)&pTopAccessible);
hr=pTopAccessible->accNavigate(0x1009,vtStart,&vtResult); //
NAVRELATION_EMBEDS = 0x1009
pIDispatch=(IDispatch*)vtResult.lVal;
hr=pIDispatch->QueryInterface(IID_IAccessible, (void**)&pAccessible);
hr=pAccessible->get_accChildCount(&lCount);
//  ==> value of lCount is 6 in my example
vtChild.vt=VT_I4;
vtChild.lVal=1;
hr=pAccessible->get_accChild(vtChild,&pIDispatch); => hr=S_OK
...
vtChild.lVal=6;
hr=pAccessible->get_accChild(vtChild,&pIDispatch); => hr=E_INVALIDARG!

Do you have an idea? Not sure, but I guess there is a bug in the
Firefox code: I suppose there is a test like this in the
get_accChild() method:
if (vtChild.lVal >= lCount) return E_INVALIDARG; // where lCount is
the number of childs.
As the childs are 1 based and not 0 based, the right code should be:
if (vtChild.lVal > lCount) return E_INVALIDARG; // where lCount is the
number of childs.

Thanks!

Sylvain
_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Firefox 4 beta 8 -> get_accChild() returns E_INVALIDARG

David Bolter-3
Hi Sylvain,

I'd like to help. Can you provide me with your test case?

Feel free to contact me off-list if appropriate.

Cheers,
David

On 10/01/11 9:08 AM, Sylvain wrote:

> Hi all,
>
> This code was OK on beta 6, but fails on beta 8 (not tested on beta
> 7). This code simply tries to get the first child of an object:
>
> hr=AccessibleObjectFromWindow(w,(DWORD)OBJID_CLIENT,IID_IAccessible,
> (void**)&pTopAccessible);
> hr=pTopAccessible->accNavigate(0x1009,vtStart,&vtResult); //
> NAVRELATION_EMBEDS = 0x1009
> pIDispatch=(IDispatch*)vtResult.lVal;
> hr=pIDispatch->QueryInterface(IID_IAccessible, (void**)&pAccessible);
> hr=pAccessible->get_accChildCount(&lCount);
> //  ==>  value of lCount is 6 in my example
> vtChild.vt=VT_I4;
> vtChild.lVal=1;
> hr=pAccessible->get_accChild(vtChild,&pIDispatch); =>  hr=S_OK
> ...
> vtChild.lVal=6;
> hr=pAccessible->get_accChild(vtChild,&pIDispatch); =>  hr=E_INVALIDARG!
>
> Do you have an idea? Not sure, but I guess there is a bug in the
> Firefox code: I suppose there is a test like this in the
> get_accChild() method:
> if (vtChild.lVal>= lCount) return E_INVALIDARG; // where lCount is
> the number of childs.
> As the childs are 1 based and not 0 based, the right code should be:
> if (vtChild.lVal>  lCount) return E_INVALIDARG; // where lCount is the
> number of childs.
>
> Thanks!
>
> Sylvain
> _______________________________________________
> dev-accessibility mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-accessibility

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Firefox 4 beta 8 -> get_accChild() returns E_INVALIDARG

Alexander Surkov
In reply to this post by sylvain.werdefroy
Hi, Sylvain.

I could suppose beta 6 and beta 8 expose different accessible trees
making your code fail. As David said we need a test case to see what
happens. I don't really think it's trivial as you assumed.

Thank you.
Alex.


On Mon, Jan 10, 2011 at 10:08 PM, Sylvain <[hidden email]> wrote:

> Hi all,
>
> This code was OK on beta 6, but fails on beta 8 (not tested on beta
> 7). This code simply tries to get the first child of an object:
>
> hr=AccessibleObjectFromWindow(w,(DWORD)OBJID_CLIENT,IID_IAccessible,
> (void**)&pTopAccessible);
> hr=pTopAccessible->accNavigate(0x1009,vtStart,&vtResult); //
> NAVRELATION_EMBEDS = 0x1009
> pIDispatch=(IDispatch*)vtResult.lVal;
> hr=pIDispatch->QueryInterface(IID_IAccessible, (void**)&pAccessible);
> hr=pAccessible->get_accChildCount(&lCount);
> //  ==> value of lCount is 6 in my example
> vtChild.vt=VT_I4;
> vtChild.lVal=1;
> hr=pAccessible->get_accChild(vtChild,&pIDispatch); => hr=S_OK
> ...
> vtChild.lVal=6;
> hr=pAccessible->get_accChild(vtChild,&pIDispatch); => hr=E_INVALIDARG!
>
> Do you have an idea? Not sure, but I guess there is a bug in the
> Firefox code: I suppose there is a test like this in the
> get_accChild() method:
> if (vtChild.lVal >= lCount) return E_INVALIDARG; // where lCount is
> the number of childs.
> As the childs are 1 based and not 0 based, the right code should be:
> if (vtChild.lVal > lCount) return E_INVALIDARG; // where lCount is the
> number of childs.
>
> Thanks!
>
> Sylvain
> _______________________________________________
> dev-accessibility mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-accessibility
>
_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Firefox 4 beta 8 -> get_accChild() returns E_INVALIDARG

sylvain.werdefroy
In reply to this post by sylvain.werdefroy
Hi Alexander,

Here is the html page: www.swsso.fr/demo/

If you explore this page with a tool such as inspect32.exe (free
Microsoft tool), you can see that the content window has 6 childs.
The first 5 childs are <BR> objects.
The 6th is a form object. Inspect32 succeeds getting this object
because it uses accNavigate method.

I would like to get this object with a simple loop form 1 to 6
invoking the get_accChild() method:
- 1 to 5 returns OK (<BR> objects).
- 6 returns E_INVALID_ARG.

Hope this helps.

Thank you.

Sylvain

On 11 jan, 04:06, Alexander Surkov <[hidden email]> wrote:

> Hi, Sylvain.
>
> I could suppose beta 6 and beta 8 expose different accessible trees
> making your code fail. As David said we need a test case to see what
> happens. I don't really think it's trivial as you assumed.
>
> Thank you.
> Alex.
>
>
>
>
>
>
>
> On Mon, Jan 10, 2011 at 10:08 PM, Sylvain <[hidden email]> wrote:
> > Hi all,
>
> > This code was OK on beta 6, but fails on beta 8 (not tested on beta
> > 7). This code simply tries to get the first child of an object:
>
> > hr=AccessibleObjectFromWindow(w,(DWORD)OBJID_CLIENT,IID_IAccessible,
> > (void**)&pTopAccessible);
> > hr=pTopAccessible->accNavigate(0x1009,vtStart,&vtResult); //
> > NAVRELATION_EMBEDS = 0x1009
> > pIDispatch=(IDispatch*)vtResult.lVal;
> > hr=pIDispatch->QueryInterface(IID_IAccessible, (void**)&pAccessible);
> > hr=pAccessible->get_accChildCount(&lCount);
> > //  ==> value of lCount is 6 in my example
> > vtChild.vt=VT_I4;
> > vtChild.lVal=1;
> > hr=pAccessible->get_accChild(vtChild,&pIDispatch); => hr=S_OK
> > ...
> > vtChild.lVal=6;
> > hr=pAccessible->get_accChild(vtChild,&pIDispatch); => hr=E_INVALIDARG!
>
> > Do you have an idea? Not sure, but I guess there is a bug in the
> > Firefox code: I suppose there is a test like this in the
> > get_accChild() method:
> > if (vtChild.lVal >= lCount) return E_INVALIDARG; // where lCount is
> > the number of childs.
> > As the childs are 1 based and not 0 based, the right code should be:
> > if (vtChild.lVal > lCount) return E_INVALIDARG; // where lCount is the
> > number of childs.
>
> > Thanks!
>
> > Sylvain
> > _______________________________________________
> > dev-accessibility mailing list
> > [hidden email]
> >https://lists.mozilla.org/listinfo/dev-accessibility

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Firefox 4 beta 8 -> get_accChild() returns E_INVALIDARG

Alexander Surkov
Hi, Sylvain.

Indices are zero-based, though if 5th is BR then there's still a
problem. I'll take a look.

Thank you.
Alex.


On Tue, Jan 11, 2011 at 2:56 PM, Sylvain <[hidden email]> wrote:

> Hi Alexander,
>
> Here is the html page: www.swsso.fr/demo/
>
> If you explore this page with a tool such as inspect32.exe (free
> Microsoft tool), you can see that the content window has 6 childs.
> The first 5 childs are <BR> objects.
> The 6th is a form object. Inspect32 succeeds getting this object
> because it uses accNavigate method.
>
> I would like to get this object with a simple loop form 1 to 6
> invoking the get_accChild() method:
> - 1 to 5 returns OK (<BR> objects).
> - 6 returns E_INVALID_ARG.
>
> Hope this helps.
>
> Thank you.
>
> Sylvain
>
> On 11 jan, 04:06, Alexander Surkov <[hidden email]> wrote:
>> Hi, Sylvain.
>>
>> I could suppose beta 6 and beta 8 expose different accessible trees
>> making your code fail. As David said we need a test case to see what
>> happens. I don't really think it's trivial as you assumed.
>>
>> Thank you.
>> Alex.
>>
>>
>>
>>
>>
>>
>>
>> On Mon, Jan 10, 2011 at 10:08 PM, Sylvain <[hidden email]> wrote:
>> > Hi all,
>>
>> > This code was OK on beta 6, but fails on beta 8 (not tested on beta
>> > 7). This code simply tries to get the first child of an object:
>>
>> > hr=AccessibleObjectFromWindow(w,(DWORD)OBJID_CLIENT,IID_IAccessible,
>> > (void**)&pTopAccessible);
>> > hr=pTopAccessible->accNavigate(0x1009,vtStart,&vtResult); //
>> > NAVRELATION_EMBEDS = 0x1009
>> > pIDispatch=(IDispatch*)vtResult.lVal;
>> > hr=pIDispatch->QueryInterface(IID_IAccessible, (void**)&pAccessible);
>> > hr=pAccessible->get_accChildCount(&lCount);
>> > //  ==> value of lCount is 6 in my example
>> > vtChild.vt=VT_I4;
>> > vtChild.lVal=1;
>> > hr=pAccessible->get_accChild(vtChild,&pIDispatch); => hr=S_OK
>> > ...
>> > vtChild.lVal=6;
>> > hr=pAccessible->get_accChild(vtChild,&pIDispatch); => hr=E_INVALIDARG!
>>
>> > Do you have an idea? Not sure, but I guess there is a bug in the
>> > Firefox code: I suppose there is a test like this in the
>> > get_accChild() method:
>> > if (vtChild.lVal >= lCount) return E_INVALIDARG; // where lCount is
>> > the number of childs.
>> > As the childs are 1 based and not 0 based, the right code should be:
>> > if (vtChild.lVal > lCount) return E_INVALIDARG; // where lCount is the
>> > number of childs.
>>
>> > Thanks!
>>
>> > Sylvain
>> > _______________________________________________
>> > dev-accessibility mailing list
>> > [hidden email]
>> >https://lists.mozilla.org/listinfo/dev-accessibility
>
> _______________________________________________
> dev-accessibility mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-accessibility
>
_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Firefox 4 beta 8 -> get_accChild() returns E_INVALIDARG

Alexander Surkov
Then here's a problem since they are 0-based in Firefox crossplatform layer.


On Tue, Jan 11, 2011 at 3:33 PM, Sylvain WERDEFROY
<[hidden email]> wrote:

> Not sure, but I think indices are 1-based. The zero value is CHILDID_SELF.
>
> Sylvain
>
> Le 11 janv. 2011 à 08:05, Alexander Surkov
> <[hidden email]> a écrit :
>
>> Hi, Sylvain.
>>
>> Indices are zero-based, though if 5th is BR then there's still a
>> problem. I'll take a look.
>>
>> Thank you.
>> Alex.
>>
>>
>> On Tue, Jan 11, 2011 at 2:56 PM, Sylvain <[hidden email]> wrote:
>>> Hi Alexander,
>>>
>>> Here is the html page: www.swsso.fr/demo/
>>>
>>> If you explore this page with a tool such as inspect32.exe (free
>>> Microsoft tool), you can see that the content window has 6 childs.
>>> The first 5 childs are <BR> objects.
>>> The 6th is a form object. Inspect32 succeeds getting this object
>>> because it uses accNavigate method.
>>>
>>> I would like to get this object with a simple loop form 1 to 6
>>> invoking the get_accChild() method:
>>> - 1 to 5 returns OK (<BR> objects).
>>> - 6 returns E_INVALID_ARG.
>>>
>>> Hope this helps.
>>>
>>> Thank you.
>>>
>>> Sylvain
>>>
>>> On 11 jan, 04:06, Alexander Surkov <[hidden email]> wrote:
>>>> Hi, Sylvain.
>>>>
>>>> I could suppose beta 6 and beta 8 expose different accessible trees
>>>> making your code fail. As David said we need a test case to see what
>>>> happens. I don't really think it's trivial as you assumed.
>>>>
>>>> Thank you.
>>>> Alex.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Mon, Jan 10, 2011 at 10:08 PM, Sylvain <[hidden email]> wrote:
>>>>> Hi all,
>>>>
>>>>> This code was OK on beta 6, but fails on beta 8 (not tested on beta
>>>>> 7). This code simply tries to get the first child of an object:
>>>>
>>>>> hr=AccessibleObjectFromWindow(w,(DWORD)OBJID_CLIENT,IID_IAccessible,
>>>>> (void**)&pTopAccessible);
>>>>> hr=pTopAccessible->accNavigate(0x1009,vtStart,&vtResult); //
>>>>> NAVRELATION_EMBEDS = 0x1009
>>>>> pIDispatch=(IDispatch*)vtResult.lVal;
>>>>> hr=pIDispatch->QueryInterface(IID_IAccessible, (void**)&pAccessible);
>>>>> hr=pAccessible->get_accChildCount(&lCount);
>>>>> //  ==> value of lCount is 6 in my example
>>>>> vtChild.vt=VT_I4;
>>>>> vtChild.lVal=1;
>>>>> hr=pAccessible->get_accChild(vtChild,&pIDispatch); => hr=S_OK
>>>>> ...
>>>>> vtChild.lVal=6;
>>>>> hr=pAccessible->get_accChild(vtChild,&pIDispatch); => hr=E_INVALIDARG!
>>>>
>>>>> Do you have an idea? Not sure, but I guess there is a bug in the
>>>>> Firefox code: I suppose there is a test like this in the
>>>>> get_accChild() method:
>>>>> if (vtChild.lVal >= lCount) return E_INVALIDARG; // where lCount is
>>>>> the number of childs.
>>>>> As the childs are 1 based and not 0 based, the right code should be:
>>>>> if (vtChild.lVal > lCount) return E_INVALIDARG; // where lCount is the
>>>>> number of childs.
>>>>
>>>>> Thanks!
>>>>
>>>>> Sylvain
>>>>> _______________________________________________
>>>>> dev-accessibility mailing list
>>>>> [hidden email]
>>>>> https://lists.mozilla.org/listinfo/dev-accessibility
>>>
>>> _______________________________________________
>>> dev-accessibility mailing list
>>> [hidden email]
>>> https://lists.mozilla.org/listinfo/dev-accessibility
>>>
>
_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Firefox 4 beta 8 -> get_accChild() returns E_INVALIDARG

Alexander Surkov
I filed bug https://bugzilla.mozilla.org/show_bug.cgi?id=624648. Thank you.

Alex.


On Tue, Jan 11, 2011 at 3:45 PM, Alexander Surkov
<[hidden email]> wrote:

> Then here's a problem since they are 0-based in Firefox crossplatform layer.
>
>
> On Tue, Jan 11, 2011 at 3:33 PM, Sylvain WERDEFROY
> <[hidden email]> wrote:
>> Not sure, but I think indices are 1-based. The zero value is CHILDID_SELF.
>>
>> Sylvain
>>
>> Le 11 janv. 2011 à 08:05, Alexander Surkov
>> <[hidden email]> a écrit :
>>
>>> Hi, Sylvain.
>>>
>>> Indices are zero-based, though if 5th is BR then there's still a
>>> problem. I'll take a look.
>>>
>>> Thank you.
>>> Alex.
>>>
>>>
>>> On Tue, Jan 11, 2011 at 2:56 PM, Sylvain <[hidden email]> wrote:
>>>> Hi Alexander,
>>>>
>>>> Here is the html page: www.swsso.fr/demo/
>>>>
>>>> If you explore this page with a tool such as inspect32.exe (free
>>>> Microsoft tool), you can see that the content window has 6 childs.
>>>> The first 5 childs are <BR> objects.
>>>> The 6th is a form object. Inspect32 succeeds getting this object
>>>> because it uses accNavigate method.
>>>>
>>>> I would like to get this object with a simple loop form 1 to 6
>>>> invoking the get_accChild() method:
>>>> - 1 to 5 returns OK (<BR> objects).
>>>> - 6 returns E_INVALID_ARG.
>>>>
>>>> Hope this helps.
>>>>
>>>> Thank you.
>>>>
>>>> Sylvain
>>>>
>>>> On 11 jan, 04:06, Alexander Surkov <[hidden email]> wrote:
>>>>> Hi, Sylvain.
>>>>>
>>>>> I could suppose beta 6 and beta 8 expose different accessible trees
>>>>> making your code fail. As David said we need a test case to see what
>>>>> happens. I don't really think it's trivial as you assumed.
>>>>>
>>>>> Thank you.
>>>>> Alex.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Jan 10, 2011 at 10:08 PM, Sylvain <[hidden email]> wrote:
>>>>>> Hi all,
>>>>>
>>>>>> This code was OK on beta 6, but fails on beta 8 (not tested on beta
>>>>>> 7). This code simply tries to get the first child of an object:
>>>>>
>>>>>> hr=AccessibleObjectFromWindow(w,(DWORD)OBJID_CLIENT,IID_IAccessible,
>>>>>> (void**)&pTopAccessible);
>>>>>> hr=pTopAccessible->accNavigate(0x1009,vtStart,&vtResult); //
>>>>>> NAVRELATION_EMBEDS = 0x1009
>>>>>> pIDispatch=(IDispatch*)vtResult.lVal;
>>>>>> hr=pIDispatch->QueryInterface(IID_IAccessible, (void**)&pAccessible);
>>>>>> hr=pAccessible->get_accChildCount(&lCount);
>>>>>> //  ==> value of lCount is 6 in my example
>>>>>> vtChild.vt=VT_I4;
>>>>>> vtChild.lVal=1;
>>>>>> hr=pAccessible->get_accChild(vtChild,&pIDispatch); => hr=S_OK
>>>>>> ...
>>>>>> vtChild.lVal=6;
>>>>>> hr=pAccessible->get_accChild(vtChild,&pIDispatch); => hr=E_INVALIDARG!
>>>>>
>>>>>> Do you have an idea? Not sure, but I guess there is a bug in the
>>>>>> Firefox code: I suppose there is a test like this in the
>>>>>> get_accChild() method:
>>>>>> if (vtChild.lVal >= lCount) return E_INVALIDARG; // where lCount is
>>>>>> the number of childs.
>>>>>> As the childs are 1 based and not 0 based, the right code should be:
>>>>>> if (vtChild.lVal > lCount) return E_INVALIDARG; // where lCount is the
>>>>>> number of childs.
>>>>>
>>>>>> Thanks!
>>>>>
>>>>>> Sylvain
>>>>>> _______________________________________________
>>>>>> dev-accessibility mailing list
>>>>>> [hidden email]
>>>>>> https://lists.mozilla.org/listinfo/dev-accessibility
>>>>
>>>> _______________________________________________
>>>> dev-accessibility mailing list
>>>> [hidden email]
>>>> https://lists.mozilla.org/listinfo/dev-accessibility
>>>>
>>
>
_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Firefox 4 beta 8 -> get_accChild() returns E_INVALIDARG

Alexander Surkov
In reply to this post by Alexander Surkov
You're right. As I said I filed bug
https://bugzilla.mozilla.org/show_bug.cgi?id=624648 for this issue.

Alex.


On Tue, Jan 11, 2011 at 3:57 PM, Sylvain WERDEFROY
<[hidden email]> wrote:

> The point is that the behaviour has changed between beta 6 ans 8.
> Could you check the get_accChild modifications ? Perhaps I am wrong...
>
> Sylvain
>
> Le 11 janv. 2011 à 08:45, Alexander Surkov
> <[hidden email]> a écrit :
>
>> Then here's a problem since they are 0-based in Firefox crossplatform layer.
>>
>>
>> On Tue, Jan 11, 2011 at 3:33 PM, Sylvain WERDEFROY
>> <[hidden email]> wrote:
>>> Not sure, but I think indices are 1-based. The zero value is CHILDID_SELF.
>>>
>>> Sylvain
>>>
>>> Le 11 janv. 2011 à 08:05, Alexander Surkov
>>> <[hidden email]> a écrit :
>>>
>>>> Hi, Sylvain.
>>>>
>>>> Indices are zero-based, though if 5th is BR then there's still a
>>>> problem. I'll take a look.
>>>>
>>>> Thank you.
>>>> Alex.
>>>>
>>>>
>>>> On Tue, Jan 11, 2011 at 2:56 PM, Sylvain <[hidden email]> wrote:
>>>>> Hi Alexander,
>>>>>
>>>>> Here is the html page: www.swsso.fr/demo/
>>>>>
>>>>> If you explore this page with a tool such as inspect32.exe (free
>>>>> Microsoft tool), you can see that the content window has 6 childs.
>>>>> The first 5 childs are <BR> objects.
>>>>> The 6th is a form object. Inspect32 succeeds getting this object
>>>>> because it uses accNavigate method.
>>>>>
>>>>> I would like to get this object with a simple loop form 1 to 6
>>>>> invoking the get_accChild() method:
>>>>> - 1 to 5 returns OK (<BR> objects).
>>>>> - 6 returns E_INVALID_ARG.
>>>>>
>>>>> Hope this helps.
>>>>>
>>>>> Thank you.
>>>>>
>>>>> Sylvain
>>>>>
>>>>> On 11 jan, 04:06, Alexander Surkov <[hidden email]> wrote:
>>>>>> Hi, Sylvain.
>>>>>>
>>>>>> I could suppose beta 6 and beta 8 expose different accessible trees
>>>>>> making your code fail. As David said we need a test case to see what
>>>>>> happens. I don't really think it's trivial as you assumed.
>>>>>>
>>>>>> Thank you.
>>>>>> Alex.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, Jan 10, 2011 at 10:08 PM, Sylvain <[hidden email]> wrote:
>>>>>>> Hi all,
>>>>>>
>>>>>>> This code was OK on beta 6, but fails on beta 8 (not tested on beta
>>>>>>> 7). This code simply tries to get the first child of an object:
>>>>>>
>>>>>>> hr=AccessibleObjectFromWindow(w,(DWORD)OBJID_CLIENT,IID_IAccessible,
>>>>>>> (void**)&pTopAccessible);
>>>>>>> hr=pTopAccessible->accNavigate(0x1009,vtStart,&vtResult); //
>>>>>>> NAVRELATION_EMBEDS = 0x1009
>>>>>>> pIDispatch=(IDispatch*)vtResult.lVal;
>>>>>>> hr=pIDispatch->QueryInterface(IID_IAccessible, (void**)&pAccessible);
>>>>>>> hr=pAccessible->get_accChildCount(&lCount);
>>>>>>> //  ==> value of lCount is 6 in my example
>>>>>>> vtChild.vt=VT_I4;
>>>>>>> vtChild.lVal=1;
>>>>>>> hr=pAccessible->get_accChild(vtChild,&pIDispatch); => hr=S_OK
>>>>>>> ...
>>>>>>> vtChild.lVal=6;
>>>>>>> hr=pAccessible->get_accChild(vtChild,&pIDispatch); => hr=E_INVALIDARG!
>>>>>>
>>>>>>> Do you have an idea? Not sure, but I guess there is a bug in the
>>>>>>> Firefox code: I suppose there is a test like this in the
>>>>>>> get_accChild() method:
>>>>>>> if (vtChild.lVal >= lCount) return E_INVALIDARG; // where lCount is
>>>>>>> the number of childs.
>>>>>>> As the childs are 1 based and not 0 based, the right code should be:
>>>>>>> if (vtChild.lVal > lCount) return E_INVALIDARG; // where lCount is the
>>>>>>> number of childs.
>>>>>>
>>>>>>> Thanks!
>>>>>>
>>>>>>> Sylvain
>>>>>>> _______________________________________________
>>>>>>> dev-accessibility mailing list
>>>>>>> [hidden email]
>>>>>>> https://lists.mozilla.org/listinfo/dev-accessibility
>>>>>
>>>>> _______________________________________________
>>>>> dev-accessibility mailing list
>>>>> [hidden email]
>>>>> https://lists.mozilla.org/listinfo/dev-accessibility
>>>>>
>>>
>
_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Firefox 4 beta 8 -> get_accChild() returns E_INVALIDARG

David Bolter-3
In reply to this post by sylvain.werdefroy
Sylvain,

Thanks very much for reporting this bug to us. Alexander has filed and
fixed! We'll let you know when the fix has landed in the nightly build.

Cheers,
David

On 11/01/11 1:56 AM, Sylvain wrote:

> Hi Alexander,
>
> Here is the html page: www.swsso.fr/demo/
>
> If you explore this page with a tool such as inspect32.exe (free
> Microsoft tool), you can see that the content window has 6 childs.
> The first 5 childs are<BR>  objects.
> The 6th is a form object. Inspect32 succeeds getting this object
> because it uses accNavigate method.
>
> I would like to get this object with a simple loop form 1 to 6
> invoking the get_accChild() method:
> - 1 to 5 returns OK (<BR>  objects).
> - 6 returns E_INVALID_ARG.
>
> Hope this helps.
>
> Thank you.
>
> Sylvain
>
> On 11 jan, 04:06, Alexander Surkov<[hidden email]>  wrote:
>> Hi, Sylvain.
>>
>> I could suppose beta 6 and beta 8 expose different accessible trees
>> making your code fail. As David said we need a test case to see what
>> happens. I don't really think it's trivial as you assumed.
>>
>> Thank you.
>> Alex.
>>
>>
>>
>>
>>
>>
>>
>> On Mon, Jan 10, 2011 at 10:08 PM, Sylvain<[hidden email]>  wrote:
>>> Hi all,
>>> This code was OK on beta 6, but fails on beta 8 (not tested on beta
>>> 7). This code simply tries to get the first child of an object:
>>> hr=AccessibleObjectFromWindow(w,(DWORD)OBJID_CLIENT,IID_IAccessible,
>>> (void**)&pTopAccessible);
>>> hr=pTopAccessible->accNavigate(0x1009,vtStart,&vtResult); //
>>> NAVRELATION_EMBEDS = 0x1009
>>> pIDispatch=(IDispatch*)vtResult.lVal;
>>> hr=pIDispatch->QueryInterface(IID_IAccessible, (void**)&pAccessible);
>>> hr=pAccessible->get_accChildCount(&lCount);
>>> //  ==>  value of lCount is 6 in my example
>>> vtChild.vt=VT_I4;
>>> vtChild.lVal=1;
>>> hr=pAccessible->get_accChild(vtChild,&pIDispatch); =>  hr=S_OK
>>> ...
>>> vtChild.lVal=6;
>>> hr=pAccessible->get_accChild(vtChild,&pIDispatch); =>  hr=E_INVALIDARG!
>>> Do you have an idea? Not sure, but I guess there is a bug in the
>>> Firefox code: I suppose there is a test like this in the
>>> get_accChild() method:
>>> if (vtChild.lVal>= lCount) return E_INVALIDARG; // where lCount is
>>> the number of childs.
>>> As the childs are 1 based and not 0 based, the right code should be:
>>> if (vtChild.lVal>  lCount) return E_INVALIDARG; // where lCount is the
>>> number of childs.
>>> Thanks!
>>> Sylvain
>>> _______________________________________________
>>> dev-accessibility mailing list
>>> [hidden email]
>>> https://lists.mozilla.org/listinfo/dev-accessibility
> _______________________________________________
> dev-accessibility mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-accessibility

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Firefox 4 beta 8 -> get_accChild() returns E_INVALIDARG

sylvain.werdefroy
In reply to this post by sylvain.werdefroy
Hi David,

You told me "We'll let you know when the fix has landed in the nightly
build". Il there any news?

Thanks!

Sylvain

On 11 jan, 16:04, David Bolter <[hidden email]> wrote:

> Sylvain,
>
> Thanks very much for reporting this bug to us. Alexander has filed and
> fixed! We'll let you know when the fix has landed in the nightly build.
>
> Cheers,
> David
>
> On 11/01/11 1:56 AM, Sylvain wrote:
>
>
>
> > Hi Alexander,
>
> > Here is the html page:www.swsso.fr/demo/
>
> > If you explore this page with a tool such as inspect32.exe (free
> > Microsoft tool), you can see that the content window has 6 childs.
> > The first 5 childs are<BR>  objects.
> > The 6th is a form object. Inspect32 succeeds getting this object
> > because it uses accNavigate method.
>
> > I would like to get this object with a simple loop form 1 to 6
> > invoking the get_accChild() method:
> > - 1 to 5 returns OK (<BR>  objects).
> > - 6 returns E_INVALID_ARG.
>
> > Hope this helps.
>
> > Thank you.
>
> > Sylvain
>
> > On 11 jan, 04:06, Alexander Surkov<[hidden email]>  wrote:
> >> Hi, Sylvain.
>
> >> I could suppose beta 6 and beta 8 expose different accessible trees
> >> making your code fail. As David said we need a test case to see what
> >> happens. I don't really think it's trivial as you assumed.
>
> >> Thank you.
> >> Alex.
>
> >> On Mon, Jan 10, 2011 at 10:08 PM, Sylvain<[hidden email]>  wrote:
> >>> Hi all,
> >>> This code was OK on beta 6, but fails on beta 8 (not tested on beta
> >>> 7). This code simply tries to get the first child of an object:
> >>> hr=AccessibleObjectFromWindow(w,(DWORD)OBJID_CLIENT,IID_IAccessible,
> >>> (void**)&pTopAccessible);
> >>> hr=pTopAccessible->accNavigate(0x1009,vtStart,&vtResult); //
> >>> NAVRELATION_EMBEDS = 0x1009
> >>> pIDispatch=(IDispatch*)vtResult.lVal;
> >>> hr=pIDispatch->QueryInterface(IID_IAccessible, (void**)&pAccessible);
> >>> hr=pAccessible->get_accChildCount(&lCount);
> >>> //  ==>  value of lCount is 6 in my example
> >>> vtChild.vt=VT_I4;
> >>> vtChild.lVal=1;
> >>> hr=pAccessible->get_accChild(vtChild,&pIDispatch); =>  hr=S_OK
> >>> ...
> >>> vtChild.lVal=6;
> >>> hr=pAccessible->get_accChild(vtChild,&pIDispatch); =>  hr=E_INVALIDARG!
> >>> Do you have an idea? Not sure, but I guess there is a bug in the
> >>> Firefox code: I suppose there is a test like this in the
> >>> get_accChild() method:
> >>> if (vtChild.lVal>= lCount) return E_INVALIDARG; // where lCount is
> >>> the number of childs.
> >>> As the childs are 1 based and not 0 based, the right code should be:
> >>> if (vtChild.lVal>  lCount) return E_INVALIDARG; // where lCount is the
> >>> number of childs.
> >>> Thanks!
> >>> Sylvain
> >>> _______________________________________________
> >>> dev-accessibility mailing list
> >>> [hidden email]
> >>>https://lists.mozilla.org/listinfo/dev-accessibility
> > _______________________________________________
> > dev-accessibility mailing list
> > [hidden email]
> >https://lists.mozilla.org/listinfo/dev-accessibility

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Firefox 4 beta 8 -> get_accChild() returns E_INVALIDARG

David Bolter-3
Oops.

The fix landed on on January 11 and should be in all subsequent ff4 nightly
and beta builds.

Thanks for the ping.

D
On Feb 1, 2011 11:24 AM, "Sylvain" <[hidden email]> wrote:

> Hi David,
>
> You told me "We'll let you know when the fix has landed in the nightly
> build". Il there any news?
>
> Thanks!
>
> Sylvain
>
> On 11 jan, 16:04, David Bolter <[hidden email]> wrote:
>> Sylvain,
>>
>> Thanks very much for reporting this bug to us. Alexander has filed and
>> fixed! We'll let you know when the fix has landed in the nightly build.
>>
>> Cheers,
>> David
>>
>> On 11/01/11 1:56 AM, Sylvain wrote:
>>
>>
>>
>> > Hi Alexander,
>>
>> > Here is the html page:www.swsso.fr/demo/
>>
>> > If you explore this page with a tool such as inspect32.exe (free
>> > Microsoft tool), you can see that the content window has 6 childs.
>> > The first 5 childs are<BR>  objects.
>> > The 6th is a form object. Inspect32 succeeds getting this object
>> > because it uses accNavigate method.
>>
>> > I would like to get this object with a simple loop form 1 to 6
>> > invoking the get_accChild() method:
>> > - 1 to 5 returns OK (<BR>  objects).
>> > - 6 returns E_INVALID_ARG.
>>
>> > Hope this helps.
>>
>> > Thank you.
>>
>> > Sylvain
>>
>> > On 11 jan, 04:06, Alexander Surkov<[hidden email]>  wrote:
>> >> Hi, Sylvain.
>>
>> >> I could suppose beta 6 and beta 8 expose different accessible trees
>> >> making your code fail. As David said we need a test case to see what
>> >> happens. I don't really think it's trivial as you assumed.
>>
>> >> Thank you.
>> >> Alex.
>>
>> >> On Mon, Jan 10, 2011 at 10:08 PM, Sylvain<[hidden email]>
 wrote:

>> >>> Hi all,
>> >>> This code was OK on beta 6, but fails on beta 8 (not tested on beta
>> >>> 7). This code simply tries to get the first child of an object:
>> >>> hr=AccessibleObjectFromWindow(w,(DWORD)OBJID_CLIENT,IID_IAccessible,
>> >>> (void**)&pTopAccessible);
>> >>> hr=pTopAccessible->accNavigate(0x1009,vtStart,&vtResult); //
>> >>> NAVRELATION_EMBEDS = 0x1009
>> >>> pIDispatch=(IDispatch*)vtResult.lVal;
>> >>> hr=pIDispatch->QueryInterface(IID_IAccessible, (void**)&pAccessible);
>> >>> hr=pAccessible->get_accChildCount(&lCount);
>> >>> //  ==>  value of lCount is 6 in my example
>> >>> vtChild.vt=VT_I4;
>> >>> vtChild.lVal=1;
>> >>> hr=pAccessible->get_accChild(vtChild,&pIDispatch); =>  hr=S_OK
>> >>> ...
>> >>> vtChild.lVal=6;
>> >>> hr=pAccessible->get_accChild(vtChild,&pIDispatch); =>
 hr=E_INVALIDARG!
>> >>> Do you have an idea? Not sure, but I guess there is a bug in the
>> >>> Firefox code: I suppose there is a test like this in the
>> >>> get_accChild() method:
>> >>> if (vtChild.lVal>= lCount) return E_INVALIDARG; // where lCount is
>> >>> the number of childs.
>> >>> As the childs are 1 based and not 0 based, the right code should be:
>> >>> if (vtChild.lVal>  lCount) return E_INVALIDARG; // where lCount is
the

>> >>> number of childs.
>> >>> Thanks!
>> >>> Sylvain
>> >>> _______________________________________________
>> >>> dev-accessibility mailing list
>> >>> [hidden email]
>> >>>https://lists.mozilla.org/listinfo/dev-accessibility
>> > _______________________________________________
>> > dev-accessibility mailing list
>> > [hidden email]
>> >https://lists.mozilla.org/listinfo/dev-accessibility
>
> _______________________________________________
> dev-accessibility mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-accessibility
_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Firefox 4 beta 8 -> get_accChild() returns E_INVALIDARG

sylvain.werdefroy
In reply to this post by sylvain.werdefroy
Just checked: was not OK on beta 9, but works fine on beta 10 :-)

Thanks David & Alexander,

Sylvain

On 1 fév, 17:46, david bolter <[hidden email]> wrote:

> Oops.
>
> The fix landed on on January 11 and should be in all subsequent ff4 nightly
> and beta builds.
>
> Thanks for the ping.
>
> D
> On Feb 1, 2011 11:24 AM, "Sylvain" <[hidden email]> wrote:
>
>
>
>
>
>
>
> > Hi David,
>
> > You told me "We'll let you know when the fix has landed in the nightly
> > build". Il there any news?
>
> > Thanks!
>
> > Sylvain
>
> > On 11 jan, 16:04, David Bolter <[hidden email]> wrote:
> >> Sylvain,
>
> >> Thanks very much for reporting this bug to us. Alexander has filed and
> >> fixed! We'll let you know when the fix has landed in the nightly build.
>
> >> Cheers,
> >> David
>
> >> On 11/01/11 1:56 AM, Sylvain wrote:
>
> >> > Hi Alexander,
>
> >> > Here is the html page:www.swsso.fr/demo/
>
> >> > If you explore this page with a tool such as inspect32.exe (free
> >> > Microsoft tool), you can see that the content window has 6 childs.
> >> > The first 5 childs are<BR>  objects.
> >> > The 6th is a form object. Inspect32 succeeds getting this object
> >> > because it uses accNavigate method.
>
> >> > I would like to get this object with a simple loop form 1 to 6
> >> > invoking the get_accChild() method:
> >> > - 1 to 5 returns OK (<BR>  objects).
> >> > - 6 returns E_INVALID_ARG.
>
> >> > Hope this helps.
>
> >> > Thank you.
>
> >> > Sylvain
>
> >> > On 11 jan, 04:06, Alexander Surkov<[hidden email]>  wrote:
> >> >> Hi, Sylvain.
>
> >> >> I could suppose beta 6 and beta 8 expose different accessible trees
> >> >> making your code fail. As David said we need a test case to see what
> >> >> happens. I don't really think it's trivial as you assumed.
>
> >> >> Thank you.
> >> >> Alex.
>
> >> >> On Mon, Jan 10, 2011 at 10:08 PM, Sylvain<[hidden email]>
>  wrote:
> >> >>> Hi all,
> >> >>> This code was OK on beta 6, but fails on beta 8 (not tested on beta
> >> >>> 7). This code simply tries to get the first child of an object:
> >> >>> hr=AccessibleObjectFromWindow(w,(DWORD)OBJID_CLIENT,IID_IAccessible,
> >> >>> (void**)&pTopAccessible);
> >> >>> hr=pTopAccessible->accNavigate(0x1009,vtStart,&vtResult); //
> >> >>> NAVRELATION_EMBEDS = 0x1009
> >> >>> pIDispatch=(IDispatch*)vtResult.lVal;
> >> >>> hr=pIDispatch->QueryInterface(IID_IAccessible, (void**)&pAccessible);
> >> >>> hr=pAccessible->get_accChildCount(&lCount);
> >> >>> //  ==>  value of lCount is 6 in my example
> >> >>> vtChild.vt=VT_I4;
> >> >>> vtChild.lVal=1;
> >> >>> hr=pAccessible->get_accChild(vtChild,&pIDispatch); =>  hr=S_OK
> >> >>> ...
> >> >>> vtChild.lVal=6;
> >> >>> hr=pAccessible->get_accChild(vtChild,&pIDispatch); =>
>  hr=E_INVALIDARG!
> >> >>> Do you have an idea? Not sure, but I guess there is a bug in the
> >> >>> Firefox code: I suppose there is a test like this in the
> >> >>> get_accChild() method:
> >> >>> if (vtChild.lVal>= lCount) return E_INVALIDARG; // where lCount is
> >> >>> the number of childs.
> >> >>> As the childs are 1 based and not 0 based, the right code should be:
> >> >>> if (vtChild.lVal>  lCount) return E_INVALIDARG; // where lCount is
> the
> >> >>> number of childs.
> >> >>> Thanks!
> >> >>> Sylvain
> >> >>> _______________________________________________
> >> >>> dev-accessibility mailing list
> >> >>> [hidden email]
> >> >>>https://lists.mozilla.org/listinfo/dev-accessibility
> >> > _______________________________________________
> >> > dev-accessibility mailing list
> >> > [hidden email]
> >> >https://lists.mozilla.org/listinfo/dev-accessibility
>
> > _______________________________________________
> > dev-accessibility mailing list
> > [hidden email]
> >https://lists.mozilla.org/listinfo/dev-accessibility

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility