पर ऐप चल रहा है, जबकि पृष्ठभूमि प्रक्रिया यादृच्छिक रूप से मर रही है। मैंने एक एंड्रॉइड ऐप लिखा है जो सैमसंग एस 3 को छोड़कर मैंने कोशिश किए हर फोन पर समस्याओं के बिना चलता है। क्या होता है कि, जबकि मेरा ऐप चल रहा है, अन्य पृष्ठभूमि प्रक्रियाएं (अन्य ऐप्स, जो है) मरना शुरू कर देंगे। उदाहरण के लिए, मेरे ऐप का उपयोग करने के कुछ समय बाद, लाइव वॉलपेपर मर जाएगा, और उपयोगकर्ता को मेरे ऐप से बाहर निकलने के बाद अपने फोन पर ब्लैक बैकग्राउंड मिलेगी। और अंत में, इसका उपयोग करने के कुछ समय बाद, मेरे ऐप को ओएस द्वारा भी मार दिया गया। निराशाजनक बात यह है कि मुझे लॉग में कोई त्रुटि संदेश नहीं दिखाई दे रहा है जो मुझे इस बात का संकेत देगा कि वास्तव में समस्या क्या है।सैमसंग एस 3
यह केवल सैमसंग एस 3 पर होता है (और उदाहरण के लिए एस 2 पर नहीं)।
मैंने सोचा था कि यह स्मृति से संबंधित था, क्योंकि मेरा ऐप बहुत मेमोरी गहन है (यह वेब से बहुत सारी छवियां लोड कर रहा है), लेकिन मुझे लॉग में कोई "स्मृति नहीं" त्रुटियां नहीं दिखाई दे रही हैं।
मुझे यह भी संदेह है कि मैं जिस HTTP ढांचे का उपयोग कर रहा हूं वह छोटी हो सकती है, इसलिए मैंने अपाचे एचटीपी कॉम्पोनेंट्स से java.net पर स्विच किया। HttpURLConnection, लेकिन इससे मदद नहीं मिली।
यह क्यों हो रहा है या इसे डीबग करने के तरीके के बारे में कोई विचार की सराहना की जाएगी।
यहाँ लॉग से एक अंश है जो मर रहा है कुछ पृष्ठभूमि प्रक्रियाओं से पता चलता है (उदाहरण के लिए, लाइव वॉलपेपर):
01-07 01:57:37.245: I/InputDispatcher(2296): Delivering touch to current input target: action: 0x1
01-07 01:57:37.505: D/dalvikvm(29490): GC_FOR_ALLOC freed 1535K, 17% free 28032K/33735K, paused 71ms, total 71ms
01-07 01:57:37.580: D/dalvikvm(6718): WAIT_FOR_CONCURRENT_GC blocked 0ms
01-07 01:57:37.620: D/dalvikvm(6718): GC_EXPLICIT freed 91K, 9% free 17663K/19399K, paused 3ms+5ms, total 40ms
01-07 01:57:38.190: I/InputReader(2296): Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.428 ]
01-07 01:57:38.190: I/InputDispatcher(2296): Delivering touch to current input target: action: 0x0
01-07 01:57:38.190: I/InputDispatcher(2296): Delivering touch to current input target: action: 0x0
01-07 01:57:38.190: I/InputDispatcher(2296): Delivering touch to current input target: action: 0x0
01-07 01:57:38.190: I/InputDispatcher(2296): Delivering touch to current input target: action: 0x0
01-07 01:57:38.190: I/InputDispatcher(2296): Delivering touch to current input target: action: 0x0
01-07 01:57:38.335: I/InputReader(2296): Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=]
01-07 01:57:38.335: I/InputDispatcher(2296): Delivering touch to current input target: action: 0x1
01-07 01:57:38.335: I/InputDispatcher(2296): Delivering touch to current input target: action: 0x1
01-07 01:57:38.335: I/InputDispatcher(2296): Delivering touch to current input target: action: 0x1
01-07 01:57:38.750: D/dalvikvm(29490): GC_FOR_ALLOC freed 1688K, 18% free 27981K/33735K, paused 114ms, total 114ms
01-07 01:57:39.695: W/PowerManagerService(2296): Timer 0x3->0x3|0x0
01-07 01:57:39.700: D/PowerManagerService(2296): setTimeoutLocked::SmartSleep : after19500
01-07 01:57:39.930: I/InputReader(2296): Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.429 ]
01-07 01:57:39.930: I/InputDispatcher(2296): Delivering touch to current input target: action: 0x0
01-07 01:57:39.930: I/InputDispatcher(2296): Delivering touch to current input target: action: 0x0
01-07 01:57:39.930: I/InputDispatcher(2296): Delivering touch to current input target: action: 0x0
01-07 01:57:39.930: I/InputDispatcher(2296): Delivering touch to current input target: action: 0x0
01-07 01:57:39.930: I/InputDispatcher(2296): Delivering touch to current input target: action: 0x0
01-07 01:57:40.020: D/DeviceInfo(2296): SysScope Service has unexpectedly disconnected!
01-07 01:57:40.065: I/InputReader(2296): Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=]
01-07 01:57:40.065: I/InputDispatcher(2296): Delivering touch to current input target: action: 0x1
01-07 01:57:40.065: I/InputDispatcher(2296): Delivering touch to current input target: action: 0x1
01-07 01:57:40.065: I/InputDispatcher(2296): Delivering touch to current input target: action: 0x1
**01-07 01:57:40.080: I/ActivityManager(2296): Process com.android.smspush (pid 28031) (adj 1) has died.**
01-07 01:57:40.090: W/WallpaperService(2296): Wallpaper service gone: ComponentInfo{com.sec.ccl.csp.app.secretwallpaper.themetwo/com.sec.ccl.csp.app.secretwallpaper.themetwo.SecretWallpaperService}
01-07 01:57:40.125: D/KeyguardViewMediator(2296): setHidden false
**01-07 01:57:40.135: I/ActivityManager(2296): Process com.android.server.device.enterprise:remote (pid 28016) (adj 1) has died.**
**01-07 01:57:40.145: I/ActivityManager(2296): Process com.sec.ccl.csp.app.secretwallpaper.themetwo (pid 29715) (adj 1) has died.**
01-07 01:57:40.285: D/dalvikvm(29490): GC_CONCURRENT freed 1616K, 17% free 28289K/33735K, paused 27ms+21ms, total 178ms
01-07 01:57:40.285: D/dalvikvm(29490): WAIT_FOR_CONCURRENT_GC blocked 112ms
01-07 01:57:40.445: D/dalvikvm(2296): GC_CONCURRENT freed 1869K, 59% free 24186K/57991K, paused 26ms+12ms, total 197ms
01-07 01:57:40.660: D/dalvikvm(29490): GC_CONCURRENT freed 1587K, 16% free 28622K/33735K, paused 3ms+7ms, total 51ms
01-07 01:57:40.685: D/KeyguardViewMediator(2296): setHidden false
आपके विवरण से ऐसी त्रुटि का पता लगाने में बहुत मुश्किल है। हालांकि यह विशिष्ट एस 3 से संबंधित हो सकता है। क्या आप इसे किसी अन्य एस 3 फोन पर आज़मा सकते हैं? मैं यह कह रहा हूं क्योंकि यह बहुत अजीब है कि अन्य ऐप्स आपके द्वारा मारे गए हैं और कुछ समय बाद आपका ऐप भी मारे गए। हो सकता है कि कुछ ऐसा है जो सामान्य रूप से ऐप्स को मारता है (एक वायरस? या एक दोषपूर्ण स्मृति?)। इसके अलावा लाइव वॉलपेपर एंड्रॉइड द्वारा हर समय मारे जाते हैं लेकिन जैसे ही संसाधन आपकी स्थिति में मुक्त हो जाते हैं, वे पुन: स्थापित होते हैं, इसलिए ऐसा नहीं होता है कि कुछ सिस्टम के डिफ़ॉल्ट व्यवहार को रोकता है। – Christos
मैंने 3 अलग-अलग एस 3 उपकरणों पर कोशिश की (और वे सभी एंड्रॉइड के समान संस्करण को भी नहीं चला रहे थे)। समस्या मूल स्मृति रिसाव में थी, मेरा जवाब देखें। और यह पता लगाने में वास्तव में मुश्किल था :( – kolufild