{"record":{"id":"e2fb9ad84cc66038","repo":"Tencent/matrix","slug":"custom-library-loader-is-not-supported-in-isolate","errorCode":null,"errorMessage":"Custom library loader is not supported in isolate process warm-up mode.","messagePattern":"Custom library loader is not supported in isolate process warm-up mode\\.","errorType":"exception","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"matrix/matrix-android/matrix-backtrace/src/main/java/com/tencent/matrix/backtrace/WeChatBacktrace.java","lineNumber":211,"sourceCode":"    }\n\n    private boolean runningInIsolateProcess(Configuration configuration) {\n        String processName = ProcessUtil.getProcessNameByPid(configuration.mContext);\n        if (processName != null && processName.endsWith(ISOLATE_PROCESS_SUFFIX)) {\n            return true;\n        }\n        return false;\n    }\n\n    private void configure(Configuration configuration) {\n\n        if (runningInIsolateProcess(configuration)) {\n            MatrixLog.i(TAG, \"Isolate process does not need any configuration.\");\n            return;\n        }\n\n        if (configuration.mWarmUpInIsolateProcess && configuration.mLibraryLoader != null) {\n            throw new ConfigurationException(\"Custom library loader is not supported in \" +\n                    \"isolate process warm-up mode.\");\n        }\n\n        // Load backtrace library.\n        loadLibrary(configuration.mLibraryLoader);\n\n        // Init xlog\n        XLogNative.setXLogger(configuration.mPathOfXLogSo);\n\n        // Enable log\n        enableLogger(configuration.mEnableLog);\n\n        MatrixLog.i(TAG, configuration.toString());\n\n        if (configuration.mBacktraceMode == Mode.Fp || configuration.mBacktraceMode == Mode.Dwarf) {\n            WeChatBacktraceNative.setBacktraceMode(configuration.mBacktraceMode.value);\n        }\n","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/Tencent/matrix/blob/3b8293bd65d47eeea7caf1f32a3a5d4d5eab60e7/matrix/matrix-android/matrix-backtrace/src/main/java/com/tencent/matrix/backtrace/WeChatBacktrace.java#L193-L229","documentation":"WeChatBacktrace.configure() throws ConfigurationException when both mWarmUpInIsolateProcess is enabled and a custom mLibraryLoader is supplied. In isolate-process warm-up mode the child process performs native library loading itself and cannot accept a caller-supplied loader, so the combination is rejected at configuration time.","triggerScenarios":"Building a BacktraceConfiguration with setWarmUpInIsolateProcess(true) and also calling setLibraryLoader(...), then calling WeChatBacktrace.configure(configuration) from a non-isolate process.","commonSituations":"Enabling isolate-process warm-up while keeping a previously configured custom ReLinker/SoLoader loader; merging configuration defaults where mLibraryLoader stays set after switching warm-up mode.","solutions":["Remove the setLibraryLoader(...) call from the BacktraceConfiguration.","Set the library loader to null: configuration.mLibraryLoader = null before configure().","Disable isolate-process warm-up (setWarmUpInIsolateProcess(false)) if the custom loader is required."],"exampleFix":"// before\nBacktraceConfiguration cfg = new BacktraceConfiguration();\ncfg.setWarmUpInIsolateProcess(true);\ncfg.setLibraryLoader(new ReLinker.Loader()); // throws\n\n// after\nBacktraceConfiguration cfg = new BacktraceConfiguration();\ncfg.setWarmUpInIsolateProcess(true);\n// use default loader; custom loader unsupported in isolate warm-up mode","handlingStrategy":"validation","validationCode":"if (config.isWarmUpInIsolateProcess() && config.getLibraryLoader() != null) {\n    config.setLibraryLoader(null); // clear before configure()\n}\nWeChatBacktrace.configure(config);","typeGuard":null,"tryCatchPattern":"try {\n    WeChatBacktrace.configure(config);\n} catch (ConfigurationException e) {\n    MatrixLog.e(TAG, \"invalid backtrace config: \" + e.getMessage());\n}","preventionTips":["Treat isolate-process warm-up and custom library loaders as mutually exclusive options.","Build the BacktraceConfiguration in one factory method so conflicting flags cannot coexist.","Add a startup unit test constructing the configuration to catch conflicts early."],"tags":["android","configuration","backtrace","native-library"],"backgroundTag":"conflicting-config-options","analyzedSha":"3b8293bd65d47eeea7caf1f32a3a5d4d5eab60e7","analyzedAt":"2026-09-08T08:01:39.722Z","contentChangedAt":"2026-09-08T08:01:39.722Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}