I am facing the above problem on my handler which checks every time if your logged in but I am facing that problem how can I solve that?  Guys I have tried several methods but I am still getting the same problem it's the splash screen which checks every time so, the app is getting crash.  Here is my welcome screen  ```public class WelcomeScreen extends AppCompatActivity {      private ImageView logo;     private FirebaseAuth firebaseAuth;     private FirebaseDatabase firebaseDatabase;     private static int SPLASH_TIME_OUT = 5000;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setFullscreen ();         setContentView (R.layout.welcomescreen);         firebaseAuth = FirebaseAuth.getInstance ();         final String user_id = firebaseAuth.getCurrentUser ().getUid ();          final FirebaseUser firebaseUser = firebaseAuth.getInstance ().getCurrentUser ();         firebaseDatabase = FirebaseDatabase.getInstance ();        final DatabaseReference databaseReference = firebaseDatabase.getReference ().child ("Users").child (user_id);              logo= findViewById (R.id.logoocaap);          Animation animation = AnimationUtils.loadAnimation (this,R.anim.splashscreen);         logo.startAnimation (animation);           new Handler ().postDelayed (new Runnable () {            @Override            public void run() {                  //check if there's internet connection                  checkConnection();                   if(firebaseUser != null)                {                     databaseReference.addValueEventListener (new ValueEventListener () {                        @Override                        public void onDataChange(@NonNull DataSnapshot dataSnapshot) {```
129
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
118936
I am trying to follow the best practice design patterns for triggers but get the error Constructor not defined: [CaseTriggerHandler].(). What am I missing?  Trigger  trigger CaseTrigger on Case (before insert, before update, before delete, after insert, after update, after delete, after undelete) {      CaseTriggerHandler handler = new CaseTriggerHandler();      //Before Insert     if(Trigger.isInsert &amp;&amp; Trigger.isBefore){         handler.OnBeforeInsert(Trigger.new);     }     //After Insert     else if(Trigger.isInsert &amp;&amp; Trigger.isAfter){         handler.OnAfterInsert(Trigger.new);     }     //Before Update     else if(Trigger.isUpdate &amp;&amp; Trigger.isBefore){         handler.OnBeforeUpdate(Trigger.old, Trigger.new, Trigger.newMap);     }     //After Update     else if(Trigger.isUpdate &amp;&amp; Trigger.isAfter){         handler.OnAfterUpdate(Trigger.old, Trigger.new, Trigger.newMap);     }     //Before Delete     else if(Trigger.isDelete &amp;&amp; Trigger.isBefore){         handler.OnBeforeDelete(Trigger.old, Trigger.oldMap);     }     //After Delete     else if(Trigger.isDelete &amp;&amp; Trigger.isAfter){         handler.OnAfterDelete(Trigger.old, Trigger.oldMap);     }     //After Undelete     else if(Trigger.isUnDelete){         handler.OnUndelete(Trigger.new);     } }   Handler      public with sharing class CaseTriggerHandler {      private boolean isExecuting = false;      public CaseTriggerHandler(boolean isExecuting){         this.isExecuting = isExecuting;     }      public void OnBeforeInsert(List&lt;Case&gt; newCases){         //EXECUTE BEFORE INSERT LOGIC     }      public void OnAfterInsert(List&lt;Case&gt; newCases){         //EXECUTE AFTER INSERT LOGIC     }      public void OnBeforeUpdate(List&lt;Case&gt; oldCases, List&lt;Case&gt; updatedCases, Map&lt;Id, Case&gt; CaseMap){         //BEFORE UPDATE LOGIC     }      public void OnAfterUpdate(List&lt;Case&gt; oldCases, List&lt;Case&gt; updatedCases, Map&lt;Id, Case&gt; CaseMap){         //AFTER UPDATE LOGIC     }      public void OnBeforeDelete(List&lt;Case&gt; CasesToDelete, Map&lt;Id, Case&gt; CaseMap){         //BEFORE DELETE LOGIC     }      public void OnAfterDelete(List&lt;Case&gt; deletedCases, Map&lt;Id, Case&gt; CaseMap){         //AFTER DELETE LOGIC     }      public void OnUndelete(List&lt;Case&gt; restoredCases){         //AFTER UNDELETE LOGIC     }      public boolean IsTriggerContext{         get{ return isExecuting;}     } }
89603
Here I'm talking about a handler that covers all the s and that accepts SObjects of arbitrary type. And the recursion problem is where a change caused by a trigger results in that trigger getting called again and so on creating an infinite loop.  So an example trigger would be:  trigger ExampleTrigger on Example__c (before insert, before update, before delete,         after insert, after update, after delete, after undelete) {      SObjectType t = Example__c.SObjectType;     MyHandler.handle(t, Trigger.operationType, Trigger.oldMap, Trigger.newMap); }   with the handler:  public inherited sharing MyHandler {      public void handle(SObjectType t, TriggerOperation op,             Map&lt;Id, SObject&gt; oldMap, Map&lt;Id, SObject&gt; newMap) {          // Logic conditional on t and op that does updates that cause recursion         ...     } }   Often single static Boolean flags are talked about to block trigger recursion. (Though an approach based on change checking that is designed to settle to the correct state can be needed instead to produce the correct business results.)  But for the simple case of complete blocking, (and now I'm writing this I think the answer is "yes"), is this pattern sufficient?  public inherited sharing MyHandler {      // Implements equals and hashCode     private class Kind {         ...     }      private static final Set&lt;Kind&gt; BLOCKED = new Set&lt;Kind&gt;();      public void handle(SObjectType t, TriggerOperation op,             Map&lt;Id, SObject&gt; oldMap, Map&lt;Id, SObject&gt; newMap) {          if (BLOCKED.contains(new Kind(t, op))) return;         ...         BLOCKED.add(new Kind(t, TriggerOperation.BEFORE_INSERT));         BLOCKED.add(new Kind(t, TriggerOperation.AFTER_INSERT));         insert sobs;         ...     } }
20122
I just now  from the Android app (the first I've actually published using it).  After telling me it was successfully submitted (which it was), I was taken to a screen in which I was presumably going to get to view my question. But on that very screen, I got a message saying: 'Loading the question failed.'  (The retry button didn't do anything.)    I'm using app version 1.0.11 on a HTC One running Android 4.3.  Here's what I did exactly:   Added tags to the question: , , then , then . (then removed ) Filled out the title Filled out the body Hit submit, without a preview.
81052
// Insert an account  Account a = new Account(Name='Test',                      annualRevenue=100.0);  insert a;  // Create an approval request for the account Approval.ProcessSubmitRequest req1 =        new Approval.ProcessSubmitRequest(); req1.setObjectId(a.id); req1.setNextApproverIds(new Id[] {'***************'}); // Submit the approval request for the account Approval.ProcessResult result =                     Approval.process(req1);   Am trying to execute this code in anonymous block. How ever when tried in trigger i got same error all the time. Hard coded next approvers ID. No luck.  Any suggestions on what am I doing wrong ? Please help!!
18236
Steps to Reproduce   Tap faster on the code. or Tap once on a huge code.   but happens only when  setupForGeneric() is called, might be a bug related to   private void setupForCode()   { String str = getIntent().getStringExtra("com.stackexchange.marvin:code_block"); PrettyWebView localPrettyWebView = (PrettyWebView)findViewById(R.id.code); localPrettyWebView.setPostBody("&lt;pre&gt;&lt;code&gt;" + TextUtils.htmlEncode(str) + "&lt;/pre&gt;&lt;/code&gt;", false); localPrettyWebView.setBackgroundColor("#eeeeee"); }  private void setupForGeneric() { String str = getIntent().getStringExtra("com.stackexchange.marvin:web_url"); PrettyWebView localPrettyWebView = (PrettyWebView)findViewById(R.id.code); localPrettyWebView.getSettings().setBuiltInZoomControls(true); localPrettyWebView.getSettings().setLoadWithOverviewMode(true); localPrettyWebView.getSettings().setUseWideViewPort(true); localPrettyWebView.loadUrl(str); localPrettyWebView.setBackgroundColor("#eeeeee"); }   Log  09-05 03:54:30.312: E/AndroidRuntime(26264): FATAL EXCEPTION: WebViewCoreThread  09-05 03:09:39.522: E/Crittercism(18318): java.lang.NullPointerException: [v0.1.22]  09-05 03:09:39.522: E/Crittercism(18318):   at android.content.ComponentName.&lt;init&gt;(ComponentName.java:75) 09-05 03:09:39.522: E/Crittercism(18318):   at android.content.Intent.&lt;init&gt;(Intent.java:3156) 09-05 03:09:39.522: E/Crittercism(18318):   at com.stackexchange.marvin.ui.ViewPopupActivity.showCode(ViewPopupActivity.java:25) 09-05 03:09:39.522: E/Crittercism(18318):   at com.stackexchange.marvin.ui.question.QuestionFragment$1.onCodeClicked(QuestionFragment.java:67) 09-05 03:09:39.522: E/Crittercism(18318):   at com.stackexchange.marvin.ui.common.PrettyWebView$WebAppInterface.codeClicked(PrettyWebView.java:197) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore.nativeTouchUp(Native Method) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore.nativeTouchUp(Native Method) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore.access$4000(WebViewCore.java:59) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore$EventHub$1.handleMessage(WebViewCore.java:1449) 09-05 03:09:39.522: E/Crittercism(18318):   at android.os.Handler.dispatchMessage(Handler.java:99) 09-05 03:09:39.522: E/Crittercism(18318):   at android.os.Looper.loop(Looper.java:137) 09-05 03:09:39.522: E/Crittercism(18318):   at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:790) 09-05 03:09:39.522: E/Crittercism(18318):   at java.lang.Thread.run(Thread.java:856)
439
Consider:  namespace WindowsApplication1 {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }          private void button1_Click(object sender, EventArgs e)         {             //int[] val = { 0, 0};             int val;             if (textBox1.Text == "")             {                 MessageBox.Show("Input any no");             }             else             {                 val = Convert.ToInt32(textBox1.Text);                 Thread ot1 = new Thread(new ParameterizedThreadStart(SumData));                 ot1.Start(val);             }         }          private static void ReadData(object state)         {             System.Windows.Forms.Application.Run();         }          void setTextboxText(int result)         {             if (this.InvokeRequired)             {                 this.Invoke(new IntDelegate(SetTextboxTextSafe), new object[] { result });             }             else             {                 SetTextboxTextSafe(result);             }         }          void SetTextboxTextSafe(int result)         {             label1.Text = result.ToString();         }          private static void SumData(object state)         {             int result;             //int[] icount = (int[])state;             int icount = (int)state;              for (int i = icount; i &gt; 0; i--)             {                 result += i;                 System.Threading.Thread.Sleep(1000);             }             setTextboxText(result);         }          delegate void IntDelegate(int result);          private void button2_Click(object sender, EventArgs e)         {             Application.Exit();         }     } }   Why is this error occurring?     An object reference is required for the nonstatic field, method, or property 'WindowsApplication1.Form1.setTextboxText(int)
58610
This is a follow-up to .     When I click a link to an SE site in the Android app, it gives me an "open with" pop-up that has two options:         Chrome   Stack Exchange         I can then choose to open SE posts like this "Just once" or "Always."      The problem is that when I set the SE app to "always," and I click "open in browser,"   Except, the app crashes when trying to open it in browser.  LogCat (just right after selecting "Open in browser")  01-22 18:03:36.354: E/AndroidRuntime(16064): FATAL EXCEPTION: main 01-22 18:03:36.354: E/AndroidRuntime(16064): Process: com.stackexchange.marvin, PID: 16064 01-22 18:03:36.354: E/AndroidRuntime(16064): java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference 01-22 18:03:36.354: E/AndroidRuntime(16064):    at com.stackexchange.marvin.utils.Helpers.getNonMarvinViewIntent(Helpers.java:452) 01-22 18:03:36.354: E/AndroidRuntime(16064):    at com.stackexchange.marvin.ui.question.QuestionDialog$1.onClick(QuestionDialog.java:39) 01-22 18:03:36.354: E/AndroidRuntime(16064):    at com.android.internal.app.AlertController$AlertParams$3.onItemClick(AlertController.java:1108) 01-22 18:03:36.354: E/AndroidRuntime(16064):    at android.widget.AdapterView.performItemClick(AdapterView.java:310) 01-22 18:03:36.354: E/AndroidRuntime(16064):    at android.widget.AbsListView.performItemClick(AbsListView.java:1145) 01-22 18:03:36.354: E/AndroidRuntime(16064):    at android.widget.AbsListView$PerformClick.run(AbsListView.java:3066) 01-22 18:03:36.354: E/AndroidRuntime(16064):    at android.widget.AbsListView$3.run(AbsListView.java:3903) 01-22 18:03:36.354: E/AndroidRuntime(16064):    at android.os.Handler.handleCallback(Handler.java:739) 01-22 18:03:36.354: E/AndroidRuntime(16064):    at android.os.Handler.dispatchMessage(Handler.java:95) 01-22 18:03:36.354: E/AndroidRuntime(16064):    at android.os.Looper.loop(Looper.java:148) 01-22 18:03:36.354: E/AndroidRuntime(16064):    at android.app.ActivityThread.main(ActivityThread.java:5417) 01-22 18:03:36.354: E/AndroidRuntime(16064):    at java.lang.reflect.Method.invoke(Native Method) 01-22 18:03:36.354: E/AndroidRuntime(16064):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 01-22 18:03:36.354: E/AndroidRuntime(16064):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)   I suspect it's related to , but not sure.  Specs:   Device model: Nexus 5 Android version: Android 6.0.1 SE app version: 1.0.82 (beta) Installed browser: Chrome 47.0.2526.83 (latest at current writing)
17304
What are the actions that might destructively interfere with the lightning app's lifecycle? Is a breakpoint\debugger statement one of such?  For example there is a case that I happen to meet regularly after Winter 17 release (everything below is performed with Locker Service on, switching it off is not an option). Assume we have some component with an init event handler and "select" element:  ... &lt;aura:handler name="init" value="{!this}" action="{!c.doInit}"/&gt; &lt;select aura:id="select-element" class="slds-select" onchange="{!c.handleSelect}"&gt;&lt;/select&gt;   And here's an "init" handler:  doInit : function(component, event, helper) {     // do smth     debugger; // this can be a debugger statement or manually put browser's breakpoint }   If we happen to have an open console and we catch this breakpoint (immediately resuming it, or not) - in any time later there's no chance to get access to element:  ... component.find("select-element").getElement;   Same happens with div element's, maybe with others.  With absolutely same component's layout and js-controller\helper etc. but with browser's console closed (hence the breakpoint isn't caught) getElement function is there and some code that depends on it will execute successfully.  EDIT: the DOM element is there already (meaning if I use afterRender or some custom button to get a breakpoint far after the init() was executed), I can see it and interact with it - but the getElement function nevertheless is unreachable at that same moment.
113159
I'm not sure why I'm getting this error, but shouldn't this code compile, since I'm already checking to see if queue is getting initialized?   public static void Main(String[] args) {     Byte maxSize;     Queue queue;      if(args.Length != 0)     {         if(Byte.TryParse(args[0], out maxSize))             queue = new Queue(){MaxSize = maxSize};         else             Environment.Exit(0);     }     else     {         Environment.Exit(0);     }      for(Byte j = 0; j &lt; queue.MaxSize; j++)         queue.Insert(j);     for(Byte j = 0; j &lt; queue.MaxSize; j++)         Console.WriteLine(queue.Remove()); }   So if queue is not initialized, then the for loops aren't reachable right? Since the program already terminates with Environment.Exit(0)?  Hope ya'll can give me some pointers :)  Thanks.
77120
I am trying to implement  and below is my code and debug log - any help is appreciated.  Http httpProtocol = new Http();    HttpRequest request = new HttpRequest(); request.setHeader('Content-Type', 'application/json;'); request.setEndPoint('https://test.salesforce.com/services/oauth2/token'); request.setMethod('POST'); String strbody = '{"grant_type":"Password", "password":"MY PASSWORD + TOKEN", "username":"SANDBOX USER NAME",  "client_secret":"secret",   "client_id":"Client id from remote setttings"}'; request.setBody(strbody); HttpResponse response = httpProtocol.send(request); String jsonInput = response.getBody(); system.debug('jsonInput===&gt;'+jsonInput);   Debug log -   15:55:38.068 (68324000)|SYSTEM_METHOD_ENTRY|[5]|System.HttpRequest.setMethod(String) 15:55:38.068 (68346000)|SYSTEM_METHOD_EXIT|[5]|System.HttpRequest.setMethod(String) 15:55:38.068 (68350000)|STATEMENT_EXECUTE|[6] 15:55:38.068 (68356000)|HEAP_ALLOCATE|[6]|Bytes:357 15:55:38.068 (68381000)|VARIABLE_ASSIGNMENT|[6]|strbody|"{\"grant_type\":\"Passw (337 more) ..." 15:55:38.068 (68387000)|STATEMENT_EXECUTE|[7] 15:55:38.068 (68407000)|SYSTEM_METHOD_ENTRY|[7]|System.HttpRequest.setBody(String) 15:55:38.068 (68440000)|SYSTEM_METHOD_EXIT|[7]|System.HttpRequest.setBody(String) 15:55:38.068 (68445000)|STATEMENT_EXECUTE|[8] 15:55:38.068 (68478000)|SYSTEM_METHOD_ENTRY|[8]|System.Http.send(APEX_OBJECT) 15:55:38.068 (68568000)|CALLOUT_REQUEST|[8]|System.HttpRequest[Endpoint=https://test.salesforce.com/services/oauth2/token, Method=POST] 15:55:38.483 (483258000)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:219 15:55:38.483 (483399000)|CALLOUT_RESPONSE|[8]|System.HttpResponse[Status=Bad Request, StatusCode=400] 15:55:38.483 (483424000)|HEAP_ALLOCATE|[8]|Bytes:96 15:55:38.483 (483444000)|SYSTEM_METHOD_EXIT|[8]|System.Http.send(APEX_OBJECT) 15:55:38.483 (483615000)|VARIABLE_ASSIGNMENT|[8]|response|"System.HttpResponse[Status=Bad Request, StatusCode=400]"|0x1b22c3f1 15:55:38.483 (483627000)|STATEMENT_EXECUTE|[9] 15:55:38.483 (483666000)|SYSTEM_METHOD_ENTRY|[9]|System.HttpResponse.getBody() 15:55:38.483 (483742000)|HEAP_ALLOCATE|[9]|Bytes:81 15:55:38.483 (483751000)|SYSTEM_METHOD_EXIT|[9]|System.HttpResponse.getBody() 15:55:38.483 (483780000)|VARIABLE_ASSIGNMENT|[9]|jsonInput|"{\"error\":\"unsupporte (61 more) ..." 15:55:38.483 (483786000)|STATEMENT_EXECUTE|[10] 15:55:38.483 (483794000)|HEAP_ALLOCATE|[10]|Bytes:13 15:55:38.483 (483980000)|HEAP_ALLOCATE|[10]|Bytes:94 15:55:38.483 (483999000)|SYSTEM_METHOD_ENTRY|[10]|System.debug(ANY) 15:55:38.484 (484025000)|USER_DEBUG|[10]|DEBUG|jsonInput===&gt;{"error":"unsupported_grant_type","error_description":"grant type not supported"}
118019
If you follow a link to a question (within another question), then tap Favourite (on the linked question) and then try to go back to the previous question immediately via the Android system back button, the app crashes. This causes a crash every time.  This is on a Nexus 5 running Android 5.1.1.
73868
I need help. I am currently trying to test this code before uploading  public class CoreValuesExt { ApexPages.StandardController sc; public boolean readonly {get; set;} public Core_Values__c cv {get; set;} public integer countEdit = 1; public string buttonValue {get; set;} public integer recordScan;  public CoreValuesExt(ApexPages.StandardController sc) {     this.sc = sc;     cv = new Core_Values__c();     cv.Account__c = sc.getid();      readonly = true;     buttonValue = 'Edit';     recordScan = [SELECT COUNT() FROM Core_Values__c WHERE Account__c = :cv.Account__c];    if (recordScan != 0){    cv = [SELECT id, HSE__c, Professionalism_Integrity__c, Quality_Accuracy__c, Technology_Innovation__c, Timeliness__c, Value_for_money__c FROM Core_Values__c WHERE Account__c = :cv.Account__c];     }  }  public ApexPages.PageReference Save() {     return sc.Save(); }  public void ApplyAction() {     countEdit++;     Integer modolus = Math.mod(countEdit, 2);     String total = cv.HSE__c + cv.Professionalism_Integrity__c + cv.Quality_Accuracy__c + cv.Technology_Innovation__c + cv.Value_for_Money__c + cv.Timeliness__c;     if(modolus == 0)     {         readonly = false;         buttonValue = 'Save';     }     else     {         if(total != 'nullnullnullnullnullnull')            {         if (recordScan == 0){         insert cv;         readonly = true;         buttonValue = 'Edit';         }         else         {         update cv;         readonly = true;         buttonValue = 'Edit';         }         }     }    }   }  With this trigger.  trigger CoreValuesTrigger on Core_Values__c (before insert) {  Core_Values__c cvs = Trigger.new; CoreValuesExt.ApplyAction(cvs);  }   But when I try to save, I get a message saying:      Illegal assignment from List to   CoreValuesExt__Core_Values__c at line 3 column 1   "  How do I go through with this? I need help. Thanks
123913
App version: 1.0.52  When you edit a question and rotate the screen while the "Getting preview" or "Posting edit" dialog is showing the app will crash.  12-25 21:38:07.033 E/AndroidRuntime(4768): FATAL EXCEPTION: main 12-25 21:38:07.033 E/AndroidRuntime(4768): Process: com.stackexchange.marvin, PID: 4768 12-25 21:38:07.033 E/AndroidRuntime(4768): java.lang.IllegalArgumentException: View=com.android.internal.policy.impl.PhoneWindow$DecorView{42440ba0 V.E..... R......D 0,0-684,192} not attached to window manager 12-25 21:38:07.033 E/AndroidRuntime(4768): at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:370) 12-25 21:38:07.033 E/AndroidRuntime(4768): at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:299) 12-25 21:38:07.033 E/AndroidRuntime(4768): at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:84) 12-25 21:38:07.033 E/AndroidRuntime(4768): at android.app.Dialog.dismissDialog(Dialog.java:329) 12-25 21:38:07.033 E/AndroidRuntime(4768): at android.app.Dialog.dismiss(Dialog.java:312) 12-25 21:38:07.033 E/AndroidRuntime(4768): at com.stackexchange.marvin.core.OperationThatCanFail$1.onPostExecute(OperationThatCanFail.java:81) 12-25 21:38:07.033 E/AndroidRuntime(4768): at com.stackexchange.marvin.core.OperationThatCanFail$1.onPostExecute(OperationThatCanFail.java:67) 12-25 21:38:07.033 E/AndroidRuntime(4768): at android.os.AsyncTask.finish(AsyncTask.java:632) 12-25 21:38:07.033 E/AndroidRuntime(4768): at android.os.AsyncTask.access$600(AsyncTask.java:177) 12-25 21:38:07.033 E/AndroidRuntime(4768): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645) 12-25 21:38:07.033 E/AndroidRuntime(4768): at android.os.Handler.dispatchMessage(Handler.java:102) 12-25 21:38:07.033 E/AndroidRuntime(4768): at android.os.Looper.loop(Looper.java:136) 12-25 21:38:07.033 E/AndroidRuntime(4768): at android.app.ActivityThread.main(ActivityThread.java:5097) 12-25 21:38:07.033 E/AndroidRuntime(4768): at java.lang.reflect.Method.invokeNative(Native Method) 12-25 21:38:07.033 E/AndroidRuntime(4768): at java.lang.reflect.Method.invoke(Method.java:515) 12-25 21:38:07.033 E/AndroidRuntime(4768): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) 12-25 21:38:07.033 E/AndroidRuntime(4768): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) 12-25 21:38:07.033 E/AndroidRuntime(4768): at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132) 12-25 21:38:07.033 E/AndroidRuntime(4768): at dalvik.system.NativeStart.main(Native Method) 12-25 21:38:07.035 W/ActivityManager(27384):   Force finishing activity com.stackexchange.marvin/.ui.AskOrEditQuestionActivity
7315
Recently, apps that are fine an hour ago now crash when I open them. The crash report message seems to be caused by a null pointer exception (NPE) in com.google.android.trichromelibrary. Apps affected for me:  Gmail Dashlane  Is it just me, or is there actually something wrong with the library? How can I fix these affected apps? Crash report: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** Build fingerprint: 'Xiaomi/polaris/polaris:10/QKQ1.190828.002/20.9.4:user/release-keys' Revision: '0' ABI: 'arm64' Timestamp: ... pid: ..., tid: ..., name: com.dashlane &gt;&gt;&gt; com.dashlane &lt;&lt;&lt; uid: ... signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 Cause: null pointer dereference          ...  backtrace:     #00 pc 00000000038621f0 /data/app/ com.google.android.trichromelibrary 438909034-YaxP9ttrIDcQBfleP5vm7Q==/base.apk! libmonochrome_64.so (offset 0x646000) (BuildId: ... )  (click  for the screenshot of the bug report)
26143
It keeps crashing and this is the newest one:  Anonymous UUID:       0BCEAA1D-32A3-1735-AF5F-607108F40027  Wed Jun 13 18:53:02 2018  *** Panic Report *** panic(cpu 0 caller 0xffffff8016f154f0):  initproc exited -- exit reason namespace 2 subcode 0xa description: none  Thread 1 crashed  RAX: 0x0000000000000010, RBX: 0x00000001047f4f28, RCX: 0x00000001047a6a80, RDX: 0x00000001047f2000 RSP: 0x0000700003560250, RBP: 0x00007000035602f0, RSI: 0x000000000004b000, RDI: 0x00000001047f7410 R8:  0x0000000000000000, R9:  0x0000000000000e20, R10: 0x00000001047a6a10, R11: 0x0000000000000001 R12: 0x0000000000000001, R13: 0x0000000000001cf0, R14: 0x0000000000000001, R15: 0x0000000000000001 RFL: 0x0000000000010202, RIP: 0x00007fff6e9497c4, CS:  0x000000000000002b, SS:  0x0000000000000023  Thread 0: 0xffffff80258a8000 0x00007fff6ea9402a 0x00007fff6e915cc0 0x0000000000000000  Thread 1: 0xffffff802683f290 0x00007fff6e9497c4 0x00007fff6e94aa8d 0x00007fff6e94aca5 0x00007fff6e9521c4 0x00007fff6e9a45b1 0x00000001047c8c95 0x00000001047d89ea 0x00007fff6e909db8 0x00007fff6e91ce81 0x00007fff6e90c081 0x00007fff6e91e07a 0x00007fff6e911166 0x00007fff6e91ef0d 0x00007fff6e922d21 0x00007fff6ec5afd2 0x00007fff6ec5abe9 0x0000000000000000  Thread 2: 0xffffff8029432c70 0x00007fff6ea955b2 0x00007fff6e91ce81 0x00007fff6e90c081 0x00007fff6e91e07a 0x00007fff6e911166 0x00007fff6e91ef0d 0x00007fff6e922d21 0x00007fff6ec5afd2 0x00007fff6ec5abe9 0x0000000000000000  Thread 3: 0xffffff802c2c54f0 0x00007fff6ec5abdc  Thread 4: 0xffffff8027d56650 0x00007fff6ec5abdc   Mac OS version: 17F77  Kernel version: Darwin Kernel Version 17.6.0: Tue May  8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64 Kernel UUID: CC1699EE-71B5-3AF1-AAA3-6DBD16222B92 System model name: MacBookAir7,2 (Mac-937CB26E2E02BB01) Root disk errors: "Could not recover SATA HDD after 5 attempts. Terminating."  EOF Model: MacBookAir7,2, BootROM MBA71.0177.B00, 2 processors, Intel Core i5, 1.6 GHz, 4 GB, SMC 2.27f2 Graphics: Intel HD Graphics 6000, Intel HD Graphics 6000, Built-In Memory Module: BANK 0/DIMM0, 2 GB, DDR3, 1600 MHz, 0x80AD, 0x483943434E4E4E384A544D4C41522D4E544D Memory Module: BANK 1/DIMM0, 2 GB, DDR3, 1600 MHz, 0x80AD, 0x483943434E4E4E384A544D4C41522D4E544D AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x117), Broadcom BCM43xx 1.0 (7.77.37.31.1a9) Bluetooth: Version 6.0.6f2, 3 services, 27 devices, 1 incoming serial ports Network Service: Wi-Fi, AirPort, en0 Serial ATA Device: APPLE SSD SM0256G, 251 GB USB Device: USB 3.0 Bus USB Device: BRCM20702 Hub USB Device: Bluetooth USB Host Controller Thunderbolt Bus: MacBook Air, Apple Inc., 27.2
10226
I have a general exception handler, Application_error in my global.asax where I'm trying to isolate all the uncaught exceptions on all my many pages. I don't want to use Page_error to catch exception because it's inefficient to call that on so many pages. So where in the exception can I find what page actually caused the exception?