Operating System - Linux
1827442 Members
6049 Online
109965 Solutions
New Discussion

Re: SIGABRT error from my application

 
SOLVED
Go to solution

libc.2 error from my application

Hi,

I have used the below machine & compiler for Qt installation.

Compiler aCC: HP ANSI C++ B3910B A.03.70
OS HP-UX B.11.11 U 9000/785 2015658734 unlimited-user license
Qt 3.3.7

and Qt is installed successfully with these :

./configure -platform hpux-acc-64 -thread stl -qt-zlib

Now my application is not running I edited it with the debug option and try to debug from wdb.
It tells

main (argc=0, argv=0x800003ffff7f0b10) at /home/pushpa/BViewNG/Test/BViewNG_3.3.2/Viewer/main.cpp:125

Program received signal SIGABRT, Aborted
si_code: 0 - .
0x800003fffdae628c in kill+0x2c () from /usr/lib/pa20_64/libc.2

Could you please help me with this.

Thanks and Regards,
Pushpa.
9 REPLIES 9
Dennis Handly
Acclaimed Contributor
Solution

Re: SIGABRT error from my application

This is the standard way a process that calls abort(3) terminates. You need a full stack trace.

Re: libc.2 error from my application

Hi Dennis Handly,

This is the full stack trace I found out :


Detected 64-bit executable.
Invoking /opt/langtools/bin/gdb64.
HP gdb 5.4.0 for PA-RISC 2.0 (wide), HP-UX 11.00
and target hppa2.0w-hp-hpux11.00.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 5.4.0 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
..Reading symbols from bviewng...
Reading symbols from /home/pushpa/BViewNG/Test/BViewNG_3.3.2/bin/bviewng...done.

Breakpoint 2 at 0x40000000001bd3e0: file /home/pushpa/BViewNG/Test/BViewNG_3.3.2/Viewer/main.cpp, line 109 from

/home/pushpa/BViewNG/Test/BViewNG_3.3.2/bin/bviewng.
Starting program: /home/pushpa/BViewNG/Test/BViewNG_3.3.2/bin/bviewng
Reading symbols from /usr/lib/pa20_64/dld.sl...Reading symbols from /usr/lib/pa20_64/libm.2...Reading symbols from

/home/vikram/TestBview/BViewNG_3.3.2/lib/libBViewNGBitmap.sl...Reading symbols from

/home/vikram/TestBview/BViewNG_3.3.2/lib/libBViewNGProductSpec.sl...Reading symbols from

/home/vikram/TestBview/BViewNG_3.3.2/lib/libBViewNGIbx.sl...Reading symbols from

/home/vikram/TestBview/BViewNG_3.3.2/lib/libBViewNGDatabase.sl...Reading symbols from

/home/vikram/TestBview/BViewNG_3.3.2/lib/libBViewNGSupport.sl...Reading symbols from

/home/vikram/TestBview/BViewNG_3.3.2/lib/libBViewNGGuiTools.sl...Reading symbols from

/home/vikram/TestBview/BViewNG_3.3.2/lib/libBViewNGScrambling.sl...Reading symbols from

/home/vikram/TestBview/BViewNG_3.3.2/lib/libBViewNGAnalysis.sl...Reading symbols from

/home/vikram/TestBview/BViewNG_3.3.2/lib/libBViewNGScriptEngine.sl...Reading symbols from

/home/vikram/TestBview/BViewNG_3.3.2/lib/libBViewNGConverterInput.sl...Reading symbols from

/home/vikram/TestBview/BViewNG_3.3.2/lib/libBViewNGConverterOutput.sl...Reading symbols from

/home/vikram/TestBview/BViewNG_3.3.2/lib/libBViewNGBMCompress.sl...Reading symbols from

/usr/local/qt/QT64/lib/libqt-mt.3...Reading symbols from /usr/lib/X11R6/pa20_64/libXext.3...Reading symbols from

/usr/lib/X11R6/pa20_64/libX11.3...Reading symbols from /usr/lib/pa20_64/libstd_v2.2...Reading symbols from

/usr/lib/pa20_64/libCsup_v2.2...Reading symbols from /usr/lib/pa20_64/libcl.2...Reading symbols from

/usr/lib/pa20_64/libc.2...Reading symbols from /usr/lib/pa20_64/libdl.1...Reading symbols from /lib/pa20_64/libSM.2...Reading

symbols from /lib/pa20_64/libICE.2...Reading symbols from /lib/pa20_64/libpthread.1...main (argc=0, argv=0x800003ffff7f0b10)

at /home/pushpa/BViewNG/Test/BViewNG_3.3.2/Viewer/main.cpp:109
Reading symbols from /usr/local/qt/QT64/plugins/imageformats/libqjpeg.sl...Reading symbols from

/usr/local/qt/QT64/plugins/imageformats/libqmng.sl...BMapApplication::showSplash (this=0x0) at

/home/pushpa/BViewNG/Test/BViewNG_3.3.2/Viewer/bmapapp.cpp:202
main (argc=0, argv=0x800003ffff7f0b10) at /home/pushpa/BViewNG/Test/BViewNG_3.3.2/Viewer/main.cpp:125

Program received signal SIGABRT, Aborted
si_code: 0 - .
0x800003fffdae628c in kill+0x2c () from /usr/lib/pa20_64/libc.2
Reading symbols from /home/pushpa/BViewNG/Test/BViewNG_3.3.2/bin/bviewng...done.


Thanks and Regards,
Pushpa.
Dennis Handly
Acclaimed Contributor

Re: SIGABRT error from my application

>This is the full stack trace I found out:

Please try again. Use the "bt" command. I see something like a stacktrace but it should look like #0... #1... and back to main or the thread start.

Re: libc.2 error from my application

Hi Dennis,
I did bt and this is the error stacktrace :


(gdb) bt
#0 0x800003fffdae628c in kill+0x2c () from /usr/lib/pa20_64/libc.2
#1 0x800003fffda9576c in raise+0x2c () from /usr/lib/pa20_64/libc.2
#2 0x800003fffdaca9e0 in abort_C+0x180 () from /usr/lib/pa20_64/libc.2
#3 0x800003fffdacaa44 in abort+0x1c () from /usr/lib/pa20_64/libc.2
#4 0x800003fffdcb5ddc in std::terminate+0x3c ()
from /usr/lib/pa20_64/libCsup_v2.2
#5 0x800003fffdcb6bd8 in ThrowException+0xd0 ()
from /usr/lib/pa20_64/libCsup_v2.2
#6 0x800003fffdcb6420 in __throw__FPvT1+0x158 ()
from /usr/lib/pa20_64/libCsup_v2.2
#7 0x40000000001c024c in std::basic_string,std::all
ocator>::replace (this=0x8000000100001a20, pos1=9223372041149749848,
__n1=9223372041149749904, cs=0x8000000100001ac8 "",
cslen=9223372041149750144, pos2=9223372041149750216,
__n2=9223372041149752496) at /opt/aCC/include_std/string.cc:400
#8 0x800003ffff31d2b4 in ScriptEngine::VariableString::VariableString+0xdc ()
from /home/vikram/TestBview/BViewNG_3.3.2/lib/libBViewNGScriptEngine.sl
#9 0x800003ffff341918 in ScriptEngine::ScriptEngine+0x1600 ()
from /home/vikram/TestBview/BViewNG_3.3.2/lib/libBViewNGScriptEngine.sl
#10 0x40000000001c1d40 in MainWindow::MainWindow (this=0x8000000100174f88)
at mainwindow.cpp:289
#11 0x40000000001bd480 in main (argc=0, argv=0xc00000000000ae5b)
at main.cpp:125
(gdb)


Could you please help me further as I am new to this.

Thanks and Regards,
Pushpa.
Dennis Handly
Acclaimed Contributor

Re: SIGABRT error from my application

>I did bt and this is the error stacktrace:

Thanks, this is more helpful.

#4 0x800003fffdcb5ddc in std::terminate+0x3c /usr/lib/pa20_64/libCsup_v2.2
#6 0x800003fffdcb6420 in __throw__FPvT1+0x158 /usr/lib/pa20_64/libCsup_v2.2
#7 0x40000000001c024c in std::basic_string,std::allocator>::replace

1) You are using threads and you didn't compile EVERYTHING with -mt.

2) Of course there are other things string::replace can throw, depending on the parms:
x.replace(large1, large2, "", large3, large4, large5)

If you look at string.cc:400 it appears you don't have the -mt case but your parms are bad so it is throwing out_of_range. Either gdb is broken and printing addresses instead of values or you have bad parms. You could compile with +d to prevent inlining so you can see what you are calling.

Re: libc.2 error from my application

Hi Thanks,

I hv updated compilation with the options -mt and +d, even now i get the same error, this application in windows works , I am not getting anything about this in unix.

In windows the statment
MainWindow *mw = new MainWindow;

allocates memory and goes to the constructor, here i cannot makeout the allocation of memory or initialization.

Could you please help me further in debugging this please.

Pushpa
Dennis Handly
Acclaimed Contributor

Re: SIGABRT error from my application

>I hv updated compilation with the options -mt and +d, even now I get the same error,

Are you sure you have the same number of frames and the same functions? Did you recompile libBViewNGScriptEngine.sl?

Your MainWindow constructor was calling the ScriptEngine constructor, which is calling the
ScriptEngine::VariableString constructor which was calling string::replace.

Do you have libBViewNGScriptEngine.sl compiled with -mt, -g and +d?

Re: libc.2 error from my application

Hi,
I checked with the library file it is compiled with -g, -mt,+d and I get this stracktrace :

(gdb) bt
#0 0x800003fffd95c28c in kill+0x2c () from /usr/lib/pa20_64/libc.2
#1 0x800003fffd90b76c in raise+0x2c () from /usr/lib/pa20_64/libc.2
#2 0x800003fffd9409e0 in abort_C+0x180 () from /usr/lib/pa20_64/libc.2
#3 0x800003fffd940a44 in abort+0x1c () from /usr/lib/pa20_64/libc.2
#4 0x800003fffdb49ddc in std::terminate+0x3c () from /usr/lib/pa20_64/libCsup_v2.2
#5 0x800003fffdb4abd8 in ThrowException+0xd0 () from /usr/lib/pa20_64/libCsup_v2.2
#6 0x800003fffdb4a420 in __throw__FPvT1+0x158 () from /usr/lib/pa20_64/libCsup_v2.2
#7 0x4000000000216a70 in std::basic_string,std::allocator>::replace (this=0x800003ffff16e8c8, pos1=9223372041150662016, __n1=9223372041151735776, cs=0x0, cslen=9223372041151735640, pos2=9223372041151735640, __n2=9223372041151735616) at /opt/aCC/include_std/string.cc:400
#8 0x4000000000216920 in std::basic_string,std::allocator>::replace (this=0x80000001000d9f98, __pos=9223376434892836880, __n1=9223376434892836872, __s=0x800003ffff7f0fa0 "", __n2=4597923019065655296) at /opt/aCC/include_std/string:685
#9 0x40000000002624a8 in std::basic_string,std::allocator>::replace (this=0x80000001000d9f98, __pos=9223376434892836880, __n=9223376434892836872, __s=0x800003ffff7f0fa0 "") at /opt/aCC/include_std/string:689
#10 0x800003ffff24d348 in ScriptEngine::VariableString::VariableString (this=0x80000001000d9f98, name=@0x800003ffff7f1010, val=@0x800003ffff7f1008) at /home/pushpa/BViewNG/TestBViewNG/BViewNG_3.3.2/ScriptEngine/scriptEngine_variables.cpp:959
#11 0x800003ffff27c01c in ScriptEngine::Function_getDBKey::Function_getDBKey (this=0x80000001000d9f88) at scriptEngine.h:666
#12 0x800003ffff2686a8 in ScriptEngine::ScriptEngine (this=0x800000010013dfe0, parent=0x0) at scriptEngine.y:482
#13 0x4000000000217ce4 in MainWindow::MainWindow (this=0x800000010013ddc8) at /home/pushpa/BViewNG/TestBViewNG/BViewNG_3.3.2/Viewer/mainwindow.cpp:289
#14 0x4000000000214520 in main (argc=0, argv=0x800003ffff7f0b60) at /home/pushpa/BViewNG/TestBViewNG/BViewNG_3.3.2/Viewer/main.cpp:125
Single stepping until exit from function kill,
which has no line number information.

Program terminated with signal SIGABRT, Aborted.
The program no longer exists.
Dennis Handly
Acclaimed Contributor

Re: SIGABRT error from my application

>I checked with the library file it is compiled with -g, -mt,+d

Ok, you need to look at the string::replace call in frame 10, scriptEngine_variables.cpp:959 and check the parms.
What was the VariableString trying to do??
Then go to frame 9 and see why __pos, __n and __s seem to have bad values.