Search code examples
java-native-interfacequickblox

Quickblox android - Audio call crash before call activity started


Audio call crash before call activity started.

06-24 10:28:11.336: D/RTCClient(30532): Create new session
06-24 10:28:11.336: D/dalvikvm(30532): Trying to load lib /data/app-lib/packagename-3/libjingle_peerconnection_so.so 0x42a22eb0
06-24 10:28:11.341: D/dalvikvm(30532): Added shared lib /data/app-lib/packagename-3/libjingle_peerconnection_so.so 0x42a22eb0
06-24 10:28:11.341: D/EglBase(30532): SDK version: 19
06-24 10:28:11.346: D/WEBRTCN(30532): SetRenderAndroidVM
06-24 10:28:11.346: E/rtc(30532): #
06-24 10:28:11.346: E/rtc(30532): # Fatal error in ../../talk/app/webrtc/java/jni/jni_helpers.cc, line 267
06-24 10:28:11.346: E/rtc(30532): # Check failed: ret
06-24 10:28:11.346: E/rtc(30532): # 
06-24 10:28:11.346: E/rtc(30532): #
06-24 10:28:11.346: D/dalvikvm(30532): [SWE] ### S.LSI JIT optimization list BEGIN ###
06-24 10:28:11.346: D/dalvikvm(30532): [SWE] ### S.LSI JIT optimization list END ###
06-24 10:28:11.346: A/libc(30532): Fatal signal 6 (SIGABRT) at 0x00007744 (code=-6), thread 30532 (packagename)

Error occurs at the line where

QBRTCSession newSessionWithOpponents = QBRTCClient.getInstance().createNewSessionWithOpponents(opponents, qbConferenceType);

in method

public void addConversationFragmentStartCall(List<Integer> opponents,
            QBRTCTypes.QBConferenceType qbConferenceType,
            Map<String, String> userInfo) {

        // init session for new call
        try {


            QBRTCSession newSessionWithOpponents = QBRTCClient.getInstance().createNewSessionWithOpponents(opponents, qbConferenceType);
            Log.d("Crash", "addConversationFragmentStartCall. Set session " + newSessionWithOpponents);
            setCurrentSession(newSessionWithOpponents);

            ConversationFragment fragment = new ConversationFragment();
            Bundle bundle = new Bundle();
            bundle.putIntegerArrayList(ApplicationSingleton.OPPONENTS,
                    new ArrayList<Integer>(opponents));
            bundle.putInt(ApplicationSingleton.CONFERENCE_TYPE, qbConferenceType.getValue());
            bundle.putInt(START_CONVERSATION_REASON, StartConversetionReason.OUTCOME_CALL_MADE.ordinal());
            bundle.putString(CALLER_NAME, DataHolder.getUserNameByID(opponents.get(0)));

            for (String key : userInfo.keySet()) {
                bundle.putString("UserInfo:" + key, userInfo.get(key));
                Toast.makeText(this, userInfo.get(key), Toast.LENGTH_SHORT).show();

            }



            fragment.setArguments(bundle);
            getFragmentManager().beginTransaction().replace(R.id.fragment_container, fragment, CONVERSATION_CALL_FRAGMENT).commit();

        } catch (IllegalStateException e) {
            Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
        }
    }

Solution

  • My mistake. Create session method used in application was old. The latest jar recognise the create session method but video call webRTC sample don't. By implementing new session style, audio call works successfully. Thank you.