8 Replies - 5617 Views - Last Post: 08 February 2016 - 08:03 PM

#1 vinothvino42   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 14-November 15

App force close automatically when opening. why?

Posted 02 February 2016 - 10:28 AM

My app crashes always when displaying listview with youtube thumbnail. I've created this app with AsyncTask,in doInBackground i'm fetching youtube video id and title which is in json... Then in onPostExecute i'm inflating my youtube view layout with customadapter and adding thumbnail for each list items in listview. But my app crashes always when doing this process... I used this listview with youtube thumbnail without getting title and video id from json(I did normal string array of title and video id,so there is no problem with my custom adapter.it works fine)I heard that if an app delay to get views for 5 secs,it'll automatically crashes... Is it true ? and Please help me what to do for this issue.. I'm new to Android...

MainActivity

protected void onPostExecute(Integer result){
          //  Toast.makeText(getApplicationContext(),"onPostExecute",Toast.LENGTH_SHORT).show();
            if(result == 1){
                Toast.makeText(getApplicationContext(),"Result = 1",Toast.LENGTH_SHORT).show();
                //Stop showing ProgressDialog
                if(progressDialog.isShowing()){
 
                    progressDialog.dismiss();
                }
 

                Toast.makeText(getApplicationContext(),"onPostExecute",Toast.LENGTH_SHORT).show();
 
              //  arrayAdapter = new ArrayAdapter(MainActivity.this,R.layout.list_view,Title);
                Toast.makeText(getApplicationContext(),VideoID[0],Toast.LENGTH_SHORT).show();    //upto this working fine
               // AnotherCustom anotherCustom = new AnotherCustom();
                CustomAdapter customAdapter = new CustomAdapter(context,Title,VideoID);
 

               listView.setAdapter(arrayAdapter);



CustomAdapter

public CustomAdapter(Activity context,String[] Title,String[] VideoID){
 
        super(context,R.layout.activity_main,VideoID);
        this.context = context;
        this.Title = Title;
        this.VideoID = VideoID;
 
    }
 
    //This method is called when the list items are visible to user

    @Override
    public View getView(final int position,View convertView,ViewGroup parent){
 
    // Toast.makeText(context,"getView",Toast.LENGTH_SHORT).show();

 
        View ListItemView = convertView;
 
        if (convertView == null){
 
            LayoutInflater inflater = context.getLayoutInflater();
            ListItemView = inflater.inflate(R.layout.youtubethumbnail_loader,null,false);    //Inflating youtube thumbnail view layout

 
        }
 

       youTubeThumbnailView = (YouTubeThumbnailView)ListItemView.findViewById(R.id.youtubethumbnailviewnew);
        youTubeThumbnailView.initialize(Config.API_KEY, new YouTubeThumbnailView.OnInitializedListener() {
 

            @Override
            public void onInitializationSuccess(YouTubeThumbnailView thumbnailView, YouTubeThumbnailLoader thumbnailLoader) {
 
                Toast.makeText(context,"Success initialization",Toast.LENGTH_SHORT).show();
                youTubeThumbnailLoader = thumbnailLoader;
 
                thumbnailLoader.setOnThumbnailLoadedListener(new YouTubeThumbnailLoader.OnThumbnailLoadedListener() {
                    @Override
                    public void onThumbnailLoaded(YouTubeThumbnailView youTubeThumbnailView, String s) {
 

                        Toast.makeText(context, "Welcome to ShortFilmy", Toast.LENGTH_SHORT).show();
 
                    }
 
                    @Override
                    public void onThumbnailError(YouTubeThumbnailView youTubeThumbnailView, YouTubeThumbnailLoader.ErrorReason errorReason) {
 
                        Toast.makeText(context, "Failed to load thumbnail", Toast.LENGTH_SHORT).show();
 
                    }
                });
 
                thumbnailLoader.setVideo(VideoID[position]);  //setting video id to getting thumbnail

            }
 
            @Override
            public void onInitializationFailure(YouTubeThumbnailView youTubeThumbnailView, YouTubeInitializationResult youTubeInitializationResult) {
 

                Toast.makeText(context,"Failed to initialize",Toast.LENGTH_SHORT).show();
 
            }
        });
 
        textView = (TextView)ListItemView.findViewById(R.id.textViewnew);
        textView.setText(Title[position]);
 
        return ListItemView;
    }
 
}


Here,my customadapter is working fine when i used without asynctask but if I call customadapter class in asynctask(onPostExecute method) it'll force close my app. I googled a lot about this but i didn't know what to do for this.. But I heard that every app wants to view the widgets or anything within 5 secs in UI thread otherwise our app got crashed.So you guys wanna help me out...

Is This A Good Question/Topic? 0
  • +

Replies To: App force close automatically when opening. why?

#2 ben255   User is offline

  • D.I.C Addict

Reputation: 44
  • View blog
  • Posts: 528
  • Joined: 09-September 13

Re: App force close automatically when opening. why?

Posted 02 February 2016 - 10:40 AM

Post your stacktrace, when working with images or videos the normal issues are usally outofmemory exceptions
Was This Post Helpful? 0
  • +
  • -

#3 vinothvino42   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 14-November 15

Re: App force close automatically when opening. why?

Posted 02 February 2016 - 10:44 AM

Bro i don't know what to do now ? can you please suggest any way to handle this in detail ? or give some links to refer
Was This Post Helpful? 0
  • +
  • -

#4 ben255   User is offline

  • D.I.C Addict

Reputation: 44
  • View blog
  • Posts: 528
  • Joined: 09-September 13

Re: App force close automatically when opening. why?

Posted 02 February 2016 - 10:57 AM

How can anyone help when you dont post your error? Im on my phone so will not be able to help much
Was This Post Helpful? 0
  • +
  • -

#5 vinothvino42   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 14-November 15

Re: App force close automatically when opening. why?

Posted 02 February 2016 - 12:20 PM

App force closed automatically when calling custom adapter class.... This is what the problem i'm facing.
Was This Post Helpful? 0
  • +
  • -

#6 macosxnerd101   User is online

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12680
  • View blog
  • Posts: 45,861
  • Joined: 27-December 08

Re: App force close automatically when opening. why?

Posted 02 February 2016 - 12:25 PM

This is a symptom of the problem. Succinctly, the problem is that you are encountering an Exception which is crashing your program. If you don't post the stack trace, we cannot help you.

To find the stack trace, look under your LogCat.
Was This Post Helpful? 1
  • +
  • -

#7 vinothvino42   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 14-November 15

Re: App force close automatically when opening. why?

Posted 02 February 2016 - 12:39 PM

sorry!!! and Thanks for your replies...

LOGCAT

02-02 14:37:02.115 666-718/? D/WifiStateMachine: L2Connected CMD_START_SCAN source -2 4, 5 -> obsolete
02-02 14:37:12.184 340-637/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'UID' not found
02-02 14:37:12.777 1420-1441/? D/InitAlarmsService: Clearing and rescheduling alarms.
02-02 14:37:22.796 666-1521/? D/NetlinkSocketObserver: NeighborEvent{elapsedMs=68304, 10.0.3.2, [525400123502], RTM_NEWNEIGH, NUD_STALE}
02-02 14:37:36.698 1578-1578/? D/AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
02-02 14:37:36.701 1578-1578/? D/AndroidRuntime: CheckJNI is OFF
02-02 14:37:36.720 1578-1578/? D/ICU: No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
02-02 14:37:36.756 1578-1578/? E/memtrack: Couldn't load memtrack module (No such file or directory)
02-02 14:37:36.756 1578-1578/? E/android.os.Debug: failed to load memtrack module: -2
02-02 14:37:36.759 1578-1578/? I/Radio-JNI: register_android_hardware_Radio DONE
02-02 14:37:36.774 1578-1578/? D/AndroidRuntime: Calling main entry com.android.commands.pm.Pm
02-02 14:37:36.791 666-689/? I/ActivityManager: Start proc 1586:com.android.defcontainer/u0a4 for service com.android.defcontainer/.DefaultContainerService
02-02 14:37:36.823 666-679/? I/UsageStatsService: User[0] Flushing usage stats to disk
02-02 14:37:36.838 666-679/? I/UsageStatsDatabase: Time changed by +3s492ms. files deleted: 0 files moved: 5
02-02 14:37:36.858 1586-1597/? D/DefContainer: Copying /data/local/tmp/com.example.vinothvino.shortfilmy to base.apk
02-02 14:37:36.865 666-679/? I/UsageStatsService: User[0] Rollover scheduled @ 2016-02-02 19:00:00(1454457600000)
02-02 14:37:37.009 666-689/? I/PackageManager.DexOptimizer: Running dexopt (dex2oat) on: /data/app/vmdl1591423294.tmp/base.apk pkg=com.example.vinothvino.shortfilmy isa=x86 vmSafeMode=false debuggable=true oatDir = /data/app/vmdl1591423294.tmp/oat
02-02 14:37:37.167 1600-1600/? W/dex2oat: Unexpected CPU variant for X86 using defaults: x86
02-02 14:37:37.174 1600-1600/? I/dex2oat: /system/bin/dex2oat --debuggable
02-02 14:37:37.518 1600-1603/? W/dex2oat: Before Android 4.1, method int android.support.v7.internal.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
02-02 14:37:38.657 1600-1603/? W/dex2oat: Compilation of void android.support.v7.internal.widget.AppCompatPopupwindow.showAsDropDown(android.view.View, int, int) took 124.038ms
02-02 14:37:38.684 1600-1602/? W/dex2oat: Compilation of void android.support.v7.internal.widget.DialogTitle.<init>(android.content.Context, android.util.AttributeSet) took 123.949ms
02-02 14:37:38.685 1600-1604/? W/dex2oat: Compilation of android.support.v7.internal.widget.AdapterViewCompat$OnItemClickListener android.support.v7.internal.widget.AdapterViewCompat.getOnItemClickListener() took 121.192ms
02-02 14:37:38.842 666-693/? I/MediaFocusControl:  AudioFocus  abandonAudioFocus() from [email protected]kService$[email protected]
02-02 14:37:38.858 666-680/? I/ActivityManager: Start proc 1605:com.android.musicfx/u0a10 for broadcast com.android.musicfx/.ControlPanelReceiver
02-02 14:37:38.860 666-1007/? I/ActivityManager: Killing 783:com.android.externalstorage/u0a7 (adj 15): empty #17
02-02 14:37:39.038 1605-1605/? W/System: ClassLoader referenced unknown path: /system/priv-app/MusicFX/lib/x86
02-02 14:37:39.068 666-1007/? I/ActivityManager: Killing 1121:com.android.music/u0a44 (adj 15): empty #17
02-02 14:37:39.523 1600-1600/? I/dex2oat: dex2oat took 2.356s (threads: 4) arena alloc=1420KB java alloc=2MB native alloc=10MB free=2MB
02-02 14:37:39.595 666-680/? I/ActivityManager: Force stopping com.example.vinothvino.shortfilmy appid=10060 user=-1: uninstall pkg
02-02 14:37:39.628 666-689/? I/PackageManager: Package com.example.vinothvino.shortfilmy codePath changed from /data/app/com.example.vinothvino.shortfilmy-1 to /data/app/com.example.vinothvino.shortfilmy-2; Retaining data and using new
02-02 14:37:39.628 666-680/? I/ActivityManager: Force stopping com.example.vinothvino.shortfilmy appid=10060 user=-1: replace pkg
02-02 14:37:39.628 666-689/? W/PackageManager: Code path for com.example.vinothvino.shortfilmy changing from /data/app/com.example.vinothvino.shortfilmy-1 to /data/app/com.example.vinothvino.shortfilmy-2
02-02 14:37:39.629 666-689/? W/PackageManager: Resource path for com.example.vinothvino.shortfilmy changing from /data/app/com.example.vinothvino.shortfilmy-1 to /data/app/com.example.vinothvino.shortfilmy-2
02-02 14:37:39.704 666-689/? W/Settings: Setting install_non_market_apps has moved from android.provider.Settings.Global to android.provider.Settings.Secure, returning read-only value.
02-02 14:37:39.704 666-689/? I/art: Starting a blocking GC Explicit
02-02 14:37:39.723 666-689/? I/art: Explicit concurrent mark sweep GC freed 7292(542KB) AllocSpace objects, 4(80KB) LOS objects, 33% free, 5MB/8MB, paused 576us total 18.317ms
02-02 14:37:39.726 666-689/? W/PackageManager: Couldn't remove dex file for package:  at location /data/app/com.example.vinothvino.shortfilmy-1/base.apk, retcode=-1
02-02 14:37:39.726 666-689/? I/ActivityManager: Force stopping com.example.vinothvino.shortfilmy appid=10060 user=0: pkg removed
02-02 14:37:39.730 666-666/? D/JobSchedulerService: Receieved: android.intent.action.PACKAGE_REMOVED
02-02 14:37:39.730 1578-1578/? I/art: System.exit called, status: 0
02-02 14:37:39.730 1578-1578/? I/AndroidRuntime: VM exiting with result code 0.
02-02 14:37:40.019 666-709/? I/InputReader: Reconfiguring input devices.  changes=0x00000010
02-02 14:37:40.029 666-678/? I/ActivityManager: Start proc 1624:com.android.gallery3d/u0a37 for broadcast com.android.gallery3d/.app.PackagesMonitor
02-02 14:37:40.042 666-709/? I/InputReader: Reconfiguring input devices.  changes=0x00000010
02-02 14:37:40.150 666-679/? W/VoiceInteractionManagerService: no available voice recognition services found for user 0
02-02 14:37:40.211 973-973/? D/CarrierServiceBindHelper: Receive action: android.intent.action.PACKAGE_REMOVED
02-02 14:37:40.309 973-973/? D/CarrierServiceBindHelper: Receive action: android.intent.action.PACKAGE_ADDED
02-02 14:37:40.309 973-973/? D/CarrierServiceBindHelper: Receive action: android.intent.action.PACKAGE_REPLACED
02-02 14:37:40.310 973-973/? D/CarrierServiceBindHelper: mHandler: 3
02-02 14:37:40.310 973-973/? D/CarrierServiceBindHelper: mHandler: 3
02-02 14:37:40.310 973-973/? D/CarrierServiceBindHelper: mHandler: 3
02-02 14:37:40.310 973-973/? D/CarrierConfigLoader: mHandler: 9 phoneId: 0
02-02 14:37:40.547 1327-1327/? W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1221 android.content.ContextWrapper.startService:581 android.content.ContextWrapper.startService:581 com.android.keychain.KeyChainBroadcastReceiver.onReceive:12 android.app.ActivityThread.handleReceiver:2725 
02-02 14:37:40.568 666-677/? I/ActivityManager: Start proc 1647:com.svox.pico/u0a50 for broadcast com.svox.pico/.VoiceDataInstallerReceiver
02-02 14:37:40.613 666-1002/? I/ActivityManager: Killing 1347:com.android.dialer/u0a5 (adj 15): empty #17
02-02 14:37:40.638 666-677/? I/ActivityManager: Killing 1388:com.android.managedprovisioning/u0a9 (adj 15): empty #17
02-02 14:37:40.694 1638-1638/? D/AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
02-02 14:37:40.695 1638-1638/? D/AndroidRuntime: CheckJNI is OFF
02-02 14:37:40.695 1642-1642/? D/AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
02-02 14:37:40.697 1642-1642/? D/AndroidRuntime: CheckJNI is OFF
02-02 14:37:40.707 1638-1638/? D/ICU: No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
02-02 14:37:40.709 1642-1642/? D/ICU: No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
02-02 14:37:40.722 1638-1638/? E/memtrack: Couldn't load memtrack module (No such file or directory)
02-02 14:37:40.722 1638-1638/? E/android.os.Debug: failed to load memtrack module: -2
02-02 14:37:40.725 1638-1638/? I/Radio-JNI: register_android_hardware_Radio DONE
02-02 14:37:40.733 1638-1638/? D/AndroidRuntime: Calling main entry com.android.commands.wm.Wm
02-02 14:37:40.737 1638-1638/? D/AndroidRuntime: Shutting down VM
02-02 14:37:40.738 1642-1642/? E/memtrack: Couldn't load memtrack module (No such file or directory)
02-02 14:37:40.738 1642-1642/? E/android.os.Debug: failed to load memtrack module: -2
02-02 14:37:40.740 1642-1642/? I/Radio-JNI: register_android_hardware_Radio DONE
02-02 14:37:40.747 1642-1642/? D/AndroidRuntime: Calling main entry com.android.commands.am.Am
02-02 14:37:40.751 666-805/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.vinothvino.shortfilmy/.MainActivity} from uid 0 on display 0
02-02 14:37:40.788 1642-1642/? D/AndroidRuntime: Shutting down VM
02-02 14:37:40.827 666-678/? I/ActivityManager: Start proc 1676:com.example.vinothvino.shortfilmy/u0a60 for activity com.example.vinothvino.shortfilmy/.MainActivity
02-02 14:37:40.833 1676-1676/? I/art: Late-enabling -Xcheck:jni
02-02 14:37:40.919 1676-1676/? W/System: ClassLoader referenced unknown path: /data/app/com.example.vinothvino.shortfilmy-2/lib/x86
02-02 14:37:40.970 666-682/? E/NetdConnector: Error handling '601 limit alert  ': java.lang.IllegalStateException: Invalid event from daemon (601 limit alert  )
02-02 14:37:41.077 1676-1690/? D/OpenGLRenderer: Use EGL_SWAP_behavior_PRESERVED: true
02-02 14:37:41.102 989-1205/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xf2c79d90
02-02 14:37:41.168 340-637/? E/NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'UID' not found
02-02 14:37:41.220 1676-1690/? D/libEGL: loaded /system/lib/egl/libEGL_emulation.so
02-02 14:37:41.221 1676-1690/? D/libEGL: loaded /system/lib/egl/libGLESv1_CM_emulation.so
02-02 14:37:41.240 1676-1690/? D/libEGL: loaded /system/lib/egl/libGLESv2_emulation.so
02-02 14:37:41.314 1676-1690/? I/OpenGLRenderer: Initialized EGL, version 1.4
02-02 14:37:41.401 1676-1690/? W/EGL_emulation: eglSurfaceAttrib not implemented
02-02 14:37:41.401 1676-1690/? W/OpenGLRenderer: Failed to set EGL_SWAP_behavior on surface 0xeeb935a0, error=EGL_SUCCESS
02-02 14:37:41.692 1676-1690/? W/EGL_emulation: eglSurfaceAttrib not implemented
02-02 14:37:41.692 1676-1690/? W/OpenGLRenderer: Failed to set EGL_SWAP_behavior on surface 0xeeb935c0, error=EGL_SUCCESS
02-02 14:37:41.792 1676-1690/? W/EGL_emulation: eglSurfaceAttrib not implemented
02-02 14:37:41.792 1676-1690/? W/OpenGLRenderer: Failed to set EGL_SWAP_behavior on surface 0xeeb935e0, error=EGL_SUCCESS
02-02 14:37:41.801 1676-1676/? I/Choreographer: Skipped 37 frames!  The application may be doing too much work on its main thread.
02-02 14:37:42.361 666-685/? I/ActivityManager: Displayed com.example.vinothvino.shortfilmy/.MainActivity: +1s557ms
02-02 14:37:42.663 1676-1676/? I/Choreographer: Skipped 51 frames!  The application may be doing too much work on its main thread.
02-02 14:37:43.049 1676-1690/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xe8a48ab0
02-02 14:37:46.190 666-1521/? D/NetlinkSocketObserver: NeighborEvent{elapsedMs=91698, 10.0.3.2, [525400123502], RTM_NEWNEIGH, NUD_REACHABLE}
02-02 14:37:46.902 666-693/? I/ActivityManager: Killing 1405:com.android.onetimeinitializer/u0a11 (adj 15): empty #17
02-02 14:37:50.783 666-680/? W/ActivityManager: Launch timeout has expired, giving up wake lock!
02-02 14:37:51.286 1676-1690/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xe8a470e0
02-02 14:37:51.293 1676-1676/? D/HTTPConnection: customadapter completed
02-02 14:37:51.299 1676-1676/? D/AndroidRuntime: Shutting down VM
02-02 14:37:51.299 1676-1676/? E/AndroidRuntime: FATAL EXCEPTION: main
                                                 Process: com.example.vinothvino.shortfilmy, PID: 1676
                                                 java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference
                                                     at android.view.LayoutInflater.from(LayoutInflater.java:229)
                                                     at android.widget.ArrayAdapter.<init>(ArrayAdapter.java:178)
                                                     at android.widget.ArrayAdapter.<init>(ArrayAdapter.java:137)
                                                     at com.example.vinothvino.shortfilmy.CustomAdapter.<init>(CustomAdapter.java:36)
                                                     at com.example.vinothvino.shortfilmy.MainActivity$AsyncHTTPTask.onPostExecute(MainActivity.java:154)
                                                     at com.example.vinothvino.shortfilmy.MainActivity$AsyncHTTPTask.onPostExecute(MainActivity.java:73)
                                                     at android.os.AsyncTask.finish(AsyncTask.java:651)
                                                     at android.os.AsyncTask.-wrap1(AsyncTask.java)
                                                     at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)
                                                     at android.os.Handler.dispatchMessage(Handler.java:102)
                                                     at android.os.Looper.loop(Looper.java:148)
                                                     at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
02-02 14:37:51.300 666-805/? W/ActivityManager:   Force finishing activity com.example.vinothvino.shortfilmy/.MainActivity
02-02 14:37:51.305 647-650/? D/PermissionCache: checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (348 us)
02-02 14:37:51.347 647-647/? E/EGL_emulation: tid 647: eglCreateSyncKHR(1215): error 0x3004 (EGL_BAD_ATTRIBUTE)
02-02 14:37:51.473 666-1706/? D/OpenGLRenderer: Use EGL_SWAP_behavior_PRESERVED: true
02-02 14:37:51.586 666-1706/? I/OpenGLRenderer: Initialized EGL, version 1.4
02-02 14:37:51.671 666-1706/? W/EGL_emulation: eglSurfaceAttrib not implemented
02-02 14:37:51.671 666-1706/? W/OpenGLRenderer: Failed to set EGL_SWAP_behavior on surface 0xd9c5e120, error=EGL_SUCCESS
02-02 14:37:51.966 666-680/? W/ActivityManager: Activity pause timeout for ActivityRecord{aa7125 u0 com.example.vinothvino.shortfilmy/.MainActivity t36 f}
02-02 14:37:52.138 989-1205/? W/EGL_emulation: eglSurfaceAttrib not implemented
02-02 14:37:52.138 989-1205/? W/OpenGLRenderer: Failed to set EGL_SWAP_behavior on surface 0xeeb93e00, error=EGL_SUCCESS
02-02 14:37:52.785 989-1205/? W/OpenGLRenderer: Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
02-02 14:37:52.785 989-1205/? W/OpenGLRenderer: Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
02-02 14:37:55.026 1676-1676/? I/Process: Sending signal. PID: 1676 SIG: 9
02-02 14:37:55.053 666-725/? W/AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client; transfer 4, track 48000 Hz, output 44100 Hz
02-02 14:37:55.055 666-708/? W/InputDispatcher: channel '881ce11 com.example.vinothvino.shortfilmy/com.example.vinothvino.shortfilmy.MainActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
02-02 14:37:55.055 666-708/? E/InputDispatcher: channel '881ce11 com.example.vinothvino.shortfilmy/com.example.vinothvino.shortfilmy.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
02-02 14:37:55.056 666-805/? I/WindowState: WIN DEATH: Window{881ce11 u0 com.example.vinothvino.shortfilmy/com.example.vinothvino.shortfilmy.MainActivity}
02-02 14:37:55.056 666-805/? W/InputDispatcher: Attempted to unregister already unregistered input channel '881ce11 com.example.vinothvino.shortfilmy/com.example.vinothvino.shortfilmy.MainActivity (server)'
02-02 14:37:55.056 666-678/? D/GraphicsStats: Buffer count: 3
02-02 14:37:55.057 666-1706/? E/Surface: getSlotFromBufferLocked: unknown buffer: 0xf2c73ff0
02-02 14:37:55.078 666-677/? I/ActivityManager: Process com.example.vinothvino.shortfilmy (pid 1676) has died
02-02 14:37:55.089 666-1007/? W/InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$[email protected] attribute=null, token = [email protected]
02-02 14:37:55.269 666-666/? W/NotificationService: Object died trying to hide notification android.app.ITransientNotification$Stub$[email protected] in package com.example.vinothvino.shortfilmy
02-02 14:37:55.269 666-666/? W/ActivityManager: setProcessForeground called on unknown pid: 1676
02-02 14:37:55.269 666-666/? W/NotificationService: Object died trying to show notification android.app.ITransientNotification$Stub$[email protected] in package com.example.vinothvino.shortfilmy
02-02 14:37:55.380 666-685/? W/AppOps: Finishing op nesting under-run: uid 1000 pkg android code 24 time=0 duration=0 nesting=0


Was This Post Helpful? 0
  • +
  • -

#8 ben255   User is offline

  • D.I.C Addict

Reputation: 44
  • View blog
  • Posts: 528
  • Joined: 09-September 13

Re: App force close automatically when opening. why?

Posted 03 February 2016 - 02:11 AM

Looks like your toast is throwing the exception
Was This Post Helpful? 0
  • +
  • -

#9 EndLessMind   User is offline

  • Android Expert
  • member icon

Reputation: 273
  • View blog
  • Posts: 1,252
  • Joined: 13-March 09

Re: App force close automatically when opening. why?

Posted 08 February 2016 - 08:03 PM

Try getting the LayoutInflater inside the constructor and store it as a global variable.

If that doesn't work, and you're still getting the same NullPointerException, then the context is probably null inside your AsyncTask.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1