Project

General

Profile

Actions

Bug #958

closed

use [popen] get stream handle,and [fread]or[fgets] crash

Added by Beily L. almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
libcrystax
Target version:
Start date:
05/29/2015
Due date:
% Done:

100%

Estimated time:
CPU Architecture:
arm
Host OS:
Windows
Toolchain:
gcc-4.9
Android version:
4.3 (android-18)
CrystaX NDK Version:

Description

when use crystax-ndk-10.1.0 NDK build OK, but run Crash, i get an error. by the way, in our website i cant find 10.2.0 or higher version to download.so i have no idea, if the higher verion has fix the bug.
error as follow:
05-29 20:53:36.677: I/MyAppTest002(19241): JNI::execute ,cmd = ls.
05-29 20:53:36.677: I/MyAppTest002(19241): JNI::execute ,popen success=====.
05-29 20:53:36.677: I/MyAppTest002(19241): JNI::execute, command=ls 2>&1
05-29 20:53:46.677: A/libc(19241): invalid address or address of corrupt block 0x40161c30 passed to dlfree [here "fread"or"fgets" execute]
05-29 20:53:46.687: A/libc(19241): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 19241 (xample.myapp002)

But, if use google android-ndk-r10d NDK , build OK and run OK, it work find, and i can get the result of execute [ls] command.
So, i think it maybe a crystax NDK's BUG. pls let me know, if your have good news,thank u very much! best wishes!

PS:
IDE : Eclipse
HostOS: Windows + cgywin64


Files

MyApp002-popen-fread-crash-002.txt (19.7 KB) MyApp002-popen-fread-crash-002.txt this Eclipse logcat, Crystax NDK and google NDK Beily L., 06/01/2015 04:45 PM
MyApp002-----.rar (806 KB) MyApp002-----.rar Eclipse project.c++ source file in jni folder, java src files in src folder, app's UI in res folder, just have a textVeiw and a button Beily L., 06/01/2015 05:14 PM
MyApp002.apk (881 KB) MyApp002.apk apk, with crystax NDK Beily L., 06/01/2015 05:15 PM
Actions

Also available in: Atom PDF