Server freeze with "rcu_sched detected stalls on CPUs/tasks"
36
Problem solved by disabling SMP (added "nosmp" parameter in Grub conf). The server is running fine now.
Related videos on Youtube
![Sebastian Mocanu](https://i.stack.imgur.com/xSZUF.jpg?s=256&g=1)
Author by
Sebastian Mocanu
Updated on September 18, 2022Comments
-
Sebastian Mocanu almost 2 years
So I'm working on my android app, on a method that is supposed to get data from my views and assign it to my Post's class attributes. The problem is I keep getting NullPointerException on fieldsReader, which I'm using to get the data from the views.
This is the error:
java.lang.NullPointerException: Attempt to invoke virtual method 'android.text.Editable android.widget.EditText.getText()' on a null object reference
This is my code:
public class NewPostFragment extends Fragment{ Post post = new Post(); private NewPostViewModel newPostViewModel; static final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); private static final String TAG = NewPostFragment.class.getSimpleName(); private static final int REQUEST_CODE_DATE = 200; private static final int REQUEST_CODE_TIME = 201; private EditText editText_date; private EditText editText_time; public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { newPostViewModel = ViewModelProviders.of(this).get(NewPostViewModel.class); View root = inflater.inflate(R.layout.fragment_new_post, container, false); final TextView textView = root.findViewById(R.id.text_new_post); newPostViewModel.getText().observe(this, new Observer<String>() { @Override public void onChanged(@Nullable String s) { //textView.setText(s); } }); Button btn1 = (Button) root.findViewById(R.id.locationSearchButton); btn1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(getActivity(), MapsActivity.class); ( getActivity()).startActivity(intent); } }); Button btn2 = (Button) root.findViewById(R.id.post_button); btn2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { addPostToDatabase(getDataFromFields(v)); } }); return root; } public Post getDataFromFields(View root){ post.setAvailability(true); //a.setOwner(); EditText fieldsReader = (EditText) root.findViewById(R.id.postTitleField); post.setTitle(fieldsReader.getText().toString()); //ERROR ERROR ERROR ERROR ERROR ERROR fieldsReader = (EditText) root.findViewById(R.id.postDescription); post.setDescription(fieldsReader.getText().toString()); return post; }
-
user9517 about 10 yearsDoes plus10.blogspot.co.uk/2013/01/… help ?
-
Antares about 10 yearsI tried another similar solution : "nosmp". I'm waiting a few days to see if it solves the issue. I'll try pcie_aspm=off however because nosmp causes the server to use only one core so that's not optimal. Thanks !
-
-
kasperd about 10 yearsThat's going to decrease the server performance. But that is of course better than crashing.
-
Sebastian Mocanu over 4 yearsHello, thank you very much. The error disappeared from that row. The problem is the same error appears on the next .getText() now.. fieldsReader = (EditText) root.findViewById(R.id.postDescription); post.setDescription(fieldsReader.getText().toString()); //ERROR Do you have any idea about what might cause it? I can't figure out why, the syntax is the same as in the previous error row..
-
Asad Mahmood over 4 yearsi can't figure out further error without any hint or logcat, kindly post logcat error
-
Sebastian Mocanu over 4 yearsSo, in the above code, I was getting NullPointerException on:
post.setTitle(fieldsReader.getText().toString());
. I have modified the code the way you told me and the error disappeared from that line and appeared on:post.setDescription(fieldsReader.getText().toString());
.. This would be the stack: java.lang.NullPointerException: Attempt to invoke virtual method 'android.text.Editable android.widget.EditText.getText()' on a null object reference. -
Asad Mahmood over 4 yearsthe code seems nothing wrong or may be your edittext id is wrong otherwise you can post xml here
-
Sebastian Mocanu over 4 yearsyou are right. I got the wrong id. sorry for bothering and thank tou very much!