FightingForDevelop opened a new issue #3113: [Android]White Screen onRenderError -1001,degradeToH5|createInstance fail|wx_create_instance_error isJSFrameworkInit==false reInitCount == 1 when a weex page creating where weex version is 0.28.0 URL: https://github.com/apache/incubator-weex/issues/3113 My project occurs white screen now and then.But it reproduces difficultily.And I check source codes finding that it execute in Child Thread.Even if it didn't occur in old version. `private static void doInitInternal(final Application application, final InitConfig config) { WXEnvironment.sApplication = application; if (application == null) { WXLogUtils.e("WXSDKEngine", " doInitInternal application is null"); WXExceptionUtils.commitCriticalExceptionRT((String)null, WXErrorCode.WX_KEY_EXCEPTION_SDK_INIT, "doInitInternal", WXErrorCode.WX_KEY_EXCEPTION_SDK_INIT.getErrorMsg() + "WXEnvironment sApplication is null", (Map)null); } WXEnvironment.JsFrameworkInit = false; WXBridgeManager.getInstance().postWithName(new Runnable() { public void run() { long start = System.currentTimeMillis(); WXSDKManager sm = WXSDKManager.getInstance(); sm.onSDKEngineInitialize(); if (config != null) { sm.setInitConfig(config); } WXSoInstallMgrSdk.init(application, sm.getIWXSoLoaderAdapter(), sm.getWXStatisticsListener()); IWXUserTrackAdapter userTrackAdapter = config != null ? config.getUtAdapter() : null; int version = true; WXSDKEngine.mIsSoInit = WXSoInstallMgrSdk.initSo("weexcore", 1, userTrackAdapter); WXSoInstallMgrSdk.copyJssRuntimeSo(); if (config != null) { Iterator var6 = config.getNativeLibraryList().iterator(); while(var6.hasNext()) { String libraryName = (String)var6.next(); WXSoInstallMgrSdk.initSo(libraryName, 1, userTrackAdapter); } } if (!WXSDKEngine.mIsSoInit) { WXExceptionUtils.commitCriticalExceptionRT((String)null, WXErrorCode.WX_KEY_EXCEPTION_SDK_INIT, "doInitInternal", WXErrorCode.WX_KEY_EXCEPTION_SDK_INIT.getErrorMsg() + "isSoInit false", (Map)null); } else { sm.initScriptsFramework(config != null ? config.getFramework() : null); WXEnvironment.sSDKInitExecuteTime = System.currentTimeMillis() - start; WXLogUtils.renderPerformanceLog("SDKInitExecuteTime", WXEnvironment.sSDKInitExecuteTime); } } }, (WXSDKInstance)null, "doInitWeexSdkInternal"); WXStateRecord.getInstance().startJSThreadWatchDog(); register(); }` So I annotate "WXSDKEngine.initialize(BaseApplication.app, con);" to simulate error -1001.And in Method"onException" catching the errCode,I reinitialize and reload the page,then it works.I want to affirm if it reasonable or not. Looking forward to your reply!
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
