Android Studio Emulator Error 139: Segmentation Fault on Ubuntu 24.04
Summary
Android Studio’s emulator crashes with error code 139 (segmentation fault) on Ubuntu 24.04 when attempting to launch AVDs with modern system images. This occurs despite meeting all hardware requirements and having functional GPU drivers. The crash originates from a Vulkan/graphics backend incompatibility between the emulator’s gfxstream implementation and the NVIDIA driver 590 series on Linux.
Root Cause
Error 139 represents SIGSEGV – a segmentation fault indicating memory access violations. In this scenario:
- The emulator’s gfxstream backend attempts to initialize Vulkan with the NVIDIA RTX 2070
- A Vulkan extension mismatch occurs: the emulator requests
VulkanVirtualQueuewhich the current driver configuration cannot satisfy - The driver version 590 may have compatibility issues with the emulator’s Vulkan loader chain
- Multiple GPU detection creates graphics context conflicts between discrete and integrated graphics
The crash dump location (/tmp/android-maurice/emu-crash-36.4.9.db) confirms a low-level graphics subsystem failure during OpenGL/Vulkan initialization.
Why This Happens in Real Systems
In production environments, this type of failure is common due to:
- Graphics stack complexity: Linux graphics involve multiple layers (kernel DRM → Mesa → Vulkan loader → driver → application)
- Driver transition periods: Driver version 590 introduced changes that broke backward compatibility with certain Vulkan applications
- Hybrid graphics systems: Laptops with both Intel integrated and NVIDIA discrete GPUs create ambiguous rendering contexts
- Rapid Android development: Emulator updates often outpace Linux graphics driver stability
Key systemic factors:
- Vulkan implementation fragmentation across Linux distributions
- Snap package vs. native installation inconsistencies
- Graphics library version pinning issues in Ubuntu 24.04
Real-World Impact
This failure directly impacts development teams:
- Blocked development workflow: Mobile developers cannot test applications locally
- Reduced productivity: Time spent troubleshooting instead of coding
- CI/CD disruption: Automated testing pipelines relying on emulator-based tests fail
- Resource waste: Engineers cycling between different Android Studio installations
Teams using hybrid GPU laptops are particularly affected, as this represents an increasingly common developer hardware configuration.
Example or Code (if necessary and relevant)
# Diagnostic commands for emulator GPU issues
# Check Vulkan support
vulkaninfo --summary
# List available GPUs and their Vulkan status
ls -la /usr/share/vulkan/icd.d/
# Test emulator with software rendering (bypasses GPU issues)
export ANDROID_EMULATOR_USE_VK_SWAPCHAIN=0
export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json
# Run emulator with verbose logging
~/Android/Sdk/emulator/emulator -avd Medium_Phone_API_36.1 -verbose
# Check for conflicting Vulkan loaders
ldconfig -p | grep vulkan
# Alternative: Force SwiftShader software rendering
export ANDROID_EMULATOR_HARDWARE_VULKAN=0
export ANDROID_EMULATOR_GL_DRIVER=swiftshader
# Launch with explicit software graphics
~/Android/Sdk/emulator/emulator -avd Medium_Phone_API_36.1 -no-window -no-accel
How Senior Engineers Fix It
Senior engineers approach this systematically:
- Isolate the problem layer: Determine if it’s Vulkan, OpenGL, or driver-specific
- Use progressive validation: Test with minimal graphics requirements first
- Leverage environment variables: Override problematic graphics paths
- Implement fallback strategies: Software rendering when hardware acceleration fails
Effective solutions include:
- Setting
ANDROID_EMULATOR_USE_VK_SWAPCHAIN=0to use traditional swapchain - Switching to SwiftShader software rendering for development testing
- Downgrading to NVIDIA driver 535 series for proven compatibility
- Using WHPX (Windows) or QEMU TCG (Linux) software virtualization
- Modifying AVD configuration to disable Vulkan:
<initsndcard=no hw.gpu.mode=swiftshader></initsndcard>
Why Juniors Miss It
Junior developers typically follow these unproductive paths:
- Reinstalling Android Studio repeatedly (the snap vs. native distinction doesn’t solve core graphics issues)
- Increasing system resources (error 139 is never a memory issue)
- Searching generic “error 139” solutions without understanding it’s SIGSEGV
- Ignoring GPU-related logs in favor of network/disk troubleshooting
- Not checking Vulkan compatibility between emulator and driver versions
They often overlook that segmentation faults in emulators are almost always graphics-related on Linux, especially with hybrid GPU configurations. The warning about VulkanVirtualQueue support is the critical breadcrumb that reveals the root cause.