I have ported some native code to android and in the run time I am getting the error
A/libc(7857): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)
But I am not able to find out which part of my code is throwing this error
How to have these error deatils in android ndk
ndk-stack from the Android-NDK is the tool to run on the logcat output, this may give a complete stack trace if you are lucky
ndk-stack -sym <path> [-dump <path>]
-sym Contains full path to the root directory for symbols.
-dump Contains full path to the file containing the crash dump.
This is an optional parameter. If ommited, ndk-stack will
read input data from stdin
See docs/NDK-STACK.html in your NDK installation tree for more details.
so you probably want to run
logcat | ndk-stack -sym <the symbol file from your project>
As mentioned above, use ndk-stack. A good guide can be found here.
Related
Trying to run Android sample 'Events and Actions' downloaded from https://allseenalliance.org/framework/download
Downloaded 'Core SDK - debug' which has sample eventaction and .apk in bin folder.
Installed it, but doesn't work. Is anyone able to run it?
Edit: Exception in the Logcat:
08-29 09:06:16.978 29314 29328 E AndroidRuntime: Process: org.allseen.sample.eventaction, PID: 29314
08-29 09:06:16.978 29314 29328 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__exidx_end" referenced by "/data/app/org.allseen.sample.eventaction-1/lib/arm/libMyAllJoynCode.so"...
I have tried building the library MyAllJoynCode.so using Android ndk, but I couldn't able to build it. I get below exception
root#jay-dev:~/alljoyn/core/alljoyn/alljoyn_core/samples/eventaction/Android# ndk-build
[arm64-v8a] Compile++ : MyAllJoynCode <= AndroidJNIBridge.cc
In file included from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/qcc/atomic.h:30:0,
from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/qcc/ManagedObj.h:38,
from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/alljoyn/Message.h:30,
from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/alljoyn/AuthListener.h:32,
from /root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/alljoyn/BusAttachment.h:34,
from jni/event/AndroidJNIBridge.cc:19:
/root/alljoyn/core/alljoyn/build/linux/x86_64/debug/dist/cpp/inc/qcc/posix/atomic.h:30:25: fatal error: sys/atomics.h: No such file or directory
#include
^
compilation terminated.
/root/android-ndk-r12b/android-ndk-r12b/build/core/build-binary.mk:474: recipe for target 'obj/local/arm64-v8a/objs/MyAllJoynCode/event/AndroidJNIBridge.o' failed
make: *** [obj/local/arm64-v8a/objs/MyAllJoynCode/event/AndroidJNIBridge.o] Error 1
It looks like you were using Android NDK level 20 (or later).
The NDK's android-20 platform directory no longer contains the atomics.h file (they removed it), which caused the AllJoyn build failure you saw:
dist/cpp/inc/qcc/posix/atomic.h:30:25: fatal error: sys/atomics.h: No such file or directory
Prior to AllJoyn release 16.10, a workaround is simply to copying the NDK's android-19 atomics.h file to its android-20 (or later) platform directory.
However, the AllJoyn-related issue has been fixed as of September 2016 (i.e. no longer dependent on atomics.h), and the fix is included in AllJoyn release 16.10.
More information is provided in JIRA https://jira.allseenalliance.org/browse/ASACORE-3216
I am trying to compile a .f Fortran code with Eclipse. I have tried both of the below methods from the Eclipse help site:
Starting a Project with an Auto-Generated Makefile
Starting a Project with a Hand-Written Makefile
However, Eclipse gives multiple different errors... Here are some of the errors:
DIMENSION DDDJ(0:IG,-1:JG)
1
Error: Non-numeric character in statement label at (1)
../Main1.f:16.5:
DIMENSION DDDJ(0:IG,-1:JG)
1
Error: Unclassifiable statement at (1)
../Main1.f:19.5:
DIMENSION MSN(1:NPP) ! S(x,t)
1
Error: Non-numeric character in statement label at (1)
Fatal Error: Error count reached limit of 25.
make: *** [Main1.o] Error 1
14:51:55 Build Finished (took 1s.244ms)
I have compiled the code in the terminal using Gfortran simply and i have obtained the executable file an obtained the results. But Eclipse did not work for me at all.
I want to debug my code. it is 1236 raws. Can someone help me with Eclipse or any other suggestion?
It is related with the form of Fortran file. I was copying the code into a new Fortran source file. I decided to import the file that I have into the project.
While trying to link a Freeswitch endpoint (mod_h323) in VS2012, I get the following error.
------ Build started: Project: mod_h323, Configuration: Debug x64 ------
LINK : fatal error LNK1104: cannot open file 'c:/opensource/freeswitch-1.2.22/libs/openssl-1.0.1c/lib/VC/libeay32MDd.lib'
I am simply unable to find out where this link instruction is specified. I would like to point to a different library file, but where is this link instruction hidden? I am unable to get past this error.
Edit: What are the different ways of specifying link libraries in VC++?
At first you should check if the library is specified at the linker command line. In the project Property Page navigate to
- Configuration Properties
- Linker
-Command Line
If you find the lib here, you have passed it in the project properties. If not the library request can be added by a #pragma comment directives. To find the object (or library) file with that directive you have to dump all directives with the command
for %o in (*.obj *.lib) do dumpbin /directives %o
When you fond the object file, you need to find the corresponding pragma in the source file.
I am trying to use mupdf in android application.I am using windows 7 and cygwin terminal.I used make but it gave error and
make NOX11=yes
execute successfully.
then i used ndk-build and it gives this error.
SharedLibrary : libmupdf.so
c:/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld.exe: ./obj/local/armeabi/libmupdfcore.a(pdf_fontfile.o)(.text.pdf_lookup_builtin_font+0x18): unresolvable R_ARM_THM_CALL relocation against symbol `strcmp'
c:/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld.exe: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
/cygdrive/c/android-ndk-r8b/build/core/build-binary.mk:378: recipe for target `obj/local/armeabi/libmupdf.so' failed
make: *** [obj/local/armeabi/libmupdf.so] Error 1
please help me.I am new to android ndk.
Thank you.
This seems like a known issue. Try adding the line:
NDK_TOOLCHAIN_VERSION=4.4.3
to the file ..\android\jin\Application.mk. That will at least get rid of this particular error.
EDIT: Look here http://code.google.com/p/android/issues/detail?id=35393 for more information
UPDATE:
mupdf world is a murky one. Even the version of NDK vis-a-vis the version of mupdf (http://mupdf.com/download/archive/) you use will determine what sort of errors or warnings you get. From my experience, mupdf-0.9 (+mupdf-thirdparty-2011-02-24.zip) behaves well with android-ndk-r6b, while mupdf-1.1 (+mupdf-thirdparty-2012-08-14.zip) will behave just fine with android-ndk-r8b.
i am using GLUT 3.7.6 with VC++6.0 n on compiling a program i get following error
--------------------Configuration: abc2 - Win32 Debug--------------------
Linking...
LINK : fatal error LNK1104: cannot open file "abc2.exe"
Error executing link.exe.
abc2.exe - 1 error(s), 0 warning(s)
i have included all the header files ...linked all the lib files bt still the result is same...!!...please guide me through this problem...THNX in advance...!!
This usually happens when the output file already exists and something has a lock on it. Check to see if abc2.exe is alright running, or of some program has a file lock on it.
You can check whether abc.exe is running using Process Explorer from sysinternals. If that's the case the link step will fail.
Also check the target file is not write-protected.
All the Microsoft tool error codes are documented online - see here for more reasons why you might see LNK1104.