probably its an abort due to null pointer access.,

logcat trace will have I/DEBUG crash report, with PC, LR,etc. get it and
check whats issue with addr2line tool
more info
http://omappedia.org/wiki/Android_Debugging#Debugging_segmentation_fault

-- 
Regards,
Deva
www.bittoggler.com


On Mon, Oct 18, 2010 at 7:57 PM, journeyer <[email protected]> wrote:

> Hello List!
> I'd like to ask for help for trouble-shooting my problem __;
> I am now trying to test Opencore with it's Unit Test Apps.
> Among hundreds of those tests, I use simple play-pause-stop test.
> What I actually need to test is the
> 'PVPlayerTrackSelectionInterface'.
> So I added some additional code into the simple play-pause-stop test.
> But with my additional test code, I got 'Segmentation fault' message
> when the test app finishes.
> The exact message is as like below:
>
>    Segmentation fault
>    make: *** [run_pe_test] Error 139
>
> I am posting my test code and the output messages here.
> Please help me ^^;
>
>
> ================= THE CONSOLE =================
> r...@hum-desktop:~/android-x86/external/opencore/build_config/
> opencore_dynamic# make run_pe_test TEST_ARGS="-test 10 10 -logfile"
> /root/android-x86/external/opencore/tools_v2/build/make/library.mk:
> 55:
> warning: overriding commands for target `/root/android-x86/external/
> opencore/build_config/opencore_dynamic/build/installed_include/
> getactualaacconfig.h'
> /root/android-x86/external/opencore/tools_v2/build/make/library.mk:
> 55:
> warning: ignoring old commands for target `/root/android-x86/
> external/
> opencore/build_config/opencore_dynamic/build/installed_include/
> getactualaacconfig.h'
> [make] setting up for testing...
> [make] setting up for linux testing...
> [make] running...
> Version: CORE_8.000.1.1_RC4 generated on 20091101
> Test Program for pvPlayer engine class.
>  Test case range 10 to 10
>  Compressed output Video(No) Audio(No)
>  Log level 8; Log node 0 Log Text 1 Log Mem 0
> Starting Test 10: Play-Pause-Stop
> Input File: test.mp4
> Run::STATE_QUERYINTERFACE_JJH::
> iCurrentCmdId = 4
> CommandCompleted::STATE_QUERYINTERFACE_JJH::
> NumTracks = 2
> TrackID = 101
> TrackID = 201
> STATE_CLEANUPANDCOMPLETE::
> STATE_CLEANUPANDCOMPLETE::5
> Segmentation fault
> make: *** [run_pe_test] Error 139
> r...@hum-desktop:~/android-x86/external/opencore/build_config/
> opencore_dynamic#
>
> I added additional test code with '#ifdef JJH_TEST'.
> Please note those code sections.
>
> ==== THE HEADER test_pv_player_engine_testset1.h ====
> #define JJH_TEST
> #ifdef JJH_TEST
> #include "pv_player_track_selection_interface.h"
> #endif //JJH_TEST
> /*!
>  *  A test case to test stop when playback is paused
>  *  - Data Source: test.mp4
>  *  - Data Sink(s): Video[FileOutputNode-
> test_player_playpausestop_vidoe.dat]\n
>  *                  Audio[FileOutputNode-
> test_player_playpausestop_audio.dat]
>  *  - Sequence:
>  *             -# CreatePlayer()
>  *             -# AddDataSource()
>  *             -# Init()
>  *             -# AddDataSink() (video)
>  *             -# AddDataSink() (audio)
>  *             -# Prepare()
>  *             -# Start()
>  *             -# WAIT 20 sec.
>  *             -# Pause()
>  *             -# Stop()
>  *             -# RemoveDataSink() (video)
>  *             -# RemoveDataSink() (audio)
>  *             -# Reset()
>  *             -# RemoveDataSource()
>  *             -# DeletePlayer()
>  *
>  */
> class pvplayer_async_test_playpausestop : public
> pvplayer_async_test_base
> {
>    public:
>        pvplayer_async_test_playpausestop(PVPlayerAsyncTestParam
> aTestParam):
>                pvplayer_async_test_base(aTestParam)
>                , iPlayer(NULL)
> #ifdef JJH_TEST
>                , iTrackSelection(NULL)
> #endif //JJH_TEST
>                , iDataSource(NULL)
>                , iDataSinkVideo(NULL)
>                , iDataSinkAudio(NULL)
>                , iIONodeVideo(NULL)
>                , iIONodeAudio(NULL)
>                , iMIOFileOutVideo(NULL)
>                , iMIOFileOutAudio(NULL)
>                , iCurrentCmdId(0)
>        {
>            iTestCaseName = _STRLIT_CHAR("Play-Pause-Stop");
>        }
>        ~pvplayer_async_test_playpausestop() {}
>        void StartTest();
>        void Run();
>        void CommandCompleted(const PVCmdResponse& aResponse);
>        void HandleErrorEvent(const PVAsyncErrorEvent& aEvent);
>        void HandleInformationalEvent(const
> PVAsyncInformationalEvent&
> aEvent);
>        enum PVTestState
>        {
>            STATE_CREATE,
> #ifdef JJH_TEST
>            STATE_QUERYINTERFACE_JJH,
> #endif //JJH_TEST
>            STATE_ADDDATASOURCE,
>            STATE_INIT,
>            STATE_ADDDATASINK_VIDEO,
>            STATE_ADDDATASINK_AUDIO,
>            STATE_PREPARE,
>            STATE_START,
>            STATE_PAUSE,
>            STATE_STOP,
>            STATE_REMOVEDATASINK_VIDEO,
>            STATE_REMOVEDATASINK_AUDIO,
>            STATE_RESET,
>            STATE_REMOVEDATASOURCE,
>            STATE_CLEANUPANDCOMPLETE
>        };
>        PVTestState iState;
>        PVPlayerInterface* iPlayer;
> #ifdef JJH_TEST
>        PVPlayerTrackSelectionInterface*  iTrackSelection;
> #endif //JJH_TEST
>        PVPlayerDataSourceURL* iDataSource;
>        PVPlayerDataSink* iDataSinkVideo;
>        PVPlayerDataSink* iDataSinkAudio;
>        PVMFNodeInterface* iIONodeVideo;
>        PVMFNodeInterface* iIONodeAudio;
>        PvmiMIOControl* iMIOFileOutVideo;
>        PvmiMIOControl* iMIOFileOutAudio;
>        PVCommandId iCurrentCmdId;
> };
>
>
> ==== THE SRCCODE test_pv_player_engine_testset1.cpp ====
> //
> // pvplayer_async_test_playpausestop section
> //
> void pvplayer_async_test_playpausestop::StartTest()
> {
>    AddToScheduler();
>    iState = STATE_CREATE;
>    RunIfNotReady();
> }
>
> void pvplayer_async_test_playpausestop::Run()
> {
>    int error = 0;
>    switch (iState)
>    {
>        case STATE_CREATE:
> ........
>        break;
>        case STATE_ADDDATASOURCE:
> .......
>        break;
>        case STATE_INIT:
> .......
>        break;
>        case STATE_ADDDATASINK_VIDEO:
> .......
>        break;
>        case STATE_ADDDATASINK_AUDIO:
> ......
>        break;
> #ifdef JJH_TEST
>        case STATE_QUERYINTERFACE_JJH:
>        {
>            fprintf(stdout, "Run::STATE_QUERYINTERFACE_JJH::\n");
>            PVUuid trackselectionifuuid =
> PVPlayerTrackSelectionInterfaceUuid;
>            OSCL_TRY(error, iCurrentCmdId = iPlayer-
> >QueryInterface(trackselectionifuuid, (PVInterface*&)iTrackSelection,
>
> (OsclAny*)NULL));
>            OSCL_FIRST_CATCH_ANY(error, PVPATB_TEST_IS_TRUE(false);
> iState = STATE_CLEANUPANDCOMPLETE; RunIfNotReady());
>            fprintf(stdout, "iCurrentCmdId = %d\n", iCurrentCmdId);
>       }
>        break;
> #endif //JJH_TEST
>        case STATE_PREPARE:
> ......
>        break;
>        case STATE_START:
> ......
>        break;
>        case STATE_PAUSE:
> ......
>        break;
>        case STATE_STOP:
> ......
>        break;
>        case STATE_REMOVEDATASINK_VIDEO:
> ......
>        break;
>        case STATE_REMOVEDATASINK_AUDIO:
> ......
>        break;
>        case STATE_RESET:
> ......
>        break;
>        case STATE_REMOVEDATASOURCE:
> ......
>        break;
>        case STATE_CLEANUPANDCOMPLETE:
>        {
> #ifdef JJH_TEST
>            fprintf(stdout, "STATE_CLEANUPANDCOMPLETE::\n");
> #endif //JJH_TEST
> PVPATB_TEST_IS_TRUE(PVPlayerFactory::DeletePlayer(iPlayer));
>            iPlayer = NULL;
>            delete iDataSource;
>            iDataSource = NULL;
>            delete iDataSinkVideo;
>            iDataSinkVideo = NULL;
> PVMediaOutputNodeFactory::DeleteMediaOutputNode(iIONodeVideo);
>            iIONodeVideo = NULL;
>            iMioFactory->DestroyVideoOutput(iMIOFileOutVideo);
>            iMIOFileOutVideo = NULL;
>            delete iDataSinkAudio;
>            iDataSinkAudio = NULL;
> PVMediaOutputNodeFactory::DeleteMediaOutputNode(iIONodeAudio);
>            iIONodeAudio = NULL;
>            iMioFactory->DestroyAudioOutput(iMIOFileOutAudio);
>            iMIOFileOutAudio = NULL;
> #ifdef JJH_TEST
>            fprintf(stdout, "STATE_CLEANUPANDCOMPLETE::5\n");
> #endif //JJH_TEST
>            TestCompleted();
> #ifdef JJH_TEST
>            fprintf(stdout, "STATE_CLEANUPANDCOMPLETE::6\n");
> #endif //JJH_TEST
>        }
>        break;
>        default:
>            break;
>    }
> }
>
> void pvplayer_async_test_playpausestop::CommandCompleted(const
> PVCmdResponse& aResponse)
> {
> ......
>    switch (iState)
>    {
>      case STATE_ADDDATASOURCE:
> ......
>            break;
>        case STATE_INIT:
> ......
>            break;
>        case STATE_ADDDATASINK_VIDEO:
> ......
>            break;
>        case STATE_ADDDATASINK_AUDIO:
>            if (aResponse.GetCmdStatus() == PVMFSuccess)
>            {
> #ifndef JJH_TEST
>                iState = STATE_PREPARE;
> #else
>                iState = STATE_QUERYINTERFACE_JJH;
> #endif //JJH_TEST
>                RunIfNotReady();
>            }
>            else
> ......
>            break;
> #ifdef JJH_TEST
>       case STATE_QUERYINTERFACE_JJH:
>            fprintf(stdout,
> "CommandCompleted::STATE_QUERYINTERFACE_JJH::\n");
>            if (aResponse.GetCmdStatus() == PVMFSuccess)
>            {
>                PVMFMediaPresentationInfo aList;
>                PVMFTrackInfo* pTrackInfo;
>                iTrackSelection->GetCompleteList(aList);
>                uint32 uNumTracks = aList.getNumTracks();
>                fprintf(stdout, "NumTracks = %d\n", uNumTracks);
>                for ( uint32 idx = 0 ; idx < uNumTracks ; ++idx )
>                {
>                    pTrackInfo = aList.getTrackInfo( idx );
>                    fprintf(stdout, "TrackID = %d\n", pTrackInfo-
> >getTrackID());
>                }
>                iTrackSelection->ReleaseCompleteList(aList);
>                    iState = STATE_PREPARE;
>                    RunIfNotReady();
>            }
>            else
>            {
>                // QueryInterface failed
>                PVPATB_TEST_IS_TRUE(false);
>                iState = STATE_CLEANUPANDCOMPLETE;
>                RunIfNotReady();
>            }
>            break;
> #endif //JJH_TEST
>        case STATE_PREPARE:
> ......
>            break;
>        case STATE_START:
> ......
>            break;
>        case STATE_PAUSE:
> ......
>            break;
>        case STATE_STOP:
> ......
>            break;
>        case STATE_REMOVEDATASINK_VIDEO:
> ......
>            break;
>        case STATE_REMOVEDATASINK_AUDIO:
> ......
>            break;
>        case STATE_RESET:
> ......
>            break;
>        case STATE_REMOVEDATASOURCE:
> ......
>            break;
>        default:
> ......
>        break;
>    }
> }
>
> void pvplayer_async_test_playpausestop::HandleErrorEvent(const
> PVAsyncErrorEvent& aEvent)
> {
> ......
> }
>
> void
> pvplayer_async_test_playpausestop::HandleInformationalEvent(const
> PVAsyncInformationalEvent& aEvent)
> {
> ......
>
> --
> unsubscribe: 
> [email protected]<android-porting%[email protected]>
> website: http://groups.google.com/group/android-porting
>

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to