Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7867637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:45:31+00:00 2026-06-03T00:45:31+00:00

Today, I found my program has different unknown error in emulator and my phone.

  • 0

Today, I found my program has different unknown error in emulator and my phone. Because I don’t have any idea about it, so can anyone give me some hints?

In my program, it exist the following code:

requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

Case 1: The program is running in emulator

It can run normally, until I changed the screen orientation. I had to debug. I found that it throw error because some value changed to null after orientation.

following is the logcat:

04-25 22:04:35.378: W/dalvikvm(520): threadid=23: thread exiting with uncaught exception (group=0x4001aa28)

04-25 22:04:35.378: E/AndroidRuntime(520): Uncaught handler: thread Thread-15 exiting due to uncaught exception

04-25 22:04:35.388: E/AndroidRuntime(520): java.lang.NullPointerException

04-25 22:04:35.388: E/AndroidRuntime(520):  at com.mytest.testit.Maincore.logicGo(Maincore.java:244)

04-25 22:04:35.388: E/AndroidRuntime(520):  at com.mytest.testit.Maincore.run(Maincore.java:325)

04-25 22:04:35.388: E/AndroidRuntime(520):  at java.lang.Thread.run(Thread.java:1060)

04-25 22:04:35.398: I/dalvikvm(520): threadid=7: reacting to signal 3

04-25 22:04:35.418: I/dalvikvm(520): Wrote stack trace to '/data/anr/traces.txt'

Case 2: The program is running in my phone

It can run normally even though I rotate my phone. But if I lock and unlock the phone, the program will throw error. About this error, I don’t know how to trace. It is because this problem will not appear at the emulator.

Can anyone give some hints for me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T00:45:32+00:00Added an answer on June 3, 2026 at 12:45 am

    When you rotate the device, the activity is re-created. Any data you want to save, you need to do so in onSaveInstanceState();

    There is a good answer about it here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Today I am writing a small program in Haskell. I found that in ghci's
Today I found the OracleCommand.InitialLOBFetchSize property ( documentation ). Because I'm using NHibernate (which
Today I found JSP throw NullPointException error in the following line _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory()
I have a program written in VB that has DataDynamics ActiveReports as well as
I wrote this simple program today, but I found that cin.get() refuses to work
Today I started thinking about a new project, and I found one. The goal
I recently found this theorem here , (at the bottom): Any program can be
I have been doing a bit of testing with images today and found that
Today I found LiquiBase project and I think it is very interesting. I would
Today I found the following: #include <stdio.h> int main(){ char x = 255; int

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.