Discussion:
Segmentation fault
chethana hegde
2008-02-28 10:51:13 UTC
Permalink
Hi benny,
I have built pjsua statically and running it on arm target ,
I am able to build it successfully ,but while running on arm target getting Segmentation fault, without showing where exactly is the problem.
What is the reson for such error?

Can anybody help me please....
when run on target ./pjsua-arm-unknown-linux-gnu it shows the window but comes out of application immediately showing Segmentation Fault

+=============================================================================+
| Call Commands: | Buddy, IM & Presence: | Account: |
| | | |
| m Make new call | +b Add new buddy .| +a Add new accnt |
| M Make multiple calls | -b Delete buddy | -a Delete accnt. |
| a Answer call | i Send IM | !a Modify accnt. |
| h Hangup call (ha=all) | s Subscribe presence | rr (Re-)register |
| H Hold call | u Unsubscribe presence | ru Unregister |
| v re-inVite (release hold) | t ToGgle Online status | > Cycle next ac.|
| U send UPDATE | T Set online status | < Cycle prev ac.|
| ],[ Select next/prev call +--------------------------+-------------------+
| x Xfer call | Media Commands: | Status & Config: |
| X Xfer with Replaces | | |
| # Send RFC 2833 DTMF | cl List ports | d Dump status |
| * Send DTMF with INFO | cc Connect port | dd Dump detailed |
| dq Dump curr. call quality | cd Disconnect port | dc Dump config |
| | V Adjust audio Volume | f Save config |
| S Send arbitrary REQUEST | Cp Codec priorities | f Save config |
+------------------------------+--------------------------+-------------------+
| q QUIT sleep N: console sleep for N ms n: detect NAT type |
+=============================================================================+
You have 0 active call
Segmentation fault
#

Thanks in advance
Chethana








---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
Benny Prijono
2008-02-29 10:50:04 UTC
Permalink
Post by chethana hegde
Hi benny,
I have built pjsua statically and running it on arm target ,
I am able to build it successfully ,but while running on arm target getting
Segmentation fault, without showing where exactly is the problem.
What is the reson for such error?
It's quite hard to know without any details. Did the segfault happen
immediately after console menu is printed, or after few seconds, or
after some other events (incoming call, perhaps)?

Which pjsua version is this? What's your ./configure flags? And the
content of config_site.h?

cheers,
-benny
Post by chethana hegde
Can anybody help me please....
when run on target ./pjsua-arm-unknown-linux-gnu it shows the window but
comes out of application immediately showing Segmentation Fault
+=============================================================================+
|
| | |
|
| m Make new call | +b Add new buddy .| +a Add new accnt |
| M Make multiple calls | -b Delete buddy | -a Delete accnt. |
| a Answer call | i Send IM | !a Modify accnt. |
| h Hangup call (ha=all) | s Subscribe presence | rr
(Re-)register |
| H Hold call | u Unsubscribe presence | ru Unregister
|
| v re-inVite (release hold) | t ToGgle Online status | > Cycle next ac.|
| U send UPDATE | T Set online status | < Cycle prev ac.|
| ],[ Select next/prev call
+--------------------------+-------------------+
| x Xfer call | Media Commands: | Status & Config: |
| X Xfer with Replaces | |
|
| # Send RFC 2833 DTMF | cl List ports | d Dump status
|
| * Send DTMF with INFO | cc Connect port | dd Dump detailed |
| dq Dump curr. call quality | cd Disconnect port | dc Dump config
|
| | V Adjust audio Volume | f Save config
|
| S Send arbitrary REQUEST | Cp Codec priorities | f Save config
|
+------------------------------+--------------------------+-------------------+
| q QUIT sleep N: console sleep for N ms n: detect NAT type
|
+=============================================================================+
You have 0 active call
Post by chethana hegde
Segmentation fault
#
Thanks in advance
Chethana
chethana hegde
2008-03-01 07:56:00 UTC
Permalink
Hi benny,
Segmentation fault is happening immediately after console menu is printed and the application exits without even waiting for any input such as (m or i...)

I am using 1788 version pjsua and this is the ./configure command iam using
CC=arm-linux-gcc ./configure --host=arm-linux
make dep && make

I have not created config_site.h file , there is one config_site_sample.h file ,but no settings for arm or linux,i find only for symbian and windows.

What are the things i have to set for arm and linux in config_sit.h

Thanks for responding ,waiting for ur suggestions
Chethana


---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
Benny Prijono
2008-03-01 08:52:27 UTC
Permalink
Post by chethana hegde
Hi benny,
Segmentation fault is happening immediately after console menu is printed
and the application exits without even waiting for any input such as (m or
i...)
I am using 1788 version pjsua and this is the ./configure command iam using
CC=arm-linux-gcc ./configure --host=arm-linux
make dep && make
The ./configure settings will be very much system dependent of course,
so if that works for your ARM then good. Others may find the need to
fine tune the command, for example:

./aconfigure --host=arm-linux CFLAGS='-nostdinc -msoft-float -I/arm/libc/path'

or something like that. FYI when you specify CFLAGS like this, you'll
need to use aconfigure script instead of configure script.
Post by chethana hegde
I have not created config_site.h file , there is one config_site_sample.h
file ,but no settings for arm or linux,i find only for symbian and windows.
Okay.
Post by chethana hegde
What are the things i have to set for arm and linux in config_sit.h
It's highly system specific, so I can't suggest anything that would
guarantee to work on your ARM. But as a matter of problem elimination
process, you can try these:

- Run without echo canceller
$ pjsua --ec-tail=0

- Run without sound device
$ pjsua --null-audio

- Disable floating point
$ ./aconfigure --disable-floating-point
or put in config_site.h:
#define PJ_HAS_FLOATING_POINT 0

- Disable all codecs except g711
$ ./aconfigure --disable-gsm-codec --disable-speex-codec --disable-ilbc-codec

- Disable sound
$ ./aconfigure --disable-sound

And of course combinations of those settings. Please let me know which
ones work for you.

cheers,
-benny
Post by chethana hegde
Thanks for responding ,waiting for ur suggestions
Chethana
chethana hegde
2008-03-03 10:16:55 UTC
Permalink
Hi benny,
Here is the result of the combinations that u had suggested....but facing same problem..
Could u please help

1>$./configure --disable-floating-point
vbr.c:(.text+0x1a4): undefined reference to `logf'
vbr.c:(.text+0x268): undefined reference to `pow'
vbr.c:(.text+0x424): undefined reference to `log'
vbr.c:(.text+0x494): undefined reference to `log'
vbr.c:(.text+0x4a8): undefined reference to `log'
vbr.c:(.text+0x660): undefined reference to `logf'
vbr.c:(.text+0x67c): undefined reference to `logf'
vbr.c:(.text+0x6ec): undefined reference to `log'
vbr.c:(.text+0x700): undefined reference to `log'
vbr.c:(.text+0x79c): undefined reference to `log'
vbr.c:(.text+0x7b0): undefined reference to `log'
/home/pjsip_1/trunk/third_party/lib/libspeex-arm-unknown-linux-gnu.a(fftwrap.o): In function `spx_ifft_float':
fftwrap.c:(.text+0xac): undefined reference to `floor'
/home/pjsip_1/trunk/third_party/lib/libspeex-arm-unknown-linux-gnu.a(fftwrap.o): In function `spx_fft_float':
fftwrap.c:(.text+0x29c): undefined reference to `floor'
/home/pjsip_1/trunk/third_party/lib/libilbccodec-arm-unknown-linux-gnu.a(StateConstructW.o): In function `StateConstructW':
StateConstructW.c:(.text+0x40): undefined reference to `pow'
/home/pjsip_1/trunk/third_party/lib/libilbccodec-arm-unknown-linux-gnu.a(StateSearchW.o): In function `StateSearchW':
StateSearchW.c:(.text+0x30c): undefined reference to `log10f'
StateSearchW.c:(.text+0x360): undefined reference to `pow'
/home/pjsip_1/trunk/third_party/lib/libilbccodec-arm-unknown-linux-gnu.a(doCPLC.o): In function `compCorr':
doCPLC.c:(.text+0xd8): undefined reference to `sqrtf'
doCPLC.c:(.text+0xe8): undefined reference to `sqrtf'
/home/pjsip_1/trunk/third_party/lib/libilbccodec-arm-unknown-linux-gnu.a(doCPLC.o): In function `doThePLC':
doCPLC.c:(.text+0x31c): undefined reference to `sqrtf'
doCPLC.c:(.text+0x4dc): undefined reference to `sqrt'
/home/pjsip_1/trunk/third_party/lib/libilbccodec-arm-unknown-linux-gnu.a(enhancer.o): In function `smath':
enhancer.c:(.text+0x8fc): undefined reference to `cosf'
enhancer.c:(.text+0xa8c): undefined reference to `sqrtf'
enhancer.c:(.text+0xb74): undefined reference to `sqrtf'
/home/pjsip_1/trunk/third_party/lib/libilbccodec-arm-unknown-linux-gnu.a(enhancer.o): In function `enhancerInterface':
enhancer.c:(.text+0x103c): undefined reference to `sqrtf'
enhancer.c:(.text+0x105c): undefined reference to `sqrtf'
/home/pjsip_1/trunk/third_party/lib/libilbccodec-arm-unknown-linux-gnu.a(lsf.o): In function `lsf2a':
lsf.c:(.text+0x12c): undefined reference to `cosf'
lsf.c:(.text+0x14c): undefined reference to `cosf'
/home/pjsip_1/trunk/third_party/lib/libilbccodec-arm-unknown-linux-gnu.a(lsf.o): In function `a2lsf':
lsf.c:(.text+0x55c): undefined reference to `cosf'
/home/pjsip_1/trunk/third_party/lib/libportaudio-arm-unknown-linux-gnu.a(pa_unix_util.o): In function `PaUnixThread_New':
pa_unix_util.c:(.text+0x710): undefined reference to `floor'
pa_unix_util.c:(.text+0x724): undefined reference to `floor'
/home/pjsip_1/trunk/third_party/lib/libportaudio-arm-unknown-linux-gnu.a(pa_unix_oss.o): In function `OpenStream':
pa_unix_oss.c:(.text+0x296c): undefined reference to `ceil'
collect2: ld returned 1 exit status
make[2]: *** [../bin/pjsua-arm-unknown-linux-gnu] Error 1
make[2]: Leaving directory `/home/pjsip_1/trunk/pjsip-apps/build'make[1]: *** [pjsua] Error 2
make[1]: Leaving directory `/home/pjsip_1/trunk/pjsip-apps/build'make: *** [all] Error 1

2>./configure --disable-gsm-codec --disable-speex-codec --disable-ilbc-codec
/home/pjsip_1/trunk/pjmedia/lib/libpjmedia-arm-unknown-linu x-gnu.a(echo_common.o):(.data+0x14): undefined reference to `speex_aec_cr eate'
/home/pjsip_1/trunk/pjmedia/lib/libpjmedia-arm-unknown-linu x-gnu.a(echo_common.o):(.data+0x18): undefined reference to `speex_aec_de stroy'
/home/pjsip_1/trunk/pjmedia/lib/libpjmedia-arm-unknown-linu x-gnu.a(echo_common.o):(.data+0x1c): undefined reference to `speex_aec_pl ayback'
/home/pjsip_1/trunk/pjmedia/lib/libpjmedia-arm-unknown-linu x-gnu.a(echo_common.o):(.data+0x20): undefined reference to `speex_aec_ca pture'
/home/pjsip_1/trunk/pjmedia/lib/libpjmedia-arm-unknown-linu x-gnu.a(echo_common.o):(.data+0x24): undefined reference to `speex_aec_ca ncel_echo'
collect2: ld returned 1 exit status
make[2]: *** [../bin/pjsua-arm-unknown-linux-gnu] Error 1
make[2]: Leaving directory `/home/pjsip_1/trunk/pjsip-apps/ build'
make[1]: *** [pjsua] Error 2
make[1]: Leaving directory `/home/pjsip_1/trunk/pjsip-apps/ build'
make: *** [all] Error 1

3>./configure --disable-sound
Compilation and built was proper but while running on arm target iam facing the same problem(Segmentation fault).

Also tried running with these option
./pjsua --ec-tail=0
and
./pjsua --null-audio
but same error ...
What could be wrong. Is anything related to threads causing this...
Please suggest ...

Thanks
Chethana




---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
Benny Prijono
2008-03-03 16:30:51 UTC
Permalink
Post by chethana hegde
What could be wrong. Is anything related to threads causing this...
Please suggest ...
Okay, try

./aconfigure --disable-gsm-codec --disable-speex-codec
--disable-ilbc-codec --disable-speex-aec --disable-sound
--disable-floating-point

cheers,
-benny

Loading...