| {"id": "logdiag_023", "log_snippet": "W/System: ClassLoader referenced unknown path: /data/app/~~abc==/com.example.app-123/lib/arm64\nE/UnsatisfiedLinkError: dlopen failed: library \"libnative.so\" not found\n at java.lang.Runtime.loadLibrary0(Runtime.java:1071)\n at java.lang.System.loadLibrary(System.java:1660)\n at com.example.app.NativeLib.<clinit>(NativeLib.java:10)", "diagnosis": "UnsatisfiedLinkError: Native library libnative.so not found in APK", "root_cause": "Native .so files not packaged (missing jniLibs/src/main/jniLibs), ABI mismatch, or strip debug symbols removed them", "fix_commands": ["adb install -r native-fixed.apk"], "prevention": "Place .so files in src/main/jniLibs/{arm64-v8a,armeabi-v7a,x86,x86_64}/; check build.gradle ndk.abiFilters", "category": "startup_failure", "api_level": 33, "split": "train"} | |
| {"id": "logdiag_005", "log_snippet": "E/DatabaseUtils: Writing exception to parcel\n java.lang.SecurityException: Permission Denial: reading com.android.providers.contacts.ContactsProvider2 uri content://com.android.contacts/contacts from pid=12345, uid=10156 requires android.permission.READ_CONTACTS\n at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:730)\n at android.content.ContentProvider$Transport.query(ContentProvider.java:280)\n at android.content.ContentResolver.query(ContentResolver.java:900)\n at com.example.app.ContactManager.loadContacts(ContactManager.java:33)", "diagnosis": "SecurityException: App queries ContactsProvider without READ_CONTACTS permission", "root_cause": "Runtime permission not granted; need to request READ_CONTACTS at runtime (API 23+)", "fix_commands": ["adb shell pm grant com.example.app android.permission.READ_CONTACTS", "adb shell am start -n com.example.app/.MainActivity"], "prevention": "Request runtime permissions before accessing contacts; handle permission denial gracefully", "category": "permission_denied", "api_level": 33, "split": "train"} | |
| {"id": "logdiag_019", "log_snippet": "E/Resources: Resource ID #0x7f080001 type #0x12 is not valid\nE/AndroidRuntime: FATAL EXCEPTION: main\n android.content.res.Resources$NotFoundException: Resource ID #0x7f080001\n at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:230)\n at android.content.res.Resources.getString(Resources.java:1300)\n at com.example.app.MainActivity.onCreate(MainActivity.java:20)", "diagnosis": "Resources$NotFoundException: String resource ID not found (likely stripped by R8/ProGuard)", "root_cause": "R8 removed unused resource but code references it via dynamic ID; or wrong resource type (string vs drawable)", "fix_commands": ["adb shell pm clear com.example.app", "adb install -r r8-fixed.apk"], "prevention": "Add @Keep to resources; use R.string.xxx not raw IDs; check proguard-rules.pro for -keepclassmembers", "category": "crash_analysis", "api_level": 33, "split": "train"} | |
| {"id": "logdiag_025", "log_snippet": "E/ActivityManager: Process com.example.app (pid 12345) has died: TOP (1,0)\nW/ActivityManager: Force removing ActivityRecord{... com.example.app/.MainActivity}: app died, no saved state\nI/WindowManager: WIN DEATH: Window{... com.example.app/com.example.app.MainActivity}\nE/lowmemorykiller: Kill 'com.example.app' (12345), adj 0, size 150MB, to free 120MB for 'com.other.app' (345)", "diagnosis": "Process killed by lowmemorykiller (OOM killer) - system reclaiming memory", "root_cause": "App using 150MB+ memory; system under memory pressure; no onTrimMemory() handling", "fix_commands": ["adb shell dumpsys meminfo com.example.app", "adb shell am kill-all", "adb install -r memory-optimized.apk"], "prevention": "Implement onTrimMemory(); use LruCache for bitmaps; reduce memory footprint; use isLowRamDevice() checks", "category": "memory_leak", "api_level": 33, "split": "train"} | |
| {"id": "logdiag_017", "log_snippet": "E/HAL: load: id=gralloc != hmi->id=gralloc\nE/GraphicBuffer: createGraphicBuffer: failed to allocate buffer (Out of memory)\nE/Surface: queueBuffer: error queuing buffer to SurfaceTexture: -12\nE/EGL_emulation: tid 12345: eglCreateWindowSurface:1000: failed with EGL_BAD_ALLOC\n at android.view.HardwareRenderer$GlRenderer.createSurface(HardwareRenderer.java:1800)", "diagnosis": "EGL_BAD_ALLOC / Out of memory allocating GraphicBuffer - GPU memory exhaustion", "root_cause": "Too many large bitmaps, memory leak in custom View, or hardware acceleration issues with large textures", "fix_commands": ["adb shell am kill com.example.app", "adb shell setprop debug.hwui.use_buffer_age false", "adb install -r fixed-gpu.apk"], "prevention": "Recycle bitmaps; use inBitmap; reduce texture sizes; avoid hardware layers on large views; check for canvas leaks", "category": "memory_leak", "api_level": 33, "split": "train"} | |
| {"id": "logdiag_024", "log_snippet": "E/WindowManager: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application\n at android.view.ViewRootImpl.setView(ViewRootImpl.java:800)\n at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:370)\n at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:100)\n at android.app.Dialog.show(Dialog.java:420)\n at com.example.app.util.ToastUtil.showCustomToast(ToastUtil.java:20)", "diagnosis": "BadTokenException: Trying to show Dialog/Window with null Context token (likely from non-Activity Context)", "root_cause": "Using Application Context or Service Context to show Dialog; Dialog requires Activity Context", "fix_commands": ["adb shell am force-stop com.example.app", "adb install -r fixed-context.apk"], "prevention": "Pass Activity context to Dialog; use Toast for non-Activity contexts; check context instanceof Activity", "category": "crash_analysis", "api_level": 33, "split": "train"} | |
| {"id": "logdiag_009", "log_snippet": "E/Parcel: Class not found when unmarshalling: com.example.app.model.User\n java.lang.ClassNotFoundException: com.example.app.model.User\n at java.lang.Class.classForName(Native Method)\n at java.lang.Class.forName(Class.java:453)\n at android.os.Parcel.readParcelableCreator(Parcel.java:2820)\n at android.os.Parcel.readParcelable(Parcel.java:2776)\n at com.example.app.MainActivity.onCreate(MainActivity.java:28)", "diagnosis": "ClassNotFoundException when unmarshalling Parcelable - class not found in classloader", "root_cause": "ProGuard/R8 obfuscation removed/renamed Parcelable class; or multi-process IPC with different classloader", "fix_commands": ["adb shell pm clear com.example.app", "adb install -r proguard-fixed.apk"], "prevention": "Add @Keep annotation or proguard rule: -keep class com.example.app.model.** { *; }; implement Parcelable correctly", "category": "crash_analysis", "api_level": 33, "split": "train"} | |
| {"id": "logdiag_014", "log_snippet": "E/BluetoothAdapter: Bluetooth adapter not found\nW/BluetoothManager: getAdapter() returning null - device may not support Bluetooth\nE/BluetoothLeScanner: Could not start scan - BluetoothAdapter is null\n at android.bluetooth.le.BluetoothLeScanner.startScan(BluetoothLeScanner.java:400)\n at com.example.app.BleScanner.startScan(BleScanner.java:28)", "diagnosis": "BluetoothAdapter is null - device lacks Bluetooth hardware or permission missing", "root_cause": "No <uses-feature android:name=\"android.hardware.bluetooth_le\" /> or BLUETOOTH_SCAN permission (Android 12+)", "fix_commands": ["adb shell pm grant com.example.app android.permission.BLUETOOTH_SCAN", "adb shell pm grant com.example.app android.permission.BLUETOOTH_CONNECT", "adb install -r fixed-manifest.apk"], "prevention": "Add bluetooth permissions and feature flags; check BluetoothAdapter.getDefaultAdapter() != null before use", "category": "bluetooth_issue", "api_level": 34, "split": "train"} | |
| {"id": "logdiag_003", "log_snippet": "E/ActivityManager: ANR in com.example.app\n PID: 12345\n Reason: Input dispatching timed out (Waiting to send non-key event because the touched window has not finished processing input events)\n Load: 4.2 / 3.8 / 3.5\n CPU usage from 0ms to 5000ms later:\n 85% 12345/com.example.app: 78% user + 7% kernel\n 5% 345/system_server\n Stack trace:\n at com.example.app.DataProcessor.processLargeDataset(DataProcessor.java:120)\n at com.example.app.MainActivity$1.onClick(MainActivity.java:88)", "diagnosis": "ANR (Application Not Responding) - main thread blocked for >5 seconds processing large dataset on click", "root_cause": "Heavy computation (DataProcessor.processLargeDataset) running on UI thread in onClick handler", "fix_commands": ["adb shell am force-stop com.example.app", "adb shell kill -3 12345", "adb install -r fixed-app.apk"], "prevention": "Move heavy work to background thread (coroutines, RxJava, AsyncTask, Thread); show progress indicator", "category": "anr_analysis", "api_level": 33, "split": "train"} | |
| {"id": "logdiag_012", "log_snippet": "E/AndroidRuntime: FATAL EXCEPTION: main\n java.lang.IllegalStateException: FragmentManager is already executing transactions\n at androidx.fragment.app.FragmentManager.ensureExecReady(FragmentManager.java:1800)\n at androidx.fragment.app.FragmentManager.execSingleAction(FragmentManager.java:1812)\n at androidx.fragment.app.BackStackRecord.commitNow(BackStackRecord.java:300)\n at com.example.app.MainActivity.replaceFragment(MainActivity.java:55)", "diagnosis": "IllegalStateException: FragmentManager transaction committed during another transaction", "root_cause": "commitNow() called while FragmentManager already executing transactions (e.g., in onAttach/onCreate)", "fix_commands": ["adb shell am force-stop com.example.app", "adb install -r fixed-app.apk"], "prevention": "Use commit() instead of commitNow(); avoid fragment transactions in onAttach/onCreate; use postOnViewCreated()", "category": "crash_analysis", "api_level": 33, "split": "train"} | |
| {"id": "logdiag_011", "log_snippet": "E/SQLiteLog: (1) table users has no column named email\nE/SQLiteDatabase: Error inserting name=John email=john@example.com\n android.database.sqlite.SQLiteException: table users has no column named email (code 1 SQLITE_ERROR)\n at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)\n at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:879)\n at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:790)\n at com.example.app.db.UserDao.insert(UserDao.java:30)", "diagnosis": "SQLiteException: table missing 'email' column - schema mismatch", "root_cause": "Database schema changed but onUpgrade() not implemented or version not incremented", "fix_commands": ["adb shell pm clear com.example.app", "adb install -r migrated-db.apk"], "prevention": "Implement SQLiteOpenHelper.onUpgrade() with ALTER TABLE; increment DATABASE_VERSION; use Room with migrations", "category": "crash_analysis", "api_level": 33, "split": "train"} | |
| {"id": "logdiag_013", "log_snippet": "W/Choreographer: Skipped 124 frames! The application may be doing too much work on its main thread.\nI/Choreographer: Skipped 67 frames! The application may be doing too much work on its main thread.\nE/PerfMonitor: App com.example.app jank stats: 45% frames > 16ms, 12% frames > 100ms", "diagnosis": "UI jank - main thread overloaded causing frame drops (124+ skipped frames)", "root_cause": "Heavy computation, layout passes, or I/O on main thread; RecyclerView binding too complex", "fix_commands": ["adb shell dumpsys gfxinfo com.example.app framestats", "adb shell am profile start com.example.app /sdcard/trace.perf", "adb shell am profile stop com.example.app"], "prevention": "Move work to background; use DiffUtil for RecyclerView; optimize layouts; enable hardware acceleration", "category": "performance_optimization", "api_level": 33, "split": "train"} | |
| {"id": "logdiag_001", "log_snippet": "E/AndroidRuntime: FATAL EXCEPTION: main\n Process: com.example.app, PID: 12345\n java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference\n at com.example.app.MainActivity.onCreate(MainActivity.java:42)\n at android.app.Activity.performCreate(Activity.java:8000)\n at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)\n at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)", "diagnosis": "NullPointerException in MainActivity.onCreate at line 42 - TextView not initialized before setText()", "root_cause": "findViewById() returned null, likely wrong resource ID or view not yet inflated when setText() called", "fix_commands": ["adb shell am force-stop com.example.app", "adb shell pm clear com.example.app", "adb install -r fixed-app.apk"], "prevention": "Use ViewBinding or add null check: TextView tv = findViewById(R.id.text); if (tv != null) tv.setText(\"text\");", "category": "crash_analysis", "api_level": 33, "split": "train"} | |
| {"id": "logdiag_007", "log_snippet": "E/ConnectivityManager: Network callback not registered\nW/System.err: java.net.UnknownHostException: Unable to resolve host \"api.example.com\": No address associated with hostname\n at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:127)\n at java.net.Inet6AddressImpl.lookupAllHostByName(Inet6AddressImpl.java:105)\n at java.net.InetAddress.getAllByName(InetAddress.java:1154)\n at com.example.app.NetworkClient.fetchData(NetworkClient.java:56)", "diagnosis": "UnknownHostException - DNS resolution failed for api.example.com", "root_cause": "No network connectivity, DNS server issue, or missing INTERNET permission", "fix_commands": ["adb shell pm grant com.example.app android.permission.INTERNET", "adb shell settings put global http_proxy :0", "adb shell am start -a android.settings.WIRELESS_SETTINGS"], "prevention": "Check connectivity before network calls; handle UnknownHostException; add INTERNET permission to manifest", "category": "network_issue", "api_level": 33, "split": "train"} | |
| {"id": "logdiag_015", "log_snippet": "E/AndroidRuntime: FATAL EXCEPTION: main\n java.lang.ClassCastException: androidx.appcompat.widget.AppCompatTextView cannot be cast to android.widget.EditText\n at com.example.app.LoginActivity.onCreate(LoginActivity.java:35)\n at android.app.Activity.performCreate(Activity.java:8000)", "diagnosis": "ClassCastException: View with ID R.id.email is TextView in layout but cast to EditText in code", "root_cause": "Layout XML has TextView but code expects EditText; mismatch after layout refactor", "fix_commands": ["adb shell am force-stop com.example.app", "adb install -r fixed-layout.apk"], "prevention": "Use ViewBinding to eliminate casting; verify layout XML matches code expectations", "category": "crash_analysis", "api_level": 33, "split": "train"} | |
| {"id": "logdiag_018", "log_snippet": "W/PackageManager: Package com.example.app requesting special permission android.permission.SCHEDULE_EXACT_ALARM but not in allowlist\nE/AndroidRuntime: FATAL EXCEPTION: main\n java.lang.SecurityException: Exact alarms permission not granted\n at android.app.AlarmManager.setExactAndAllowWhileIdle(AlarmManager.java:1200)\n at com.example.app.ReminderScheduler.schedule(ReminderScheduler.java:22)", "diagnosis": "SecurityException: SCHEDULE_EXACT_ALARM permission not granted (Android 12+)", "root_cause": "App uses setExactAndAllowWhileIdle() but user hasn't granted 'Alarms & reminders' special permission", "fix_commands": ["adb shell am start -a android.settings.REQUEST_SCHEDULE_EXACT_ALARM -d package:com.example.app", "adb shell appops set com.example.app SCHEDULE_EXACT_ALARM allow"], "prevention": "Request SCHEDULE_EXACT_ALARM via Settings intent; fallback to inexact alarms; use WorkManager for deferrable work", "category": "permission_denied", "api_level": 34, "split": "train"} | |
| {"id": "logdiag_006", "log_snippet": "W/BatteryStatsImpl: Couldn't get kernel wake lock stats\nW/PowerManagerService: WakeLock acquire timeout: uid=10156, tag=*location*\nW/PowerManagerService: Excessive wake lock usage: uid=10156, count=47, time=3600000ms\nE/BatteryExternalStatsWorker: High battery drain detected for com.example.app: 15% per hour", "diagnosis": "Excessive battery drain from location wake locks held for 1+ hour", "root_cause": "Location updates requested with high frequency/priority without proper cleanup; FusedLocationProviderClient not disconnected", "fix_commands": ["adb shell am force-stop com.example.app", "adb shell dumpsys batterystats --reset", "adb shell cmd appops set com.example.app ACCESS_FINE_LOCATION ignore"], "prevention": "Use setPriority(PRIORITY_BALANCED_POWER_ACCURACY); remove location updates in onStop/onDestroy; use WorkManager for periodic updates", "category": "battery_drain", "api_level": 33, "split": "train"} | |
| {"id": "logdiag_021", "log_snippet": "W/ZipArchive: Unable to open '/data/app/~~abc==/com.example.app-123/base.apk': No such file or directory\nE/PackageManager: Package com.example.app not installed\nE/ActivityThread: Failed to find provider info for com.example.app.provider\n at android.app.ActivityThread.installProvider(ActivityThread.java:7200)", "diagnosis": "Package not installed but provider queried - app data corrupted or incomplete install", "root_cause": "Partial install, storage full during install, or app moved to SD card that was removed", "fix_commands": ["adb uninstall com.example.app", "adb install -r app.apk"], "prevention": "Check install return code; don't move app to external storage if it has providers/services", "category": "startup_failure", "api_level": 33, "split": "train"} | |
| {"id": "logdiag_020", "log_snippet": "E/ActivityThread: Failed to find provider info for com.example.app.fileprovider\nE/AndroidRuntime: FATAL EXCEPTION: main\n java.lang.IllegalArgumentException: Failed to find configured root that contains /data/data/com.example.app/files/image.jpg\n at androidx.core.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:740)\n at androidx.core.content.FileProvider.getUriForFile(FileProvider.java:410)\n at com.example.app.ShareHelper.shareImage(ShareHelper.java:35)", "diagnosis": "FileProvider IllegalArgumentException: File not in configured <paths> root", "root_cause": "FileProvider XML paths missing <files-path> or wrong path; file outside declared directories", "fix_commands": ["adb shell pm clear com.example.app", "adb install -r fixed-provider.apk"], "prevention": "Ensure fileprovider_paths.xml includes <files-path name=\"files\" path=\"files/\"/>; use getFilesDir() not hardcoded paths", "category": "crash_analysis", "api_level": 33, "split": "train"} | |