alibaba / alibaba/AndFix

给大家提醒一个坑,Application的onCreate里面AndFix相关的逻辑,一定要区分进程

Open
#122 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
7k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

给大家提醒一个坑,Application的onCreate里面AndFix相关的逻辑,一定要区分进程

因为如果你的app是多进程的,每个进程都会创建Application对象,导致你的补丁逻辑被重复执行。
在内存层面看,补丁操作的影响只会局限在进程之内,似乎没有什么关系,但是如果你的补丁操作涉及到文件系统的操作,比如拷贝文件、删除文件、解压文件等等,那么进程之间就会相互影响了。

我们遇到的问题就是在主进程里面下载好的补丁包会莫名其妙地不见,主进程下载好补丁包后,信鸽进程被启动,创建Application对象,执行补丁逻辑,把刚刚主进程下载好的补丁包应用了,然后又把补丁包删除。。。。。。

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the AndFix-related logic called from Application.onCreate and how it runs in the main and Xinge processes. Reproduce the multi-process case with a downloaded patch, then verify that patch-file operations in one process do not remove or reapply files unexpectedly in another.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.