# Buggy code
def _StatusUpdateThreadMain(self):
    """Main function of the status update thread."""
    while self._status_update_active:
        # Make a local copy of the PIDs in case the dict is changed by
        # the main thread.
        for pid in list(self._process_information_per_pid.keys()):
            self._CheckStatusAnalysisProcess(pid)

        used_memory = self._process_information.GetUsedMemory()

        display_name = getattr(self._merge_task, "identifier", "")

        self._processing_status.UpdateForemanStatus(
            self._name,
            self._status,
            self._pid,
            used_memory,
            display_name,
            self._number_of_consumed_sources,
            self._number_of_produced_sources,
            self._number_of_consumed_events,
            self._number_of_produced_events,
            self._number_of_consumed_event_tags,
            self._number_of_produced_event_tags,
            self._number_of_consumed_errors,
            self._number_of_produced_errors,
            self._number_of_consumed_reports,
            self._number_of_produced_reports,
        )

        if self._status_update_callback:
            self._status_update_callback(self._processing_status)

        time.sleep(self._STATUS_UPDATE_INTERVAL)


# Traceback (TypeError)
Exception in thread Status update:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/python2.7/dist-packages/plaso-1.5.2.post20170119-py2.7.egg/plaso/multi_processing/task_engine.py", line 509, in _StatusUpdateThreadMain
self._status_update_callback(self._processing_status)
File "/usr/local/lib/python2.7/dist-packages/plaso-1.5.2.post20170119-py2.7.egg/plaso/cli/status_view_tool.py", line 149, in _PrintStatusUpdate
status_row = self._FormatStatusTableRow(worker_status)
File "/usr/local/lib/python2.7/dist-packages/plaso-1.5.2.post20170119-py2.7.egg/plaso/cli/status_view_tool.py", line 111, in _FormatStatusTableRow
used_memory = self._FormatSizeInUnitsOf1024(process_status.used_memory)
File "/usr/local/lib/python2.7/dist-packages/plaso-1.5.2.post20170119-py2.7.egg/plaso/cli/status_view_tool.py", line 63, in _FormatSizeInUnitsOf1024
used_memory_1024 = float(size)
TypeError: float() argument must be a string or a number

2017-01-23 06:00:55,183 [WARNING] (MainProcess) PID:15653 <zeromq_queue> main_task_queue timeout waiting for a request.
2017-01-23 06:01:07,371 [WARNING] (MainProcess) PID:15653 <zeromq_queue> main_task_queue timeout waiting for a request.
2017-01-23 06:01:23,611 [WARNING] (MainProcess) PID:15653 <zeromq_queue> main_task_queue timeout waiting for a request.
2017-01-23 06:01:29,723 [WARNING] (MainProcess) PID:15653 <zeromq_queue> main_task_queue timeout waiting for a request.
2017-01-23 06:01:41,507 [WARNING] (MainProcess) PID:15653 <zeromq_queue> main_task_queue timeout waiting for a request.
2017-01-23 06:01:47,519 [WARNING] (MainProcess) PID:15653 <zeromq_queue> main_task_queue timeout waiting for a request.
2017-01-23 06:01:54,583 [WARNING] (MainProcess) PID:15653 <zeromq_queue> main_task_queue timeout waiting for a request.
2017-01-23 06:02:11,607 [WARNING] (MainProcess) PID:15653 <zeromq_queue> main_task_queue timeout waiting for a request.
2017-01-23 06:02:24,095 [WARNING] (MainProcess) PID:15653 <zeromq_queue> main_task_queue timeout waiting for a request.

# Fixed code
def _StatusUpdateThreadMain(self):
    """Main function of the status update thread."""
    while self._status_update_active:
        # Make a local copy of the PIDs in case the dict is changed by
        # the main thread.
        for pid in list(self._process_information_per_pid.keys()):
            self._CheckStatusAnalysisProcess(pid)

        used_memory = self._process_information.GetUsedMemory() or 0

        display_name = getattr(self._merge_task, "identifier", "")

        self._processing_status.UpdateForemanStatus(
            self._name,
            self._status,
            self._pid,
            used_memory,
            display_name,
            self._number_of_consumed_sources,
            self._number_of_produced_sources,
            self._number_of_consumed_events,
            self._number_of_produced_events,
            self._number_of_consumed_event_tags,
            self._number_of_produced_event_tags,
            self._number_of_consumed_errors,
            self._number_of_produced_errors,
            self._number_of_consumed_reports,
            self._number_of_produced_reports,
        )

        if self._status_update_callback:
            self._status_update_callback(self._processing_status)

        time.sleep(self._STATUS_UPDATE_INTERVAL)