CN111708655A - Application crash processing method, device and system - Google Patents

Application crash processing method, device and system Download PDF

Info

Publication number
CN111708655A
CN111708655A CN202010568640.8A CN202010568640A CN111708655A CN 111708655 A CN111708655 A CN 111708655A CN 202010568640 A CN202010568640 A CN 202010568640A CN 111708655 A CN111708655 A CN 111708655A
Authority
CN
China
Prior art keywords
exception
application program
application
processing
crash
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010568640.8A
Other languages
Chinese (zh)
Inventor
薛秋实
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202010568640.8A priority Critical patent/CN111708655A/en
Publication of CN111708655A publication Critical patent/CN111708655A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure relates to an application program crash processing method, an application program crash processing device, an electronic device and a storage medium, which are used for at least solving the problems that in the related art, when an application program is abnormal in the running process, application crash occurs, so that the progress of a user is interrupted, data is lost, and further the use experience of the user is very poor, and the method comprises the following steps: when monitoring that the application program is abnormal, acquiring stack information of the application program; according to a preset abnormal white list, performing stack feature matching on stack information to judge whether the current abnormality of the application program belongs to the abnormal white list, wherein the abnormal white list stores stack features of the determined abnormality which has no influence on the operation of the application program; when the judgment result is yes, processing the abnormity of the application program according to the pre-modified crash processing logic so as to enable the application program to continue to normally run; and when the judgment result is negative, processing the exception according to the original crash processing logic of the application program.

Description

Application crash processing method, device and system
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for processing application crash, an electronic device, and a storage medium system.
Background
With the rapid development of terminal technology, various intelligent terminals applying the latest technology are developed, and in order to meet various use requirements of users, more and more Applications (APPs) related to life, entertainment and the like are developed, which greatly facilitates daily work and life of people, so that the intelligent terminals and the APPs installed on the intelligent terminals become important tools which are unavailable for daily work and life of people gradually.
The technical level, the test depth, the adaptability to the terminal system and the like of an application developer are limited, the running stability of the application on the intelligent terminal is different, and for most applications, more or less internal error potential inducing factors exist.
Therefore, how to reduce the occurrence of the application collapse (flash back) phenomenon as much as possible and ensure the application stability is achieved, so that better use experience is brought to users, and the technical problem to be solved in the prior art is formed.
Disclosure of Invention
The disclosure provides an application program crash processing method, an application program crash processing device, an electronic device and a storage medium, so as to at least solve the problem that in the related art, when an application program is abnormal in the running process, application crash occurs, so that the progress of a user is interrupted, data is lost, and further the user experience is very poor. The technical scheme of the disclosure is as follows:
when monitoring that an application program is abnormal, acquiring stack information of the application program; according to a preset abnormal white list, performing stack feature matching on the stack information to judge whether the current abnormality of the application program belongs to the abnormal white list, wherein the abnormal white list stores stack features of the determined abnormality which has no influence on the operation of the application program; when the judgment result is yes, processing the abnormity of the application program according to the pre-modified crash processing logic so as to enable the application program to continue to normally run; and when the judgment result is negative, processing the exception according to the original crash processing logic of the application program.
According to a second aspect of the embodiments of the present disclosure, there is provided an application crash processing apparatus, including:
the information acquisition unit is configured to acquire stack information of the application program when the application program is monitored to be abnormal;
the characteristic matching unit is configured to execute stack characteristic matching on the stack information according to a preset abnormal white list so as to judge whether the current abnormality of the application program belongs to the abnormal white list, wherein the abnormal white list stores the determined stack characteristic which has no influence on the operation of the application program;
the exception handling unit is configured to execute, when the judgment result is yes, to handle the exception of the application program according to the pre-modified crash handling logic, so that the application program continues to run normally;
and the exception handling unit is configured to carry out handling on the exception according to the original crash handling logic of the application program when the judgment result is negative.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device for processing application crash, including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the application crash handling method of any of claims 1 to 5.
According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium including: when the instructions in the storage medium are executed by a processor of an application crash processing electronic device, the application crash processing electronic device is enabled to perform any of the application crash processing method steps of the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising:
when it is run on the device, it causes the item packaging device to perform: the method steps of any one of the above first aspects of the application crash handling method.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
by adopting the application program crash processing method provided by the embodiment of the disclosure, when the application program is monitored to be abnormal, the stack information of the application program can be obtained firstly; further, according to a preset abnormal white list, stack characteristic matching is carried out on stack information to judge whether the current abnormality of the application program belongs to the abnormal white list, wherein the abnormal white list stores the determined abnormal stack characteristics which have no influence on the operation of the application program; if so, the application program processes the exception according to the pre-modified crash processing logic so that the application program can continue to normally run; and if the judgment result is negative, the application program processes the exception according to the original crash processing logic, namely, the application program is closed. Through stack feature matching, an exception which has no influence on the operation of the application program can be identified, and further, for the exception, the application program can be modified through the pre-modified crash processing logic, namely, the continuous operation of the application program is not stopped. By adopting the method provided by the embodiment of the disclosure, the application program can be ensured not to be crashed or flash backward when some abnormity does not affect the program operation, thereby greatly reducing the times of crash of the application program due to abnormity.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a flow diagram illustrating a method of application crash handling in accordance with an illustrative embodiment;
FIG. 2 is a block diagram illustrating an application crash processing apparatus in accordance with an illustrative embodiment;
FIG. 3 is a block diagram illustrating an application crash handling electronic device in accordance with an illustrative embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Technical solutions provided by embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
The embodiment of the disclosure provides an application crash processing method, which is used for at least solving the problems that in the related art, when an application is abnormal in the running process, application crash occurs, so that the progress of a user is interrupted, data is lost, and the user experience is very poor.
The execution main body of the application crash processing method provided by the embodiment of the disclosure may be, but is not limited to, at least one of a mobile phone, a tablet Computer, a Personal Computer (PC), a smart television, and any terminal device that can run an application. Alternatively, the execution subject of the method may be the application itself installed on the above-described apparatus.
For convenience of description, the following description will discuss an application crash processing method provided by an embodiment of the present disclosure, taking an execution subject of the method as a video APP. It is understood that the execution of the method by the video APP is only an exemplary illustration and should not be construed as a limitation to the embodiments of the present disclosure.
Fig. 1 is a flowchart illustrating an application crash handling method according to an exemplary embodiment, where, as shown in fig. 1, the application crash handling method is used in a video APP, and includes the following steps:
in step S101, when it is monitored that an application program is abnormal, stack information of the application program is acquired;
after the application program is started, a corresponding process is created in the operating system, and the process represents the running activity of the application for a certain data set. And one process is formed by a plurality of threads, the threads are entities in the process, the threads do not own system resources, but the threads can share all the resources owned by the process with other threads belonging to the same process.
In the Android environment, each thread belongs to a certain thread group, a plurality of thread groups form a tree, and each thread group except the initial thread group in the tree has a parent thread group. All threads in the application can be obtained through the topmost initial thread group, and the topmost thread group can trace back parent threads from the current threads upwards until the parent threads of a certain parent thread are empty, so that the topmost thread group can be obtained.
When the detected thread is a newly opened thread, the current time is used as the starting time and is stored corresponding to the name of the new thread, and after the storage is finished, the normal thread which has finished the task is removed from the global Map, so that the Map is ensured not to be infinitely increased.
In this embodiment of the present application, an occurrence of an exception in an application program may be interpreted as an occurrence of an exception thread in a process corresponding to the application program, and then, in this embodiment of the present application, whether the application program is abnormal may be monitored by monitoring whether the exception thread occurs. Specifically, when the application program cannot be continuously executed due to a logic error or insufficient resources, the system may determine that the application program is abnormal, and then suspend the abnormal thread and issue a signal to call back the abnormal handling function uncaughteexception.
It should be noted that the application program records the calling order of the method in the program running process through the stack, and each thread has its own corresponding stack in the running process, so that when the application program is abnormal, the problem can be located through stack backtracking. Therefore, in the embodiment of the present application, when it is detected that an exception occurs in an application, stack information of the application is further obtained, so that the exception can be located according to the stack information, and further the exception is handled.
Specifically, the method provided by the embodiment of the present application may include; when it is monitored that the Application program is abnormal by the method, the Application program can further obtain stack information of the abnormal thread in the running process by calling an Application Programming Interface (API) of the mobile operating system. In one embodiment, the Android system may obtain stack information of a thread in which the application program is abnormal by reloading an uncaughteexception method in the uncaugenexceptinonhandler class and by using an incoming function.
In step S102, according to a preset exception screening rule, stack feature matching is performed on the stack information obtained by executing step S101 to determine whether an exception currently occurring in the application belongs to an exception that does not affect the operation of the application; if yes, executing step S103; if the judgment result is no, executing step S104;
in the embodiment of the application, an application developer can determine that a plurality of exceptions which have no influence on the operation of the application program are recorded in the application development test process, and then the developer can set exception screening rules according to the recorded exceptions and pre-embed the preset exception screening rules into the application development package in the application development process, so that the exception screening rules can be directly used by the subsequent application program in the operation process to screen the exceptions occurring in the program.
It should be noted here that the exception screening rule may be pre-embedded in an application program development kit in a development stage, or may be dynamically issued at any time after the application is online, and the server issues the newly determined harmless exception to the application program, so as to complete updating of the pre-embedded exception screening rule in the application program.
Specifically, in the application program starting stage, the application program establishes a communication connection with the server through the network, and at this time, queries whether the update data for the exception screening rule is stored on the server, and downloads the update data from the server after querying the update data.
In step S103, when it is determined that the exception currently occurring in the application belongs to an exception that does not affect the operation of the application by executing step S102, the application may process the exception of the application according to the pre-modified crash processing logic, so that the application continues to operate normally;
when it is determined that the current exception of the application is an exception harmless to the normal operation of the application by executing step S102, the application may disable the original crash processing logic of the operating system, and enable the crash processing logic modified in advance and aiming at the harmless exception, to process the exception, so as to prevent the application process from being killed by the default crash processing logic of the operating system, thereby causing the application to be flashed back.
It should be noted that the types of exceptions that occur to the application program in general mainly include the following two types:
A. a third party program exception;
B. a local program exception.
However, crash processing logics corresponding to different types of exceptions are often different, so in the embodiment of the present application, before processing an exception of an application according to a pre-modified crash processing logic, it is first necessary to confirm an exception type to which a current exception belongs, and then process different exception types according to the pre-modified crash processing logic corresponding to the exception type. In an embodiment, processing the exception of the application according to the pre-modified crash processing logic may specifically include: determining an exception type corresponding to the exception; and processing the exception of the application program according to the pre-modified crash processing logic corresponding to the exception type.
Specifically, in the embodiment of the present application, the harmless exception occurring in the application program may be handled according to the following sub-steps:
a substep S201, judging the abnormal type corresponding to the abnormal currently occurred in the application; when the judgment result is that the third-party program is abnormal, executing the substep S202; when the determination result is that the local program is abnormal, performing substep S205;
a substep S202, when it is determined that the current abnormality is the third-party program abnormality by performing the substep S201, further determining whether the thread corresponding to the current abnormality is a background thread, and when the determination result is yes, performing the substep S203; if the judgment result is no, executing the substep S204;
an application creates many threads during its execution, including a front-end thread (which may also be referred to as a UI thread) and a background thread. The background thread is generally used for processing background data of the application program, such as data refreshing, data query and the like, so that when the background thread is abnormal, the thread is directly closed, and the front-end operation of a user is often not affected. The UI thread is generally used for processing and responding to an operation (such as clicking, sliding, double-clicking, etc.) of the user on the operation interface, so when the thread with the exception is the UI thread, if the thread with the exception is directly processed in a manner of closing the thread, no response to the current operation (such as clicking) of the user is caused, and the use experience of the user is directly influenced.
Therefore, after the abnormal thread is determined to be abnormal by the third-party program, whether the thread is a background thread needs to be further confirmed, so that the abnormal thread can be processed by adopting different processing logics according to the judgment result.
Substep S203, directly closing the abnormal thread;
because the data processed by the background thread is not directly related to the current operation interface of the user, in the embodiment of the application, after the current abnormal thread is judged to be the background thread, the thread can be directly closed.
A substep S204, when the abnormal thread is judged to be a UI thread by executing the substep S202, processing the abnormality of the application program in a mode of nesting event handlers;
because the android system is event-driven, the UI thread drives the application program to run by receiving a series of events (such as a click event, a touch event, and a rendering event), when the UI thread is abnormal, under the condition that the application program is guaranteed to run normally, the abnormal UI thread cannot be directly closed, and the event processing flow of the UI thread needs to be recovered, in this solution, a nested event handler mode may be adopted to complete the abnormal processing of the UI thread, specifically, the method adopted in the embodiment of the present application may include: nesting an inner layer event processor in the original event processor of the application program, and processing the event through the inner layer event processor; when the application program is monitored to be abnormal, the inner layer event processor starts to read the current event circularly until the abnormality is judged to belong to the abnormal white list, and the inner layer event processor starts to read the next event for processing.
In a fact mode, a new event processor is nested in an original event processor, a loop body for reading events in an infinite loop mode is created, when an exception occurs, an inner event processor starts to read the current event in a loop mode, and after the current exception is judged to belong to an exception white list, the inner event processor enters the next loop mode to start to read the next event for processing, so that the application program can be guaranteed to continuously and normally run.
Substep S205, when it is determined that the currently occurring exception is the local program exception by performing substep S201, restoring the thread with the exception to the processing node without the exception, and skipping the node with the exception by the thread in a manner of adding a tag;
specifically, the event call environment (stack frame, instruction counter, register, semaphore) can be saved and restored by the setjmp/longjmp method, the program is restored to the processing node where no exception occurs, and the thread skips the message where the exception occurs and directly takes the next message for processing by adding a tag, thereby ensuring that the application program can continue to operate normally.
In step S104, when it is determined that the currently-occurring exception of the application does not belong to an exception that does not affect the operation of the application by executing step S102, the application processes the exception according to the original crash processing logic.
That is, according to the original processing logic, the operating system directly kills the process of the abnormal application program, and then closes the application program.
By adopting the application program crash processing method provided by the embodiment of the disclosure, when the application program is monitored to be abnormal, the stack information of the application program can be obtained firstly; further, according to a preset exception screening rule, stack feature matching is carried out on stack information so as to judge whether the exception occurring at present in the application program belongs to an exception which has no influence on the operation of the application program; if so, the application program processes the exception according to the pre-modified crash processing logic so that the application program can continue to normally run; and if the judgment result is negative, the application program processes the abnormity according to the original burst processing logic, namely, the application program is closed. Through stack feature matching, an exception which has no influence on the operation of the application program can be identified, and further, for the exception, the application program can be modified through the pre-modified crash processing logic, namely, the continuous operation of the application program is not stopped. By adopting the method provided by the embodiment of the disclosure, the application program can be ensured not to be crashed or flashed back when some exceptions which do not affect the program operation occur, thereby greatly reducing the times of crash of the application program due to the exceptions.
Fig. 2 is a block diagram of an application crash processing apparatus according to an exemplary embodiment, which is used to at least solve the problem in the related art that when an application is abnormal in a running process, an application crash occurs, so that a user progress is interrupted, data is lost, and a user experience is very poor. Referring to fig. 2, the apparatus includes an information acquisition unit 121, a feature matching unit 122, and an exception handling unit 123.
The information obtaining unit 121 is configured to obtain stack information of an application program when it is monitored that the application program is abnormal;
the feature matching unit 122 is configured to perform stack feature matching on the stack information according to a preset exception screening rule to determine whether an exception occurring at present in the application program belongs to an exception that does not affect the operation of the application program;
the exception handling unit 123 is configured to perform, when the determination result is yes, handling the exception of the application program according to a pre-modified crash handling logic, so that the application program continues to operate normally;
the exception handling unit 123 is configured to perform, when the determination result is negative, handling the exception according to the original crash handling logic of the application program.
In one embodiment, the types of exceptions that occur to an application include: a third party program exception or a local program exception; the exception handling unit is specifically configured to perform: determining an exception type corresponding to the exception; and processing the exception of the application program according to the pre-modified crash processing logic corresponding to the exception type.
In an embodiment, when it is determined that the exception type corresponding to the exception is a third-party program exception, the exception processing unit 123 is specifically configured to perform: judging whether the thread corresponding to the abnormality is a background thread; if so, closing the background thread corresponding to the abnormality; and when the judgment result is negative, processing the exception of the application program in a nested event processor mode.
In an embodiment, the exception handling unit 123 is specifically configured to perform: nesting an inner layer event processor in the original event processor of the application program, and processing the event through the inner layer event processor; when the application program is monitored to be abnormal, the inner layer event processor starts to circularly read the current event until the abnormal condition is judged to belong to the abnormal white list, and the inner layer event processor starts to read the next event for processing
In an embodiment, when it is determined that the exception type corresponding to the exception is a local program exception, the exception handling unit 123 is specifically configured to perform: restoring the thread with the exception to the processing node without the exception, and enabling the thread to skip the node with the exception by adding a tag.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
By adopting the application program crash processing device provided by the embodiment of the disclosure, when the application program is monitored to be abnormal, the stack information of the application program can be obtained firstly; further, stack feature matching is carried out on the stack information according to preset exception screening so as to judge whether the current exception of the application program belongs to an exception which has no influence on the operation of the application program; if so, the application program processes the exception according to the pre-modified crash processing logic so that the application program can continue to normally run; and if the judgment result is negative, the application program processes the abnormity according to the original collapse processing logic, namely, the application program is closed. Through stack feature matching, an exception which does not affect the operation of the application program can be identified, and further, for the exception, the application program can be modified through the pre-modified crash processing logic, namely, the continuous operation of the application program is not terminated. By adopting the method provided by the embodiment of the disclosure, the application program can be ensured not to be crashed or flashed back when some exceptions which do not affect the program operation occur, thereby greatly reducing the times of crash of the application program due to the exceptions.
FIG. 3 is a block diagram illustrating an electronic device 300 for application crash processing in accordance with an exemplary embodiment. Referring to fig. 3, at the hardware level, the electronic device for processing application crash includes a processor, and optionally an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (peripheral component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 3, but this does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory to the memory and then runs the computer program, and an application program crash processing device is formed on a logic level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
when monitoring that an application program is abnormal, acquiring stack information of the application program;
performing stack feature matching on the stack information according to a preset abnormal white list to judge whether the current abnormality of the application program belongs to the abnormal white list, wherein the abnormal white list stores the determined stack features of the abnormality which has no influence on the operation of the application program;
when the judgment result is yes, processing the abnormity of the application program according to the pre-modified crash processing logic so as to enable the application program to continue to normally run;
and when the judgment result is negative, processing the exception according to the original crash processing logic of the application program.
The method performed by the application crash processing electronic device according to the embodiment of fig. 3 of the present disclosure may be applied to or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The electronic device may also execute the method of fig. 1 and implement the function of the application crash processing apparatus in the embodiment shown in fig. 1, which is not described herein again in this disclosure.
Of course, besides the software implementation, the electronic device of the present disclosure does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution main bodies of the following processing flows are not limited to the respective logic units, and may also be hardware or logic devices.
In an exemplary embodiment, a storage medium comprising instructions, such as a memory comprising instructions, executable by the processor 320 of the electronic device 300 to perform the above-described method is also provided. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. An application crash processing method, comprising:
when monitoring that an application program is abnormal, acquiring stack information of the application program;
according to a preset exception screening rule, performing stack feature matching on the stack information to judge whether the current exception of the application program belongs to an exception which has no influence on the operation of the application program;
when the judgment result is yes, processing the abnormity of the application program according to the pre-modified crash processing logic so as to enable the application program to continue to normally run;
and when the judgment result is negative, processing the exception according to the original crash processing logic of the application program.
2. The method of claim 1, wherein the type of exception made by the application comprises: a third party program exception or a local program exception;
then, the processing the exception of the application program according to the pre-modified crash processing logic specifically includes:
determining an exception type corresponding to the exception;
and processing the exception of the application program according to the pre-modified crash processing logic corresponding to the exception type.
3. The method for processing an application crash, as recited in claim 2, wherein when it is determined that the exception type corresponding to the exception is a third-party program exception, processing the exception of the application according to the pre-modified crash processing logic corresponding to the exception type, specifically includes:
judging whether the thread corresponding to the abnormality is a background thread;
if so, closing the background thread corresponding to the abnormality;
and when the judgment result is negative, processing the exception of the application program in a nested event processor mode.
4. The method for processing application crash of claim 3, wherein handling exceptions of the application by nesting event handlers specifically comprises:
nesting an inner layer event processor in the original event processor of the application program, and processing the event through the inner layer event processor;
when the application program is monitored to be abnormal, the inner layer event processor starts to read the current event circularly until the abnormality is judged to belong to the abnormality which has no influence on the operation of the application program, and then the inner layer event processor starts to read the next event for processing.
5. The method for processing an application crash of claim 2, wherein when it is determined that the exception type corresponding to the exception is a local program exception, processing the exception of the application according to a pre-modified crash processing logic, specifically comprising:
and restoring the abnormal thread to the processing node without the abnormality, and enabling the thread to skip the abnormal node by adding a label.
6. An application crash processing apparatus, comprising:
the information acquisition unit is configured to acquire stack information of the application program when monitoring that the application program is abnormal;
the characteristic matching unit is configured to execute stack characteristic matching on the stack information according to a preset exception screening rule so as to judge whether the current exception of the application program belongs to an exception which does not influence the operation of the application program;
the exception handling unit is configured to execute, when the judgment result is yes, to handle the exception of the application program according to the pre-modified crash handling logic, so that the application program continues to run normally;
and the exception handling unit is configured to carry out handling on the exception according to the original crash handling logic of the application program when the judgment result is negative.
7. The application crash processing apparatus of claim 6, wherein the type of exception made by the application comprises: a third party program exception or a local program exception;
the exception handling unit is specifically configured to perform:
determining an exception type corresponding to the exception;
and processing the exception of the application program according to the pre-modified crash processing logic corresponding to the exception type.
8. The apparatus for application crash processing as defined in claim 7, wherein when determining that the exception type corresponding to the exception is a third-party program exception, the exception handling unit is specifically configured to perform:
judging whether the thread corresponding to the abnormality is a background thread;
if so, closing the background thread corresponding to the abnormality;
and when the judgment result is negative, processing the exception of the application program in a nested event processor mode.
9. An application crash handling electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the application crash handling method of any of claims 1 to 5.
10. A storage medium having instructions that, when executed by a processor of an application crash processing electronic device, enable the application crash processing electronic device to perform the application crash processing method of any one of claims 1 to 5.
CN202010568640.8A 2020-06-19 2020-06-19 Application crash processing method, device and system Pending CN111708655A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010568640.8A CN111708655A (en) 2020-06-19 2020-06-19 Application crash processing method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010568640.8A CN111708655A (en) 2020-06-19 2020-06-19 Application crash processing method, device and system

Publications (1)

Publication Number Publication Date
CN111708655A true CN111708655A (en) 2020-09-25

Family

ID=72542296

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010568640.8A Pending CN111708655A (en) 2020-06-19 2020-06-19 Application crash processing method, device and system

Country Status (1)

Country Link
CN (1) CN111708655A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112559235A (en) * 2020-12-18 2021-03-26 惠州Tcl移动通信有限公司 Android thread exception handling method, terminal and computer readable storage medium
CN112698980A (en) * 2021-01-05 2021-04-23 网宿科技股份有限公司 Exception handling method, electronic device, and storage medium
CN113204445A (en) * 2021-05-10 2021-08-03 北京奇艺世纪科技有限公司 Information transmission method, device, equipment and storage medium for crash location
CN113282436A (en) * 2021-05-21 2021-08-20 北京达佳互联信息技术有限公司 Event processing method, device, equipment and storage medium
CN113297149A (en) * 2021-06-21 2021-08-24 中国农业银行股份有限公司 Method and device for monitoring data processing request
CN113485929A (en) * 2021-07-12 2021-10-08 北大方正集团有限公司 Data processing method, device, equipment, storage medium and program product
CN113703946A (en) * 2021-08-31 2021-11-26 中国联合网络通信集团有限公司 Application recovery method and device, electronic equipment and computer readable storage medium
CN113704088A (en) * 2021-07-21 2021-11-26 郑州云海信息技术有限公司 Process tracing method, process tracing system and related device
CN113900851A (en) * 2021-10-29 2022-01-07 广州品唯软件有限公司 Android application software control method and device
CN114625428A (en) * 2020-12-10 2022-06-14 荣耀终端有限公司 Application exception processing method and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140310562A1 (en) * 2013-04-15 2014-10-16 Tencent Technology (Shenzhen) Company Limited Method and Device For Signing Program Crash
CN106528316A (en) * 2016-11-10 2017-03-22 霍尔果斯霹雳互动网络科技有限公司 Anti-crash method and system of online game server
CN107436777A (en) * 2016-05-27 2017-12-05 北京京东尚科信息技术有限公司 Mobile terminal, application crash processing method and processing device
CN108345542A (en) * 2018-02-28 2018-07-31 腾讯科技(深圳)有限公司 Abnormality eliminating method and device in a kind of application program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140310562A1 (en) * 2013-04-15 2014-10-16 Tencent Technology (Shenzhen) Company Limited Method and Device For Signing Program Crash
CN107436777A (en) * 2016-05-27 2017-12-05 北京京东尚科信息技术有限公司 Mobile terminal, application crash processing method and processing device
CN106528316A (en) * 2016-11-10 2017-03-22 霍尔果斯霹雳互动网络科技有限公司 Anti-crash method and system of online game server
CN108345542A (en) * 2018-02-28 2018-07-31 腾讯科技(深圳)有限公司 Abnormality eliminating method and device in a kind of application program

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114625428A (en) * 2020-12-10 2022-06-14 荣耀终端有限公司 Application exception processing method and electronic equipment
CN114625428B (en) * 2020-12-10 2024-03-26 荣耀终端有限公司 Application exception processing method and electronic equipment
CN112559235A (en) * 2020-12-18 2021-03-26 惠州Tcl移动通信有限公司 Android thread exception handling method, terminal and computer readable storage medium
CN112698980A (en) * 2021-01-05 2021-04-23 网宿科技股份有限公司 Exception handling method, electronic device, and storage medium
CN113204445A (en) * 2021-05-10 2021-08-03 北京奇艺世纪科技有限公司 Information transmission method, device, equipment and storage medium for crash location
CN113204445B (en) * 2021-05-10 2024-04-19 北京奇艺世纪科技有限公司 Information transmission method, device, equipment and storage medium for crash positioning
CN113282436A (en) * 2021-05-21 2021-08-20 北京达佳互联信息技术有限公司 Event processing method, device, equipment and storage medium
CN113297149A (en) * 2021-06-21 2021-08-24 中国农业银行股份有限公司 Method and device for monitoring data processing request
CN113485929A (en) * 2021-07-12 2021-10-08 北大方正集团有限公司 Data processing method, device, equipment, storage medium and program product
CN113704088A (en) * 2021-07-21 2021-11-26 郑州云海信息技术有限公司 Process tracing method, process tracing system and related device
CN113704088B (en) * 2021-07-21 2023-09-12 郑州云海信息技术有限公司 Process tracing method, process tracing system and related device
CN113703946A (en) * 2021-08-31 2021-11-26 中国联合网络通信集团有限公司 Application recovery method and device, electronic equipment and computer readable storage medium
CN113703946B (en) * 2021-08-31 2023-07-14 中国联合网络通信集团有限公司 Application recovery method and device, electronic equipment and computer readable storage medium
CN113900851A (en) * 2021-10-29 2022-01-07 广州品唯软件有限公司 Android application software control method and device

Similar Documents

Publication Publication Date Title
CN111708655A (en) Application crash processing method, device and system
CN111124906B (en) Tracking method, compiling method and device based on dynamic embedded points and electronic equipment
CN109032825B (en) Fault injection method, device and equipment
CN107066519B (en) Task detection method and device
CN109408232B (en) Transaction flow-based componentized bus calling execution system
CN111638906A (en) SDK (software development kit) access method, device and system
CN111552567B (en) Thread management method and device, electronic equipment and storage medium
CN111625425A (en) Data monitoring method, device and system
CN110162344B (en) Isolation current limiting method and device, computer equipment and readable storage medium
CN104572394A (en) Process monitoring method and device
CN113704117B (en) Algorithm testing system, method and device
US11704139B2 (en) Service processing method and apparatus, electronic device, and storage medium
CN109445937B (en) Componentized programming and seamless execution method
CN108595319B (en) Function selection method and server
CN110851207B (en) State transition management method and device, electronic equipment and storage medium
CN110046100B (en) Packet testing method, electronic device and medium
CN112241362A (en) Test method, test device, server and storage medium
CN108647102B (en) Service request processing method and device of heterogeneous system and electronic equipment
CN111949297B (en) Block chain intelligent contract upgrading method and device and electronic equipment
CN110647463B (en) Method and device for restoring test breakpoint and electronic equipment
CN111767087A (en) Adaptive theme configuration method and device
CN109981873B (en) Address book permission opening method and device and electronic equipment
CN108133123B (en) Application program identification method and system
CN113342376B (en) Method and device for upgrading operating system of Internet of things equipment
CN114928603B (en) Upgrading method and device of client software, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination