Closed Bug 741337 Opened 12 years ago Closed 12 years ago

Desktop b2g client startup crash because of using null pointer

Categories

(Firefox OS Graveyard :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 739452

People

(Reporter: echou, Unassigned)

Details

I was trying to get Gaia running on my desktop this morning but failed. Compared to bug 740028 & bug 732467, it was also a segmentation fault right before b2g homescreen is shown. However, the root cause is different.

I used gdb and traced the code, found that the error occured at Ril.cpp. To be precise, it occured at the first line of the function RilReconnectTask::Run(), sClient->OpenSocket(), sClient was null then.

I've checked source code with Cervantes and found that sClient would be cleared to nsnull in StopRil(), which is called by SystemWorkerManager::ShutDown(). That might get into a race condition because sClient is initialized in ConnectToRil(), then a new runnable would be dispatched to IOThread by calling 
 
    sClient->mIOLoop->PostTask(FROM_HERE, new RilReconnectTask());

Moreover, this task would be posted again every time if sClient->OpenSocket() returned false. During this re-posting period of time, once SystemWorkerManager::ShutDown() is called, this error will occur.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.