native

Uncatchable AccesViolationException

大兔子大兔子 提交于 2019-12-24 03:32:08
问题 I'm getting close to desperate.. I am developing a field service application for Windows Mobile 6.1 using C# and quite some p/Invoking. (I think I'm referencing about 50 native functions) On normal circumstances this goes without any problem, but when i start stressing the GC i'm getting a nasty 0xC0000005 error witch seems uncatchable. In my test i'm rapidly closing and opening a dialog form (the form did make use of native functions, but for testing i commented these out) and after a while

Do i need to copy .so files to System/libs?

好久不见. 提交于 2019-12-24 03:24:37
问题 I want to make my application as a system application. But my application crashes when i make it as system app (placed .apk file inside System/app). It crashes because its not able to load .so files. My first question here is do i need to copy the libs( Extract .apk and i will be getting libs) inside System/libs or the System automatically does it? My Second question here is does the system load libraries(.so files) from System/libs or data/data/myApp.PackageName/lib folder? Any Help would be

Different between native C code run in jni and run in the shell in Android

浪尽此生 提交于 2019-12-24 01:59:22
问题 I have a native C Android application. First I build native C code into shared library and jni will use this library. This library uses some kernel loadable module .ko, some already loaded, some must loaded by "insmod" command. I also build an executable that use this library and it run ok by command line. But the jni which do the same work as executable run fail when it calls function that need kernel module to be loaded. So what is the difference between them? Do I need grant some

Wrapping a c#/WPF GUI around c++/cli around native c++

纵饮孤独 提交于 2019-12-24 01:53:36
问题 This is kind of a complicated situation. I'm refactoring (ground-up) c++ that must be used as both a CGI script and the core of a standalone app. Unfortunately I haven't written C++ since college, and am more familiar with c#/Java. So I'm going to use WPF for the GUI. From what my research has revealed, this means that I will be: 1) Refactoring the base code in unmanaged C++ (yay for intellisense support, eh?) 2) Wrapping that base in a managed class library 3) Wrapping step 2 in a C#/WPF GUI

JNA structure mapping with no alignment and padding

一个人想着一个人 提交于 2019-12-24 01:48:14
问题 I have the below structures in JNA. I want to remove the padding and alignment in C using pragma pack. When I run it from C it runs fine. I'm using this DLL to be called from Java. When I call it the JVM is crashing. Would my settings I did in my DLLs apply when its called from Java? I tried adding setAlignment type to None. Still no help. In C this structure is weighing 405. It adds up perfectly meaning there is no padding or alignment. In java when I hover over the _report value while

App Development for iOS and Android: Native vs Hybrid [closed]

时间秒杀一切 提交于 2019-12-24 01:42:33
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . i need to develop an App for iOS and Android. I can code in obj. C and Java. The app will display data from a MySQL Database and it

Downloading LWJGL natives with Ivy

不羁的心 提交于 2019-12-24 01:37:09
问题 I'm trying to set up an Ant + Ivy build for a personal project. Everything was making sense, and working nicely, until I got to LWJGL. Everything from LWJGL is resolved, except the natives. The Readme.md on their website makes it seem that it is possible to get these through Ivy: LWJGL 3 can be used with Maven/Gradle/Ivy, with the following dependencies: org.lwjgl:lwjgl:${version} org.lwjgl:lwjgl-platform:${version}:natives-windows org.lwjgl:lwjgl-platform:${version}:natives-linux org.lwjgl

ocamlopt linking error code 2

末鹿安然 提交于 2019-12-24 01:18:40
问题 I ran the command opam install ocamlbuild and it seems that I have some kind of problem with ocamlopt Here is what opam is telling me : (I'm guessing it just doesn't like my 4.04 version) ### stdout ### # [...] # mkdir -p tmp # ocamlopt.opt -pack src/const.cmx src/loc.cmx src/discard_printf.cmx src/signatures.cmi src/my_std.cmx src/my_unix.cmx src/tags.cmx src/display.cmx src/log.cmx src/shell.cmx src/bool.cmx src/glob_ast.cmx src/glob_lexer.cmx src/glob.cmx src/lexers.cmx src/param_tags.cmx

Examples for thread divergence actions and external actions in the Java Memory Model

删除回忆录丶 提交于 2019-12-23 17:56:50
问题 I'm currently learning about the Java Memory Model and I came about the different kinds of Actions. There are two of them which I don't fully understand: External Actions and Thread divergence actions Please explain those two action types and give examples for them and for their special properties regarding compiler-reordering and happens-before relation . Oh, and are native calls also external actions? I think they wouldn't define thread divergence actions if there was nothing special about

Concurrency issue while calling a native library via JNA

我是研究僧i 提交于 2019-12-23 17:33:56
问题 For an existing java application (which I do not have the source code) I am developing a plug-in which is calls a shared library. Unfortunately this shared library ( written in C ) is not thread safe. The application is calling my plugin within several concurrent threads hence the shared library is called by these concurrent threads and naturally it gives many errors due to concurrency ( e.g: already open files are prevented from being opened etc) I am accessing the shared library via JNA . I