Hi Josh,
1, Could you guide me how to get the backtrace? I only have this logcat. As you
can see, when we plugin/out hw keyboard, b2g crash and then restart.
=====================
I/EventHub( 1580): Removing device '/dev/input/event3' due to inotify event
I/EventHub( 1580): Removed device: path=/dev/input/event3 name=Dell Dell USB
Keyboard id=1 fd=45 classes=0x80000003
I/InputReader( 1580): Device removed: id=1, name='Dell Dell USB Keyboard',
sources=0x00000101
F/libc ( 1580): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)
I/ServiceManager( 68): service 'media.resource_manager' died
I/DEBUG ( 1581): debuggerd committing suicide to free the zombie!
I/ServiceManager( 68): service 'media.audio_flinger' died
I/ServiceManager( 68): service 'media.player' died
I/ServiceManager( 68): service 'media.camera' died
I/ServiceManager( 68): service 'media.audio_policy' died
I/DEBUG ( 2039): debuggerd: Oct 1 2013 09:49:15
I/ ( 2037): ServiceManager: 0x3a3958
=====================
2, The code in HardwareKeyboardManager.cpp is follow:
==================
void
HardwareKeyboardManager::Notify(const hal::HardwareKeyboardInformation&
aHardwareKeyboardInfo)
{
mIsPlugged = aHardwareKeyboardInfo.isConnected();
if (mIsPlugged) {
DispatchTrustedEvent(NS_LITERAL_STRING("hardwarekeyboardconnected"));
} else {
DispatchTrustedEvent(NS_LITERAL_STRING("hardwarekeyboarddisconnected"));
}
}
==========
That function will be call when we notify from Hal.cpp:
void
NotifyHardwareKeyboardChange(const hal::HardwareKeyboardInformation&
aHWKeyboardInfo)
{
AssertMainThread();
sHWKeyboardObservers.CacheInformation(aHWKeyboardInfo);
sHWKeyboardObservers.BroadcastCachedInformation();
}
We call hal::NotifyHardwareKeyboardChange() from nsAppShell.
The strange thing is that if I call hal::NotifyBatteryChange() from nsAppShell,
this will also cause b2g crash and then restart.
Thanks & BR.
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g