Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Jun 06, 2013 at 08:08 AM by Psymon for the following reason:

The question is answered, right answer was accepted

avatar image
1
Question by Psymon · Jul 20, 2012 at 10:18 AM · androidhome button

[Android] Game crash after hit the Home button

Hi everyone !

My game built with Unity 3.5.3f3 on a Samsung Galaxy S crash when I hit the HOME button on specific parts of the game.

Here's my logcat output :

 07-20 09:53:33.883: E/imdg81(2461): IsShutDownStarted()
 07-20 09:53:33.883: I/KeyInputQueue(2461): Input event
 07-20 09:53:33.887: I/PowerManagerService(2461): Ulight 3->7|0
 07-20 09:53:34.028: E/imdg81(2461): IsShutDownStarted()
 07-20 09:53:34.028: I/KeyInputQueue(2461): Input event
 07-20 09:53:34.211: I/ActivityManager(2461): Start proc com.android.settings for broadcast com.android.settings/.widget.SettingsAppWidgetProvider: pid=28382 uid=1000 gids={3003, 1015, 2001, 3002, 3001, 1006, 1007}
 07-20 09:53:34.258: D/PhoneWindow(28305): couldn't save which view has focus because the focused view com.unity3d.player.UnityPlayer$17@481af088 has no id.
 07-20 09:53:34.215: I/ActivityManager(2461): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.sec.android.app.twlauncher/.Launcher }
 07-20 09:53:34.344: I/Zygote(28382): Zygote: pid 28382 has INTERNET permission, then set capability for CAP_NET_RAW
 07-20 09:53:34.348: I/Zygote(28382): Zygote: pid 28382 has CALL PRIVILEGED permission, then set capability for CAP_SYS_ADMIN (21)
 07-20 09:53:34.368: D/dalvikvm(2364): GC_EXPLICIT freed 316 objects / 11952 bytes in 131ms
 07-20 09:53:34.391: D/Unity(28305): onDetachedFromWindow
 07-20 09:53:34.391: E/SensorManager(28305): unregisterListener: com.unity3d.player.h@481abea0 MS-3C Magnetic Sensor
 07-20 09:53:34.391: D/sensor_stub(2383): sensor_stub_activate sensors[00000002] mask[00000000]
 07-20 09:53:34.391: D/sensor_stub(2383): sensor_stub_activate current_active[00000010]
 07-20 09:53:34.395: D/sensor_stub(2383): sensor_stub_activate IN , LightSensor_enable: 1
 07-20 09:53:34.395: D/sensor_stub(2383): sensor_stub_activate OUT changed:0
 07-20 09:53:34.395: D/sensor_stub(2383): sensor_set_delay [60]
 07-20 09:53:34.395: E/SensorManager(28305): unregisterListener: com.unity3d.player.h@481abea0
 07-20 09:53:34.395: D/sensor_stub(2383): sensor_set_delay [60]
 07-20 09:53:34.442: D/dalvikvm(2364): GC_EXPLICIT freed 57 objects / 2696 bytes in 66ms
 07-20 09:53:34.485: D/dalvikvm(2364): GC_EXPLICIT freed 2 objects / 64 bytes in 36ms
 07-20 09:53:34.899: I/ActivityManager(2461): Start proc com.sec.android.app.twlauncher for activity com.sec.android.app.twlauncher/.Launcher: pid=28388 uid=10007 gids={3003, 1015, 3002}
 07-20 09:53:35.008: I/Zygote(28388): Zygote: pid 28388 has INTERNET permission, then set capability for CAP_NET_RAW
 07-20 09:53:35.008: I/Zygote(28388): Zygote: pid 28388 has CALL PRIVILEGED permission, then set capability for CAP_SYS_ADMIN (21)
 07-20 09:53:35.078: I/WindowManager(2461): Setting rotation to 0, animFlags=1
 07-20 09:53:35.102: I/ActivityManager(2461): Config changed: { scale=1.0 imsi=0/0 loc=fr_FR touch=3 keys=1/1/2 nav=1/1 orien=1 layout=34 uiMode=17 seq=346 FlipFont=0}
 07-20 09:53:35.368: I/ActivityThread(28388): Publishing provider InfoAlarm: com.sec.android.widgetapp.infoalarm.engine.InfoAlarmProvider
 07-20 09:53:35.836: I/global(2461): Default buffer size used in BufferedInputStream constructor. It would be better to be explicit if an 8k buffer is required.
 07-20 09:53:35.852: E/InfoAlarmProvider(28388): onCreate - createDataBase - full path = /dbdata/databases/com.sec.android.widgetapp.infoalarm/infoalarm.db
 07-20 09:53:35.852: E/InfoAlarmProvider(28388): onCreate - createDataBase - dir Path = /dbdata/databases/com.sec.android.widgetapp.infoalarm/
 07-20 09:53:35.852: I/InfoAlarmProvider(28388): DatabaseHelper() createDataBase() Enter...
 07-20 09:53:35.895: I/InfoAlarmProvider(28388): createDataBase - exist DB
 07-20 09:53:35.899: I/ActivityThread(28388): Publishing provider com.sec.android.app.twlauncher.settings: com.sec.android.app.twlauncher.LauncherProvider
 07-20 09:53:35.965: D/dalvikvm(28388): GC_EXTERNAL_ALLOC freed 2006 objects / 163864 bytes in 46ms
 07-20 09:53:35.985: I/Launcher(28388): onCreate():  product model family:S1 product model : GT-I9000
 07-20 09:53:36.051: D/Launcher.SWidgetPkgMgr(28388):   ----> running samsung widgets loader
 07-20 09:53:36.192: D/Launcher.SWidgetPkgMgr(28388):   -----> widget title=Actu amis vertical width=472 height=546
 07-20 09:53:36.196: D/Launcher.SWidgetPkgMgr(28388):   -----> widget title=Actu amis horizontal width=538 height=399
 07-20 09:53:36.207: D/Launcher.SWidgetPkgMgr(28388):   -----> widget title=Program Monitor vertical width=201 height=120
 07-20 09:53:36.207: D/Launcher.SWidgetPkgMgr(28388):   -----> widget title=Program Monitor horizontal width=201 height=120
 07-20 09:53:36.520: D/Launcher.SWidgetPkgMgr(28388):   -----> widget title=Days vertical width=480 height=600
 07-20 09:53:36.528: D/Launcher.SWidgetPkgMgr(28388):   -----> widget title=Days horizontal width=480 height=600
 07-20 09:53:36.547: D/Launcher.SWidgetPkgMgr(28388):   -----> widget title=Mon Quotidien vertical width=480 height=600
 07-20 09:53:36.547: D/Launcher.SWidgetPkgMgr(28388):   -----> widget title=Mon Quotidien horizontal width=636 height=600
 07-20 09:53:36.758: D/Launcher.SWidgetPkgMgr(28388):   -----> widget title=Y! Finance Horloge vertical width=480 height=450
 07-20 09:53:36.762: D/Launcher.SWidgetPkgMgr(28388):   -----> widget title=Y! Finance Horloge horizontal width=636 height=333
 07-20 09:53:36.961: D/Launcher.SWidgetPkgMgr(28388):   -----> widget title=Feeds and Updates vertical width=480 height=600
 07-20 09:53:36.981: D/Launcher.SWidgetPkgMgr(28388):   -----> widget title=Feeds and Updates horizontal width=636 height=444
 07-20 09:53:37.039: W/PowerManagerService(2461): Timer 0x7->0x3|0x0
 07-20 09:53:37.039: I/PowerManagerService(2461): Ulight 7->3|0
 07-20 09:53:37.368: D/Launcher.SWidgetPkgMgr(28388):   -----> widget title=Horloge du calendrier vertical width=480 height=450
 07-20 09:53:37.368: D/Launcher.SWidgetPkgMgr(28388):   -----> widget title=Horloge du calendrier horizontal width=636 height=333
 07-20 09:53:37.368: D/Launcher.SWidgetPkgMgr(28388):   ----> samsungwidgets loader completed
 07-20 09:53:37.524: I/AudioHardwareALSA(2365): Output standby called!!. Turn off PCM device.
 07-20 09:53:37.579: D/Launcher.Model(28388): startLoader isLaunching=true
 07-20 09:53:37.586: D/Launcher.Model(28388): step 1: loading workspace
 07-20 09:53:37.586: D/Launcher.Model(28388): loadAndBindWorkspace loaded=false
 07-20 09:53:37.664: V/SettingsProvider(2461): system <- value=0 name=mtp_usb_connection_status
 07-20 09:53:37.664: V/SettingsProvider(2461): property: sys.settings_system_version=47
 07-20 09:53:37.696: V/SettingsProvider(2461): notifying: content://settings/system/mtp_usb_connection_status
 07-20 09:53:37.696: I/Launcher(28388): onCreate() ended
 07-20 09:53:37.700: I/Launcher(28388): onResume(). mIsNewIntent : true
 07-20 09:53:37.700: E/(28388): onResume() check 0
 07-20 09:53:37.700: E/(28388): onResume() check 1
 07-20 09:53:37.704: E/(28388): onResume() check 2, mRestoring : false
 07-20 09:53:37.704: E/(28388): onResume() check 3
 07-20 09:53:37.704: E/(28388): onResume() check 4
 07-20 09:53:37.704: E/(28388): onResume() check 5
 07-20 09:53:37.707: E/Launcher(28388): MTP-LAUNCHER: media scanning not yet finished . 
 07-20 09:53:37.707: I/Launcher(28388): onResume() ended
 07-20 09:53:37.875: I/ActivityManager(2461): Displayed activity com.sec.android.app.twlauncher/.Launcher: 3467 ms (total 3467 ms)
 07-20 09:53:37.950: V/Launcher.Workspace(28388): onSizeChanged( 480,800,0,0)getWidth() = 480getHeight() = 800
 07-20 09:53:37.950: I/Launcher(28388): onWindowFocusChanged(true)
 07-20 09:53:38.075: V/Launcher.Workspace(28388): onSizeChanged( 480,762,480,800)getWidth() = 480getHeight() = 762
 07-20 09:53:38.403: I/ActivityManager(2461): Process com.MyApp (pid 28305) has died.
 07-20 09:53:38.403: I/WindowManager(2461): WIN DEATH: Window{484c4388 com.MyApp/com.unity3d.player.UnityPlayerActivity paused=false}
 07-20 09:53:38.403: I/WindowManager(2461): WIN DEATH: Window{483e58b0 SurfaceView paused=false}
 07-20 09:53:38.708: W/Launcher(28388): WallpaperManager setVisibility visible true

I guess my crash comes from this lines (especially the first one) :

 07-20 09:53:34.258: D/PhoneWindow(28305): couldn't save which view has focus because the focused view com.unity3d.player.UnityPlayer$17@481af088 has no id.
 07-20 09:53:34.391: E/SensorManager(28305): unregisterListener: com.unity3d.player.h@481abea0 MS-3C Magnetic Sensor
 07-20 09:53:34.395: E/SensorManager(28305): unregisterListener: com.unity3d.player.h@481abea0
 07-20 09:53:38.403: I/ActivityManager(2461): Process com.MyApp (pid 28305) has died.
 07-20 09:53:38.403: I/WindowManager(2461): WIN DEATH: Window{484c4388 com.MyApp/com.unity3d.player.UnityPlayerActivity paused=false}


I'm using EzGUI so I tried this solution but it didn't work.

I also tried this solution but it still not working.

I'm completely clueless on this problem. Could it be a memory problem ? (my game uses a lot of RAM but i don't have a better device to test my app with) What is this Sensor Listener ? I couldn't find on the web what does it mean.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

  • Sort: 
avatar image
1
Best Answer

Answer by Psymon · Jul 25, 2012 at 07:37 AM

After a lot of optimization on the VRAM usage, my game's not crashing anymore. But I still don't know how to solve the SensorManager error .

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Android, Game doesn't minimize when pressing power. -1 Answers

Send Application to background/Paused in Android 1 Answer

Android: Home button callback? 1 Answer

How to keep other activities on top after pressing the home button on Android? 0 Answers

[Android] Call Home button action from code 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges