Dalvik native libraries thread-safe?

by Pascal Merle » Tue, 03 Mar 2009 01:06:40 GMT

Sponsored Links
 I am using network sockets in a multi-threaded application, and I am
struggling with crashes. Using gdbclient/gdbserver I found it c
crashing in memory allocation. Looks like memory got corrupted

What is your experience/knowledge? Is it okay to run multi-threaded
networking applications on Android?

Dalvik native libraries thread-safe?

by Pascal Merle » Tue, 03 Mar 2009 03:23:35 GMT

 I already found the error in AudioRecord which I also used. Will
post a patch for code review soon.

Sponsored Links

Other Threads

1. Can't run some test case in instrumentation


A problem always trouble me.

I have added the "android.test.runner" user library and
"android.test.InsturmentationTestRunner" in instrumentation.
But when i run the test in Instrumentation, 0 test has been run.

My test class is as below:
package com.android.ProjectTest.test;

import android.R;
import android.app.Instrumentation;
import android.test.ActivityInstrumentationTestCase2;
import android.test.suitebuilder.annotation.LargeTest;
import android.util.Log;
import android.widget.Button;
import android.widget.EditText;

import com.android.ProjectTest.ProjectTest;

public class TestNewSDKTest extends
ActivityInstrumentationTestCase2<ProjectTest> {
    private Button sentmessage;
    private EditText txtMessage;
    private EditText TxtPhoneNo;
    private Instrumentation mInst = null;
    private static final String TAG="ProjectTest";

    public TestNewSDKTest() {
    protected void setUp() throws Exception {
        mInst = getInstrumentation();
        ProjectTest a=getActivity();
     protected void tearDown() throws Exception {

    public void TestSendM()throws Exception
        Log.v(TAG,"Test Send SMS");
        String PhoneN="5556";
        String Message="Hello, my friend";
                ProjectTest a=getActivity();


But after i run the test in Instrumentation, the log shows that 0 test
is run.
The log is as below:
       Test result for InstrumentationTestRunner=
       Time :0.001
       OK(0 tests)

So, Is i messing some conditions. Why this happened.
Anybody could help me?
Thank you.


2. Sprint Hero users appWidgetId changes after reboot, no settings saved!

So this one is crazy guys.  I have 7000+ users using my widget with no
problem at all.  However, I got one Sprint Hero using an unrooted
phone with no home screen manager besides the default Hero SenseUI.

I shot him over a copy of my widget pumped full of debug lines.  I can
see him add the widget with say an appWidgetId of "50".  After that he
reboots the phone and then sends me another set of logs.  In the next
set of logs the widget didnt save its settings because the appWidgetId
is now "54".

So really those settings are saved, they are just under a different

Can I do anything for this user besides refund his money and tell him
that Android has let him down?



3. MediaRecorder documentation example does not work

4. The way to access the android phone.

5. How does a ContentProvider get destoryed

6. Droid rooted

7. neighbor cell information yields odd results with 3G