Example #1
0
 def generate_bug_and_undetermined_if_needed(self, bug, undetermined,
                                             notbug):
     main_list = Basestate.get_main_list(self)
     if len(main_list) >= 1 and main_list[0][0].find(
             'android.os.MessageQueue.nativePollOnce(Native method)') != -1:
         Basestate.generate_notbug(self, notbug)
     else:
         Basestate.generate_undetermined(self, undetermined)
Example #2
0
 def __init__(self, anrObj):
     Basestate.__init__(self, anrObj)
     # trace = ''
     # self.mainConcernedTrace = flymeparser.get_blocked_trace(
     #    anrObj.allMain['content'], 'main');
     # for i in self.mainConcernedTrace['__thread_sequece__']:
     #    trace += (self.mainConcernedTrace[i]['trace'] + '\n')
     self.mainBlockedConcernedTrace = flymeparser.get_blocked_trace_str(
         anrObj.allMain['content'], 'main')
 def generate_bug_and_undetermined_if_needed(self, bug, undetermined,
                                             notbug):
     match = re.search(
         '\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3} ' + self.anrObj.pid + ' \d+ '
         'E '
         'AndroidRuntime: java.lang.OutOfMemoryError: Failed to allocate a.*? until OOM',
         self.anrObj.content)
     if match:
         Basestate.generate_bug(self, bug)
     else:
         Basestate.generate_undetermined(self, undetermined)
Example #4
0
 def generate_bug_and_undetermined_if_needed(self, bug, undetermined,
                                             notbug):
     length = len(self.mainConcernedTrace['__thread_sequece__'])
     lastTid = self.mainConcernedTrace['__thread_sequece__'][length - 1]
     reportBug = False
     last_stack_state = self.mainConcernedTrace[lastTid]['thread_state']
     if last_stack_state == 'Waiting' or last_stack_state == 'Sleeping':
         reportBug = True
     if reportBug:
         Basestate.generate_bug(self, bug)
     else:
         Basestate.generate_undetermined(self, undetermined)
Example #5
0
 def generate_bug_and_undetermined_if_needed(self, bug, undetermined,
                                             notbug):
     main_trace_list = Basestate.get_main_list(self)
     reportBug = False
     if len(main_trace_list) >= 3 and main_trace_list[0][0].find(
             'java.lang.Object.wait!') != -1 and main_trace_list[1][0].find(
                 'java.lang.Thread.join'
             ) != -1 and main_trace_list[2][0].find(
                 self.anrObj.packageName) != -1:
         reportBug = True
     elif len(main_trace_list) >= 2 and main_trace_list[0][0].find(
             'java.lang.Object.wait!') != -1 and main_trace_list[1][0].find(
                 self.anrObj.packageName) != -1:
         reportBug = True
     if reportBug:
         Basestate.generate_bug(self, bug)
     else:
         Basestate.generate_undetermined(self, undetermined)
Example #6
0
 def generate_merge(self, merge):
     trace = self.anrObj.mainTrace['trace']
     list = re.findall('^  at (.*?)(\n|\r\n)', trace, re.M)
     if len(list) == 0 or list[0][0].strip(
     ) != 'android.view.ThreadedRenderer.nFence(Native method)':
         Basestate.generate_merge(self, merge)
         return
     else:
         match = re.search(
             "(\"(RenderThread)\".*?tid=(\d+).*? (\w*)(.|\n)*?)(\n|\r\n){"
             "2}?", self.anrObj.allMain['content'])
         if not match:
             Basestate.generate_merge(self, merge)
             return
         render_thread_trace = match.group(1)
         message = self.get_base_info() + '\n\n' + self.get_main_trace() \
                   + '\n' + render_thread_trace + '\n\n' + \
                   self.get_cpuusage()
         Basestate.generate_to_merge_file(self, message, merge)
Example #7
0
 def generate_bug_and_undetermined_if_needed(self, bug, undetermined,
                                             nonbug):
     Basestate.generate_bug(self, bug)
Example #8
0
 def __init__(self, anrobj):
     Basestate.__init__(self, anrobj)