pjsua_enum_snd_dev() access violation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The fix came to me yesterday...I made m_DevInfos static, and it all 
worked :P

note to self: pointers + nonstatic members = pain. lots of pain.


--
Alister

nanang izzuddin wrote:
> Oops.. sorry..
> It seems the problem is not the case I predicted before.
>
> nanang
>
>
> On 20/12/2007, *Alister Brenton* < uaf_brenton at concsols.com 
> <mailto:uaf_brenton at concsols.com>> wrote:
>
>     Right before it fires:
>
>     ? pjmedia_snd_get_dev_info returned 0x009e4d90 info {name=0x009e4d90
>     "Microsoft Sound Mapper - Input" input_count=2 output_count=0 ...}
>     const
>     pjmedia_snd_dev_info *
>     + &info 0x00126ea4 pjmedia_snd_dev_info * *
>     + &info[i] 0x00001580 {name=0x00001580 <Bad Ptr> input_count=???
>     output_count=??? ...} pjmedia_snd_dev_info *
>     + *ci {name=0x009e4d90 "Microsoft Sound Mapper - Input" input_count=2
>     output_count=0 ...} const pjmedia_snd_dev_info
>     + ci 0x009e4d90 info {name=0x009e4d90 "Microsoft Sound Mapper -
>     Input"
>     input_count=2 output_count=0 ...} const pjmedia_snd_dev_info *
>     i 0 unsigned int
>
>
>
>     --
>     Alister
>
>     nanang izzuddin wrote:
>     > Hi,
>     > could you give a bit detail of the condition of variables right
>     before
>     > executing that line?
>     > I guess the "ci" is NULL.
>     >
>     > nanang
>     >
>     >
>     > On 20/12/2007, * Alister Brenton* <uaf_brenton at concsols.com
>     <mailto:uaf_brenton at concsols.com>
>     > <mailto:uaf_brenton at concsols.com
>     <mailto:uaf_brenton at concsols.com>>> wrote:
>     >
>     >     Hi, just did a step by step trace - it fails in
>     pjsua_media.c line
>     >     1633:
>     >
>     >     pj_memcpy(&info[i], ci, sizeof(*ci));
>     >
>     >
>     >     --
>     >     Alister
>     >
>     >     nanang izzuddin wrote:
>     >     > Hi Alister,
>     >     >
>     >     > One possibility is there is no sound card or port audio
>     failed to
>     >     > enumerate one.
>     >     > In this case, it may be caused by signed to unsigned
>     conversion in
>     >     > pjsua_enum_snd_devs():
>     >     >
>     >     > unsigned i, dev_count;
>     >     > dev_count = pjmedia_snd_get_dev_count();
>     >     > if (dev_count > *count) dev_count = *count;
>     >     >
>     >     > I think you can check that by trace step-by-step into that
>     function.
>     >     >
>     >     > nanang
>     >     >
>     >     >
>     >     > On 20/12/2007, *Alister Brenton* <
>     uaf_brenton at concsols.com <mailto:uaf_brenton at concsols.com>
>     >     <mailto:uaf_brenton at concsols.com
>     <mailto:uaf_brenton at concsols.com>>
>     >     > <mailto:uaf_brenton at concsols.com
>     <mailto:uaf_brenton at concsols.com>
>     >     <mailto:uaf_brenton at concsols.com
>     <mailto:uaf_brenton at concsols.com>>>> wrote:
>     >     >
>     >     > //in spctl.h
>     >     > pjmedia_snd_dev_info m_DevInfos[255];
>     >     >
>     >     >
>     >     >
>     >     > //in sipctl.cpp
>     >     > int CSipCtl::GetNumSoundDevs()
>     >     > {
>     >     > unsigned int result = 255;
>     >     > pj_status_t status;
>     >     > status = pjsua_enum_snd_devs(m_DevInfos,&result); // this line
>     >     > fails! :O
>     >     > if(status)
>     >     > {
>     >     > return -1;
>     >     > }
>     >     > return result;
>     >     > }
>     >     >
>     >     > The problem I'm having is when I set count to anything
>     other than
>     >     > zero,
>     >     > I get an access violation in memcpy.asm - I've tried the usual
>     >     > suspects
>     >     > (checking pointers etc) but no luck - any ideas?
>     >     >
>     >     >
>     >     > _______________________________________________
>     >     > Visit our blog: http://blog.pjsip.org
>     >     >
>     >     > pjsip mailing list
>     >     > pjsip at lists.pjsip.org <mailto:pjsip at lists.pjsip.org>
>     <mailto:pjsip at lists.pjsip.org <mailto:pjsip at lists.pjsip.org>> <mailto:
>     >     pjsip at lists.pjsip.org <mailto:pjsip at lists.pjsip.org>
>     <mailto:pjsip at lists.pjsip.org <mailto:pjsip at lists.pjsip.org>>>
>     >     >
>     http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>     <http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org>
>     >     >
>     >     >
>     >     >
>     >    
>     ------------------------------------------------------------------------
>     >
>     >     >
>     >     > _______________________________________________
>     >     > Visit our blog: http://blog.pjsip.org
>     >     >
>     >     > pjsip mailing list
>     >     > pjsip at lists.pjsip.org <mailto:pjsip at lists.pjsip.org>
>     <mailto:pjsip at lists.pjsip.org <mailto:pjsip at lists.pjsip.org>>
>     >     >
>     http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>     <http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org>
>     >     >
>     >
>     >
>     >
>     >     _______________________________________________
>     >     Visit our blog: http://blog.pjsip.org
>     >
>     >     pjsip mailing list
>     >     pjsip at lists.pjsip.org <mailto:pjsip at lists.pjsip.org>
>     <mailto:pjsip at lists.pjsip.org <mailto:pjsip at lists.pjsip.org>>
>     >     http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>     >
>     >
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > Visit our blog: http://blog.pjsip.org
>     >
>     > pjsip mailing list
>     > pjsip at lists.pjsip.org <mailto:pjsip at lists.pjsip.org>
>     > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>     >
>
>
>
>     _______________________________________________
>     Visit our blog: http://blog.pjsip.org
>
>     pjsip mailing list
>     pjsip at lists.pjsip.org <mailto:pjsip at lists.pjsip.org>
>     http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>     <http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>   





[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux