HarmonyOS 鸿蒙Next cppcrash:SIGABRT [jsi_declarative_engine.cpp] Ark ecmascript::FixOpcode Line:305 Is not an Ecma Opcode opcode: 0

发布于 1周前 作者 wuwangju 来自 鸿蒙OS

HarmonyOS 鸿蒙Next cppcrash:SIGABRT [jsi_declarative_engine.cpp] Ark ecmascript::FixOpcode Line:305 Is not an Ecma Opcode opcode: 0

加入新页面photoDraw.ets,跳转时真机测试就会出现cppcrash,软件打不开。但把新页面的内容全部注释以后就能正常安装打开:

cke_1326.png

cke_6330.png


更多关于HarmonyOS 鸿蒙Next cppcrash:SIGABRT [jsi_declarative_engine.cpp] Ark ecmascript::FixOpcode Line:305 Is not an Ecma Opcode opcode: 0的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html

9 回复

日志1:

04-18 12:19:27.159 17869-17869/? I libc/ : SetHeapTaggingLevel: tag level set to 0

04-18 12:19:27.162 17869-17869/? E Ark/ runtime: Unknown bits set in runtime_flags: 16787458

04-18 12:19:27.163 17869-17881/? E Ark/ runtime: Failed to set a thread name: HDC-JDWP Connection Control Thread

04-18 12:19:27.164 17869-17869/? I AndroidRuntime/: RuntimeInit: Starting application from zygote

04-18 12:19:27.164 17869-17882/? I Ark/ jni : unsupport native function startHeapTaskProcessor

04-18 12:19:27.164 17869-17869/? D AndroidRuntime/: Entered RuntimeInit!

04-18 12:19:27.164 17869-17882/? I Ark/ jni : runHeapTasks is not supported.

04-18 12:19:27.165 17869-17869/? I Ark/ jni : unimplemented native function setDisabledCompatChangesNative

04-18 12:19:27.165 17869-17869/? I AndroidRuntime/: MethodAndArgsCaller run()

(中间省略部分内容)

04-18 12:19:27.675 17869-17919/com.hit.myapplication.hmservice D 01E00/ResourceManager: getStringArray resId = 117441070

04-18 12:19:27.675 17869-17919/com.hit.myapplication.hmservice D 01E00/ResourceManager: getStringArray resId = 117441418

更多关于HarmonyOS 鸿蒙Next cppcrash:SIGABRT [jsi_declarative_engine.cpp] Ark ecmascript::FixOpcode Line:305 Is not an Ecma Opcode opcode: 0的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html


日志2:

04-18 12:19:27.724 17869-17919/com.hit.myapplication.hmservice D 01E00/ResourceManager: getStringArray resId = 117441385  
04-18 12:19:27.724 17869-17919/com.hit.myapplication.hmservice D 01E00/ResourceManager: getStringArray resId = 117441382  
04-18 12:19:27.728 17869-17919/com.hit.myapplication.hmservice D 01E00/ResourceManager: getStringArray resId = 117441718  
04-18 12:19:27.729 17869-17919/com.hit.myapplication.hmservice D 01E00/ResourceManager: getStringArray resId = 117441233  
04-18 12:19:27.730 17869-17919/com.hit.myapplication.hmservice D 01E00/ResourceManager: getStringArray resId = 117441445  
04-18 12:19:27.731 17869-17919/com.hit.myapplication.hmservice D 01E00/ResourceManager: getStringArray resId = 117441061  
04-18 12:19:27.780 17869-17914/com.hit.myapplication.hmservice E Ark/ gc  : GcHung: GC overtime: total:77.559ms cause: Young  
04-18 12:19:27.780 17869-17914/com.hit.myapplication.hmservice I Ark/ gc  : [YOUNG (Young)] Apr 18 12:19:27.780 Generation GC freed 41493(1MB), 0(0B) LOS objects, 98% free, 11MB/512MB, paused 76.695ms total 77.915ms  
04-18 12:19:27.819 17869-17914/com.hit.myapplication.hmservice I SystemFonts/: custom xml:/system/etc/fonts.xml  
04-18 12:19:28.129 17869-17926/com.hit.myapplication.hmservice I flutter/ : [INFO:ui_dart_state.cc(43)] SetCurStateItem id:2  
04-18 12:19:28.133 17869-17869/com.hit.myapplication.hmservice D 03910/Ace: AceNativeViewOhos: <private>  
04-18 12:19:28.133 17869-17869/com.hit.myapplication.hmservice I 03900/Ace: [window.cpp(Window)-(2)] Window Created success.  
04-18 12:19:28.135 17869-17926/com.hit.myapplication.hmservice I 03900/Ace: [vip_thread_jni.cpp(CallVipMethod)-(2)] Set thread <private> to RTG successful  
04-18 12:19:28.150 17869-17926/com.hit.myapplication.hmservice I 03900/Ace: [jsi_declarative_engine.cpp(Initialize)-(2)] JsiDeclarativeEngine Initialize  
04-18 12:19:28.150 17869-17869/com.hit.myapplication.hmservice I 03900/Ace: [declarative_frontend.cpp(Initialize)-(2)] DeclarativeFrontend initialize begin.  
04-18 12:19:28.150 17869-17869/com.hit.myapplication.hmservice E 03900/Ace: [utils.h(GetAssetContentImpl)-(2)] AssetManager is null  
04-18 12:19:28.150 17869-17869/com.hit.myapplication.hmservice E 03900/Ace: [utils.h(GetAssetContentImpl)-(2)] AssetManager is null  
04-18 12:19:28.150 17869-17869/com.hit.myapplication.hmservice E 03900/Ace: [frontend_delegate_declarative.cpp(FrontendDelegateDeclarative)-(2)] parse manifest.json failed  
04-18 12:19:28.150 17869-17869/com.hit.myapplication.hmservice I 03900/Ace: [declarative_frontend.cpp(Initialize)-(2)] DeclarativeFrontend initialize end.  
04-18 12:19:28.150 17869-17869/com.hit.myapplication.hmservice I 03900/Ace: [declarative_frontend.cpp(SetAssetManager)-(2)] DeclarativeFrontend SetAssetManager.  
04-18 12:19:28.150 17869-17926/com.hit.myapplication.hmservice I 03900/Ace: [jsi_declarative_engine.cpp(Initialize)-(2)] Initialize will not use sharedRuntime  
04-18 12:19:28.151 17869-17926/com.hit.myapplication.hmservice I 03900/Ace: [jsi_declarative_engine.cpp(InitJsEnv)-(2)] JsiDeclarativeEngineInstance InitJsEnv not usingSharedRuntime, create own  
04-18 12:19:28.151 17869-17869/com.hit.myapplication.hmservice I 03900/Ace: [declarative_frontend.cpp(AttachPipelineContext)-(2)] DeclarativeFrontend AttachPipelineContext.  
04-18 12:19:28.151 17869-17869/com.hit.myapplication.hmservice I 03900/Ace: [js_accessibility_manager.cpp(InitializeCallback)-(2)] RegisterFetchNodeInfoCallback begin  
04-18 12:19:28.151 17869-17869/com.hit.myapplication.hmservice I 03900/Ace: [js_accessibility_manager.cpp(InitializeCallback)-(2)] RegisterFetchNodeInfoCallback end  
04-18 12:19:28.151 17869-17869/com.hit.myapplication.hmservice I 03900/Ace: [js_accessibility_manager.cpp(InitializeCallback)-(2)] RegisterEventHandleCallback begin  
04-18 12:19:28.151 17869-17869/com.hit.myapplication.hmservice I 03900/Ace: [js_accessibility_manager.cpp(InitializeCallback)-(2)] RegisterEventHandleCallback end  
04-18 12:19:28.151 17869-17926/com.hit.myapplication.hmservice I 03900/Ace: [jsi_declarative_engine.cpp(PrintLog)-(2)] Ark runtime::EcmaVM Initialize  
04-18 12:19:28.154 17869-17869/com.hit.myapplication.hmservice I 01100/AppExecFwk: FileUtils::createFolder directory <private> exists  
04-18 12:19:28.155 17869-17869/com.hit.myapplication.hmservice D 01650/ExecutorUtils: start. param task serviceName is PreferencesImplWrite#default, corePoolSize is 0, maxPoolSize is 1, keepAliveTime is 3, blockQueueSize is null  
04-18 12:19:28.155 17869-17869/com.hit.myapplication.hmservice D 01650/ExecutorUtils: start. param task serviceName is PreferencesImplRead#default, corePoolSize is 0, maxPoolSize is 1, keepAliveTime is 3, blockQueueSize is 1000  
04-18 12:19:28.159 17869-17926/com.hit.myapplication.hmservice W 03900/Ace: [flutter_asset_manager.cpp(GetAsset)-(2)] find asset failed, assetName = component_collection.txt  
04-18 12:19:28.160 17869-17926/com.hit.myapplication.hmservice W 03900/Ace: [utils.h(GetAssetContentImpl)-(2)] uri:component_collection.txt Asset is null  
04-18 12:19:28.161 17869-17869/com.hit.myapplication.hmservice I 03900/Ace: [ace_container.cpp(CreatePage)-(-2)] JNI CreatePage instance:<private> page:<private>.  
04-18 12:19:28.161 17869-17869/com.hit.myapplication.hmservice W 03910/Ace: SystemPluginLoader: <private>  
04-18 12:19:28.163 17869-17915/com.hit.myapplication.hmservice I 01400/DataAbilityHelperPlugin: getPluginGroup  
04-18 12:19:28.163 17869-17869/com.hit.myapplication.hmservice W 03900/Ace: [flutter_asset_manager.cpp(GetAsset)-(-2)] find asset failed, assetName = module_collection.txt  
04-18 12:19:28.163 17869-17869/com.hit.myapplication.hmservice W 03900/Ace: [utils.h(GetAssetContentImpl)-(-2)] uri:module_collection.txt Asset is null  
04-18 12:19:28.163 17869-17869/com.hit.myapplication.hmservice W 03900/Ace: [frontend_delegate_declarative.cpp(GetPluginsUsed)-(-2)] read failed, will load all the system plugin  
04-18 12:19:28.166 17869-17869/com.hit.myapplication.hmservice I 01E00/ResourceManagerPlugin: getPluginGroup  
04-18 12:19:28.172 17869-17869/com.hit.myapplication.hmservice I 01100/AbilityDelegatorPlugin: getPluginGroup  
04-18 12:19:28.172 17869-17869/com.hit.myapplication.hmservice I 01100/AbilityDelegatorPlugin: getPluginGroup  
04-18 12:19:28.173 17869-17869/com.hit.myapplication.hmservice I 01400/FormHostPlugin: getPluginGroup  
04-18 12:19:28.176 17869-17869/com.hit.myapplication.hmservice E 03910/Ace: SystemPluginLoader: <private>  
04-18 12:19:28.177 17869-17869/com.hit.myapplication.hmservice D 02D08/HISYSEVENT: size=292, sysevent={"domain_":"ACE","name_":"PLUGIN_EXCEPTION","type_":1,"time_":1681791568177,"tz_":"+0800","pid_":17869,"tid_":17869,"uid_":10871,"traceid_":"45b4c01a4f2b279","spanid_":"36acd81","pspanid_":"2a6ec8b","trace_flag_":17,"PID":17869,"PACKAGE_NAME":"com.hit.myapplication.hmservice","ERROR_TYPE":2}  
04-18 12:19:28.177 17869-17869/com.hit.myapplication.hmservice D 02D08/HISYSEVENT: reset send buffer size old=4194304, new=786432  
04-18 12:19:28.177 17869-17869/com.hit.myapplication.hmservice D 02D08/HISYSEVENT: HiSysEvent send data successful  
04-18 12:19:28.178 17869-17869/com.hit.myapplication.hmservice E 03910/Ace: SystemPluginLoader: <private>  
04-18 12:19:28.178 17869-17869/com.hit.myapplication.hmservice D 02D08/HISYSEVENT: size=292, sysevent={"domain_":"ACE","name_":"PLUGIN_EXCEPTION","type_":1,"time_":1681791568178,"tz_":"+0800","pid_":17869,"tid_":17869,"uid_":10871,"traceid_":"45b4c01a4f2b279","spanid_":"36acd81","pspanid_":"2a6ec8b","trace_flag_":17,"PID":17869,"PACKAGE_NAME":"com.hit.myapplication.hmservice","ERROR_TYPE":2}  
04-18 12:19:28.178 17869-17869/com.hit.myapplication.hmservice D 02D08/HISYSEVENT: reset send buffer size old=4194304, new=786432  
04-18 12:19:28.178 17869-17869/com.hit.myapplication.hmservice D 02D08/HISYSEVENT: HiSysEvent send data successful  
04-18 12:19:28.179 17869-17869/com.hit.myapplication.hmservice I 015B0/HotspotPlugin: into getPluginGroup, size is 1  
04-18 12:19:28.180 17869-17869/com.hit.myapplication.hmservice I 015B0/UDPSocketPlugin: into getPluginGroup, size is 5  
04-18 12:19:28.181 17869-17869/com.hit.myapplication.hmservice D 015B0/TCPSocketPlugin: into getPluginGroup, size is 5  
04-18 12:19:28.182 17869-17869/com.hit.myapplication.hmservice I 01400/FeatureAbilityPlugin: getPluginGroup  
04-18 12:19:28.197 17869-17869/com.hit.myapplication.hmservice I 01E00/I18nPlugin: getPluginGroup  
04-18 12:19:28.198 17869-17869/com.hit.myapplication.hmservice I 01600/AGAccessibility: AccessibilityPlugin::getPluginGroup  
04-18 12:19:28.200 17869-17869/com.hit.myapplication.hmservice I 015B0/MdnsPlugin: into getPluginGroup, size is 8  
04-18 12:19:28.208 17869-17869/com.hit.myapplication.hmservice I 01400/ParticleAbilityPlugin: getPluginGroup  
04-18 12:19:28.209 17869-17869/com.hit.myapplication.hmservice I 015B0/HttpPlugin: HttpPlugin::getPluginGroup  
04-18 12:19:28.210 17869-17869/com.hit.myapplication.hmservice I 01400/WindowPlugin: getPluginGroup  
04-18 12:19:28.212 17869-17869/com.hit.myapplication.hmservice I 02D01/HiEventPlugin: getPluginGroup hievent_js  
04-18 12:19:28.220 17869-17869/com.hit.myapplication.hmservice I 02D07/HiAppEventPlugin: getPluginGroup hiappeventjs  
04-18 12:19:28.228 17869-17869/com.hit.myapplication.hmservice E 03910/Ace: SystemPluginLoader: <private>  
04-18 12:19:28.228 17869-17869/com.hit.myapplication.hmservice D 02D08/HISYSEVENT: size=292, sysevent={"domain_":"ACE","name_":"PLUGIN_EXCEPTION","type_":1,"time_":1681791568228,"tz_":"+0800","pid_":17869,"tid_":17869,"uid_":10871,"traceid_":"45b4c01a4f2b279","spanid_":"36acd81","pspanid_":"2a6ec8b","trace_flag_":17,"PID":17869,"PACKAGE_NAME":"com.hit.myapplication.hmservice","ERROR_TYPE":2}  
04-18 12:19:28.228 17869-17869/com.hit.myapplication.hmservice D 02D08/HISYSEVENT: reset send buffer size old=4194304, new=786432  
04-18 12:19:28.228 17869-17869/com.hit.myapplication.hmservice D 02D08/HISYSEVENT: HiSysEvent send data successful  
04-18 12:19:28.229 17869-17869/com.hit.myapplication.hmservice E 03910/Ace: SystemPluginLoader: <private>  
04-18 12:19:28.230 17869-17869/com.hit.myapplication.hmservice D 02D08/HISYSEVENT: size=292, sysevent={"domain_":"ACE","name_":"PLUGIN_EXCEPTION","type_":1,"time_":1681791568230,"tz_":"+0800","pid_":17869,"tid_":17869,"uid_":10871,"traceid_":"45b4c01a4f2b279","spanid_":"36acd81","pspanid_":"2a6ec8b","trace_flag_":17,"PID":17869,"PACKAGE_NAME":"com.hit.myapplication.hmservice","ERROR_TYPE":2}  
04-18 12:19:28.230 17869-17869/com.hit.myapplication.hmservice D 02D08/HISYSEVENT: reset send buffer size old=4194304, new=786432  
04-18 12:19:28.230 17869-17869/com.hit.myapplication.hmservice D 02D08/HISYSEVENT: HiSysEvent send data successful  
04-18 12:19:28.232 17869-17869/com.hit.myapplication.hmservice W 01510/IPCObjectProxy: handle = 3 created, descriptor:IPCObjectProxy3  
04-18 12:19:28.232 17869-17869/com.hit.myapplication.hmservice I 01510/IPCProcessSkeleton: bool OHOS::IPCProcessSkeleton::AttachObjectInner(OHOS::IRemoteObject *) 285: attach IPCObjectProxy3, inserted:1  
04-18 12:19:28.232 17869-17869/com.hit.myapplication.hmservice W 01510/IPCObjectProxy: it is normal binder, not dbinder  
04-18 12:19:28.232 17869-17869/com.hit.myapplication.hmservice I 01510/IPCProcessSkeleton: sptr<OHOS::IRemoteObject> OHOS::IPCProcessSkeleton::FindOrNewObject(int) 171: handle:3, proto:0  
04-18 12:19:28.233 17869-17869/com.hit.myapplication.hmservice I 02300/GeoConvertAdapter: Get 2802 completed.  
04-18 12:19:28.249 17869-17869/com.hit.myapplication.hmservice E 03910/Ace: SystemPluginLoader: <private>  
04-18 12:19:28.250 17869-17869/com.hit.myapplication.hmservice D 02D08/HISYSEVENT: size=292, sysevent={"domain_":"ACE","name_":"PLUGIN_EXCEPTION","type_":1,"time_":1681791568250,"tz_":"+0800","pid_":17869,"tid_":17869,"uid_":10871,"traceid_":"45b4c01a4f2b279","spanid_":"36acd81","pspanid_":"2a6ec8b","trace_flag_":17,"PID":17869,"PACKAGE_NAME":"com.hit.myapplication.hmservice","ERROR_TYPE":2}  
04-18 12:19:28.250 17869-17869/com.hit.myapplication.hmservice D 02D08/HISYSEVENT: reset send buffer size old=4194304, new=786432  
04-18 12:19:28.250 17869-17869/com.hit.myapplication.hmservice D 02D08/HISYSEVENT: HiSysEvent send data successful  
04-18 12:19:28.250 17869-17926/com.hit.myapplication.hmservice I 03900/Ace: [jsi_declarative_engine.cpp(PrintLog)-(2)] Ark ecmascript::InsertJSPandaFile Line:158 InsertJSPandaFile 11485455526035225897  
04-18 12:19:28.250 17869-17926/com.hit.myapplication.hmservice I 03900/Ace: [jsi_declarative_engine.cpp(PrintLog)-(2)] Ark ecmascript::GenerateProgram Line:123 GenerateProgram 11485455526035225897  
04-18 12:19:28.251 17869-17869/com.hit.myapplication.hmservice I 01400/AGPWindow: DisplayPlugin::getPluginGroup  
04-18 12:19:28.252 17869-17869/com.hit.myapplication.hmservice I 01400/ContinuationManagerPlugin: getPluginGroup  
04-18 12:19:28.253 17869-17869/com.hit.myapplication.hmservice I 01400/FormProviderPlugin: getPluginGroup  
04-18 12:19:28.253 17869-17926/com.hit.myapplication.hmservice I 03900/Ace: [jsi_declarative_engine.cpp(PrintLog)-(2)] Ark ecmascript::InsertJSPandaFile Line:158 InsertJSPandaFile 4099204628502764503  
04-18 12:19:28.253 17869-17926/com.hit.myapplication.hmservice I 03900/Ace: [jsi_declarative_engine.cpp(PrintLog)-(2)] Ark ecmascript::GenerateProgram Line:123 GenerateProgram 4099204628502764503  
04-18 12:19:28.255 17869-17926/com.hit.myapplication.hmservice E 03900/Ace: [ace_res_key_parser.cpp(ParseMatch)-(2)] Invalid key:<private>  
04-18 12:19:28.255 17869-17926/com.hit.myapplication.hmservice E 03900/Ace: [ace_res_key_parser.cpp(DeclarativeParse)-(2)] Invalid config:zh_CN-long-notround-vertical-light-phone-xxxhdpi  
04-18 12:19:28.255 17869-17926/com.hit.myapplication.hmservice W 03900/Ace: [flutter_asset_manager.cpp(GetAsset)-(2)] find asset failed, assetName = resources/default/properties/string.json  
04-18 12:19:28.255 17869-17926/com.hit.myapplication.hmservice W 03900/Ace: [utils.h(GetAssetContentImpl)-(2)] uri:resources/default/properties/string.json Asset is null  
04-18 12:19:28.256 17869-17926/com.hit.myapplication.hmservice I 03900/Ace: [jsi_declarative_engine.cpp(SetPostTask)-(2)] SetPostTask  
04-18 12:19:28.256 17869-17926/com.hit.myapplication.hmservice I 03900/NAPI: [native_engine.cpp(SetPostTask)] SetPostTask in  
04-18 12:19:28.256 17869-17869/com.hit.myapplication.hmservice I 015B0/WebSocketPlugin: into getPluginGroup, size is 5  
04-18 12:19:28.256 17869-17926/com.hit.myapplication.hmservice I 03900/NAPI: [native_module_manager.cpp(SetAppLibPath)] create ld namespace, path: <private>  
04-18 12:19:28.257 17869-17926/com.hit.myapplication.hmservice I 03900/NAPI: [native_module_manager.cpp(CreateLdNamespace)] create ld namespace success  
04-18 12:19:28.257 17869-17926/com.hit.myapplication.hmservice W 03900/Ace: [pipeline_context.cpp(SetRootRect)-(2)] the view scale is zero or root element is nullptr  
04-18 12:19:28.257 17869-17926/com.hit.myapplication.hmservice I 03900/Ace: [root_component.cpp(SetupElementTree)-(2)] First build for element tree.  
04-18 12:19:28.258 17869-17926/com.hit.myapplication.hmservice I 03900/Ace: [root_component.cpp(CreateRenderNode)-(2)] CreateRenderRoot.  
04-18 12:19:28.258 17869-17926/com.hit.myapplication.hmservice I 03900/Ace: [pipeline_context.cpp(SetupRootElement)-(2)] SetupRootElement success!  
04-18 12:19:28.268 17869-17869/com.hit.myapplication.hmservice I 03900/Ace: [frontend_delegate_declarative.cpp(RunPage)-(2)] FrontendDelegateDeclarative RunPage url=  
04-18 12:19:28.268 17869-17869/com.hit.myapplication.hmservice W 03900/Ace: [manifest_widget.cpp(WidgetParse)-(2)] Widget Format is invalid  
04-18 12:19:28.268 17869-17869/com.hit.myapplication.hmservice I 03900/Ace: [frontend_delegate_declarative.cpp(LoadPage)-(2)] FrontendDelegateDeclarative 0x<private> LoadPage[0]: pages/index.js.  
04-18 12:19:28.268 17869-17926/com.hit.myapplication.hmservice I 03900/Ace: [jsi_declarative_engine.cpp(PrintLog)-(-1)] Ark ecmascript::InsertJSPandaFile Line:158 InsertJSPandaFile 14710734116505675008  
04-18 12:19:28.269 17869-17926/com.hit.myapplication.hmservice I 03900/Ace: [jsi_declarative_engine.cpp(PrintLog)-(-1)] Ark ecmascript::GenerateProgram Line:123 GenerateProgram 14710734116505675008  
04-18 12:19:28.269 17869-17915/com.hit.myapplication.hmservice I 01D00/BarrierFree: BarrierFreeInnerClient: registerBarrierFreeAbility start, type:1,context:ohos.app.ContextDeal[@beae209](/user/beae209)  
04-18 12:19:28.270 17869-17915/com.hit.myapplication.hmservice I 01D00/BarrierFree: AccessibilityViewAbilityAdapter: initBarrierFreeView start. type:1  
04-18 12:19:28.270 17869-17926/com.hit.myapplication.hmservice I 03900/Ace: [jsi_declarative_engine.cpp(PrintLog)-(-1)] Ark ecmascript::InsertJSPandaFile Line:158 InsertJSPandaFile 1336973023027503572  
04-18 12:19:28.270 17869-17926/com.hit.myapplication.hmservice I 03900/Ace: [jsi_declarative_engine.cpp(PrintLog)-(-1)] Ark ecmascript::GenerateProgram Line:123 GenerateProgram 1336973023027503572  
04-18 12:19:28.271 17869-17869/com.hit.myapplication.hmservice I 01400/AGPWindowManager: AGPWindowManager getTopShowingWindow window is null  
04-18 12:19:28.271 17869-17915/com.hit.myapplication.hmservice I 01D00/BarrierFree: AccessibilityViewAbilityAdapter: initBarrierFreeView end.  
04-18 12:19:28.271 17869-17926/com.hit.myapplication.hmservice I 03900/Ace: [jsi_declarative_engine.cpp(PrintLog)-(-1)] Ark ecmascript::InsertJSPandaFile Line:158 InsertJSPandaFile 12588484318214886102  
04-18 12:19:28.271 17869-17926/com.hit.myapplication.hmservice I 03900/Ace: [jsi_declarative_engine.cpp(PrintLog)-(-1)] Ark ecmascript::GenerateProgram Line:123 GenerateProgram 125

不好意思,上面发的新页面我再试了也正常,但是加上import 自己写的logger.ets以后会出现问题:

新页面代码:

import Logger from '../util/logger';

@Entry
@Component
struct Index {
  build() {
    Column() {
      Text("Hello World")
    }
  }
}

logger.ets :

export default class Logger {
  static TAG: string = "SmartHome"

  static info(page:string, log: string) {
    console.info(`${Logger.TAG}[${page}]:${log}`)
  }

  static error(page:string, log: string) {
    console.error(`${Logger.TAG}[${page}]:${log}`)
  }

  static debug(page:string, log: string) {
    console.debug(`${Logger.TAG}[${page}]:${log}`)
  }
}

工程API8,手机:

日志放在下一条

主页面:

import featureAbility from '@ohos.ability.featureAbility';
import camera from '@ohos.multimedia.camera';
import mediaLibrary from '@ohos.multimedia.mediaLibrary';
import { Logger } from '../logger'
import router from '@ohos.router';

const TAG = "TVCamera"
const permissions = ["ohos.permission.CAMERA"]

@Entry
@Component
struct Index {
  @State img: string = ''
  private surfaceId : string =''
  mXComponentController: XComponentController = new XComponentController();

  async aboutToAppear() {
    Logger.info(TAG, "aboutToAppear")
    await featureAbility.getWant()
      .then(Want => {
        Logger.info(TAG, 'Want.parameters["positionList"] = ' + JSON.stringify(Want.parameters["positionList"]));
        let positionList = Want.parameters["positionList"]
        if (positionList != undefined) {
          router.push({
            url: "pages/photo",
            params: {
              positionList: positionList
            }
          })
        }
      }).catch(error => {
        console.error('featureAbility.getWant failed. Cause: ' + JSON.stringify(error));
      })
  }

  build() {
    // 创建XComponent
    XComponent({
      id: '',
      type: 'surface',
      libraryname: '',
      controller: this.mXComponentController
    })
      .onLoad(() => {
        this.mXComponentController.setXComponentSurfaceSize({ surfaceWidth: 1920, surfaceHeight: 1080 });
        this.surfaceId = this.mXComponentController.getXComponentSurfaceId();
      })
      .width('100%')
      .height('100%')

    Button("相册")
      .backgroundColor(Color.Blue)
      .margin({ top: "85%", right: "65%"})
      .onClick(() => {
        Logger.info(TAG, "点击相册")
        this.openGallery()

        if (this.img != "") {
          Logger.info(TAG, "select: " + this.img)
          router.push({
            url: "pages/photoDraw",
            params: {
              img: this.img
            }
          })
        }

        router.push({
          url: "pages/photoDraw",
          params: {
            img: this.img
          }
        })

      })
  }

  private async openGallery() {
    await mediaLibrary.getMediaLibrary().startMediaSelect({
      type: 'image',
      count: 1
    }).then(value => {
      Logger.info(TAG, "startMediaSelect value: " + JSON.stringify(value))
      this.img = value[0];
    }).catch(err => {
        Logger.info(TAG, "选择相册图片出错!");
      });
  }
}

跳转新页面:

@Entry
@Component
struct Index {
  build() {
    Column() {
      Text("Hello World")
    }
  }
}

是在添加从相册选择照片跳转的新页面时出错

开发者您好,请提供下示例代码。

标签弄错了,没有参考示例代码,用router跳转的时候出错,

那怎么才能复现了?

姓名

张三

职位

软件工程师

基本信息

  • 所在地:上海市
  • 邮箱:zhangsan@example.com
  • 个人主页:个人博客

项目经历

项目一

  • 负责模块:前端页面开发
  • 项目描述:负责公司内部管理系统前端页面开发工作,使用了HTML、CSS、JavaScript等技术。
  • 项目链接:项目链接

项目二

  • 负责模块:后端接口开发
  • 项目描述:负责开发公司产品后端API接口,使用了Java、Spring Boot等技术。
  • 项目链接:项目链接

针对您提到的HarmonyOS(鸿蒙)Next版本中遇到的cppcrash问题,特别是关于jsi_declarative_engine.cpp中的Ark ecmascript::FixOpcode在Line 305处报告“Is not an Ecma Opcode opcode: 0”的错误,这通常指示在执行JavaScript或ArkScript代码时,遇到了一个不被期望的操作码(opcode)。

此类问题可能由以下几个原因引起:

  • 脚本错误:代码中可能包含了错误的操作码,或者脚本文件在编译或传输过程中被损坏。
  • 引擎Bug:Ark引擎在处理特定脚本时可能存在缺陷。
  • 内存问题:系统内存不足或内存管理错误也可能导致此类崩溃。

解决这类问题的一般步骤包括:

  • 检查脚本:验证引发错误的脚本文件是否完整且无误。
  • 更新系统:确保鸿蒙系统及其组件(如Ark引擎)已更新到最新版本。
  • 重启设备:有时简单的重启可以解决内存管理或临时状态错误。

由于此错误涉及鸿蒙系统的内部机制,且未提供具体代码或上下文,以上仅为一般性分析。若问题持续存在,建议直接联系鸿蒙系统的技术支持团队或访问官方论坛寻求帮助。

如果问题依旧没法解决请联系官网客服,官网地址是 https://www.itying.com/category-93-b0.html

回到顶部