zlgopen / awtk-linux-fb

awtk port for linux framebuffer
110 stars 49 forks source link

combo_box做多语言,多语言切换会死机 #38

Closed WeSrc-Yin closed 4 years ago

WeSrc-Yin commented 4 years ago

如题 我的xml文件如附件,当切换语言时会死机,在pc上运行不会,在arm平台上就会死机,死机信息如附件。初步看是edit text切换语言时导致死机。

WeSrc-Yin commented 4 years ago

附件怎么都上传不了,我贴一下我的xml:

`

`

WeSrc-Yin commented 4 years ago

语言切换代码: static ret_t change_locale(void ctx, event_t e) { char country[3]; char language[3]; const char str = (const char)ctx; widget_t* widget = WIDGET(e->target); log_debug("dialog_user_set.c,#%s,lan=%s,btnNmae=%s,\n",func,str,widget->name); if (widget_get_value(widget)) { strncpy(language, str, 2); strncpy(country, str + 3, 2); locale_info_change(locale_info(), language, country); }

return RET_OK;

}

... if (strstr(name, "lang_ch")) { widget_on(widget, EVT_VALUE_CHANGED, change_locale, (void)"zh_CN"); } else if (strstr(name, "lang_en")) { widget_on(widget, EVT_VALUE_CHANGED, change_locale, (void)"en_US"); } ...

WeSrc-Yin commented 4 years ago

这是点击语言切换按钮后的dump打印信息: dialog_user_set.c,#change_locale,lan=en_US,btnNmae=lang_en, unload image bottomBtnBar unload image btn_dvr_n unload image btn_aps_n unload image btn_front_f unload image btn_rear_n unload image btn_left_n unload image btn_right_n unload image btn_3D_n unload image btn_set_n unload image radio_checked unload image radio_unchecked unload image arrow_down_n unload image cursor Obtained 55 stack frames.nm /usr/lib/libeventhubproxy.so(+0x17e4) [0xb6fb67e4] /lib/libc.so.6(+0x250b0) [0xb6cde0b0] /app/appUI() [0x6038e] /app/appUI() [0x60db4] /app/appUI() [0x60dea] /app/appUI() [0x61b96] /app/appUI() [0x62afa] /app/appUI() [0x48284] /app/appUI() [0x51788] /app/appUI() [0x52448] /app/appUI() [0x3d090] /app/appUI() [0x3d5a6] /app/appUI() [0x59a72] /app/appUI() [0x59fb0] /app/appUI() [0x59fd2] /app/appUI() [0x59fd2] /app/appUI() [0x5d24e] /app/appUI() [0x810a6] /app/appUI() [0x4ef82] /app/appUI() [0x17298] /app/appUI() [0x810a6] /app/appUI() [0x58906] /app/appUI() [0x3998c] /app/appUI() [0x399e0] /app/appUI() [0x39b12] /app/appUI() [0x588f0] /app/appUI() [0x39b52] /app/appUI() [0x588f0] /app/appUI() [0x59372] /app/appUI() [0x5aebe] /app/appUI() [0x5ae8a] /app/appUI() [0x5ae8a] /app/appUI() [0x5ae8a] /app/appUI() [0x70a56] /app/appUI() [0x6bca6] /app/appUI() [0x6d2ce] /app/appUI() [0x6d33e] /app/appUI() [0x4b630] /app/appUI() [0x810a6] /app/appUI() [0x58906] /app/appUI() [0x3976e] /app/appUI() [0x588f0] /app/appUI() [0x59372] /app/appUI() [0x5aebe] /app/appUI() [0x5ae8a] /app/appUI() [0x5ae8a] /app/appUI() [0x5ae8a] /app/appUI() [0x5ae8a] /app/appUI() [0x70a56] /app/appUI() [0x6bca6] /app/appUI() [0x6d2ce] /app/appUI() [0x6d33e] /app/appUI() [0x25514] /app/appUI() [0x162a2] /lib/libc.so.6(__libc_start_main+0x9d) [0xb6ccf7b2] tk_thread_destroy:362 thread != NULL fb_close fb_close ok on_app_exit

WeSrc-Yin commented 4 years ago

dumpmap.tar.gz

WeSrc-Yin commented 4 years ago

不太看得懂反汇编,但根据上面死机的地址,其中有一个地址是3d090,对应到dumpmap里面是在edit_set_text函数里面,所以我估计是combo_box导致死机的,然后我在xml里面把combo_box删掉,再切换语言,就不会死机了。ZLG有没有很懂反汇编的,看看,能不能定位到具体的死因。

WeSrc-Yin commented 4 years ago

test.tar.gz