麦步社区-论坛

标题: 模拟器问题汇总贴 [打印本页]

作者: 陶坤@麦步    时间: 2015-12-30 12:19
标题: 模拟器问题汇总贴
本帖最后由 陶坤@麦步 于 2015-12-30 12:27 编辑

此帖为模拟器汇总贴,麻烦使用模拟器调试程序的童靴跟帖反馈下问题
我们会有同事专门跟进解决的。

提报相关信息:
1. 主机信息
2. 模拟器版本,在“帮助”中
3. 运行时的截图
4. 运行时的日志,拷贝“日志”区
5. 错误提示















作者: dscao    时间: 2015-12-30 14:54
本帖最后由 dscao 于 2015-12-30 16:04 编辑

运行虚拟机内置的样例文件就出错了,64位的无法正常运行。

1. 主机信息:windows 10 64位
2. 模拟器版本:Visual MWatch1.1 Win64
3. 运行时的截图

4. 运行时的日志:
生成资源文件...
-------------read appinfo.json-------------
uuid:4ce3da4df2ec7ae50de0dce55d8a53eb
app_id:512512
name:健康管家
icon:5001
version:133
watchface:2
sysapp:0
res_num:16
res:0, type:0, name:IMAGE_ICON, file:health_logo.bmp
res:1, type:0, name:RES_BITMAP_HEALTH_BG, file:health_bg.bmp
res:2, type:0, name:RES_BITMAP_HEALTH_CALORIE, file:health_calorie.bmp
res:3, type:0, name:RES_BITMAP_HEALTH_INTRO_1, file:health_intro_1.bmp
res:4, type:0, name:RES_BITMAP_HEALTH_INTRO_2, file:health_intro_2.bmp
res:5, type:0, name:RES_BITMAP_HEALTH_INTRO_3, file:health_intro_3.bmp
res:6, type:0, name:RES_BITMAP_HEALTH_INTRO_4, file:health_intro_4.bmp
res:7, type:0, name:RES_BITMAP_HEALTH_INTRO_5, file:health_intro_5.bmp
res:8, type:0, name:RES_BITMAP_HEALTH_PAGE_1, file:health_page_1.bmp
res:9, type:0, name:RES_BITMAP_HEALTH_PAGE_2, file:health_page_2.bmp
res:10, type:0, name:RES_BITMAP_HEALTH_PAGE_3, file:health_page_3.bmp
res:11, type:0, name:RES_BITMAP_HEALTH_PAGE_4, file:health_page_4.bmp
res:12, type:0, name:RES_BITMAP_HEALTH_STAND, file:health_stand.bmp
res:13, type:0, name:RES_BITMAP_HEALTH_SPORT, file:health_sport.bmp
res:14, type:0, name:RES_BITMAP_HEALTH_STAND_ALARM, file:health_stand_alarm.bmp
res:15, type:0, name:RES_BITMAP_HEALTH_CUP, file:health_cup.bmp

-----------------begin create res.h-------------
-----------------create res.h ok-------------
-----------------begin create res_file-------------
type:0, res_key:5001, offset:261, res_size:84, width:24, height:28
type:0, res_key:5002, offset:345, res_size:2048, width:128, height:128
type:0, res_key:5003, offset:2393, res_size:7, width:7, height:7
type:0, res_key:5004, offset:2400, res_size:2048, width:128, height:128
type:0, res_key:5005, offset:4448, res_size:2048, width:128, height:128
type:0, res_key:5006, offset:6496, res_size:2048, width:128, height:128
type:0, res_key:5007, offset:8544, res_size:2048, width:128, height:128
type:0, res_key:5008, offset:10592, res_size:2048, width:128, height:128
type:0, res_key:5009, offset:12640, res_size:30, width:36, height:6
type:0, res_key:5010, offset:12670, res_size:30, width:36, height:6
type:0, res_key:5011, offset:12700, res_size:30, width:36, height:6
type:0, res_key:5012, offset:12730, res_size:30, width:36, height:6
type:0, res_key:5013, offset:12760, res_size:7, width:7, height:7
type:0, res_key:5014, offset:12767, res_size:7, width:7, height:7
type:0, res_key:5015, offset:12774, res_size:512, width:64, height:64
type:0, res_key:5016, offset:13286, res_size:512, width:64, height:64
-------------create res_file ok---------------
---------------prepare pack head----------
---------------read res_file----------
---------------read code----------
---------------write pack head----------
---------------write res ----------
---------------write code ----------
---------------pack file:健康管家 ok ----------
找不到 D:\MyDrivers\Visual MWatch_Win64\tmp.log
找不到 D:\MyDrivers\Visual MWatch_Win64\OUT.maibu
正在编译...
watchapp_health_manager.c: In function 'health_create_state_details':
watchapp_health_manager.c:440:18: warning: initialization makes pointer from integer without a cast [enabled by default]
watchapp_health_manager.c: In function 'health_timer_callback':
watchapp_health_manager.c:1179:23: warning: initialization makes pointer from integer without a cast [enabled by default]
正在打包...
-------------read appinfo.json-------------
uuid:4ce3da4df2ec7ae50de0dce55d8a53eb
app_id:512512
name:健康管家
icon:5001
version:133
watchface:2
sysapp:0
res_num:16
res:0, type:0, name:IMAGE_ICON, file:health_logo.bmp
res:1, type:0, name:RES_BITMAP_HEALTH_BG, file:health_bg.bmp
res:2, type:0, name:RES_BITMAP_HEALTH_CALORIE, file:health_calorie.bmp
res:3, type:0, name:RES_BITMAP_HEALTH_INTRO_1, file:health_intro_1.bmp
res:4, type:0, name:RES_BITMAP_HEALTH_INTRO_2, file:health_intro_2.bmp
res:5, type:0, name:RES_BITMAP_HEALTH_INTRO_3, file:health_intro_3.bmp
res:6, type:0, name:RES_BITMAP_HEALTH_INTRO_4, file:health_intro_4.bmp
res:7, type:0, name:RES_BITMAP_HEALTH_INTRO_5, file:health_intro_5.bmp
res:8, type:0, name:RES_BITMAP_HEALTH_PAGE_1, file:health_page_1.bmp
res:9, type:0, name:RES_BITMAP_HEALTH_PAGE_2, file:health_page_2.bmp
res:10, type:0, name:RES_BITMAP_HEALTH_PAGE_3, file:health_page_3.bmp
res:11, type:0, name:RES_BITMAP_HEALTH_PAGE_4, file:health_page_4.bmp
res:12, type:0, name:RES_BITMAP_HEALTH_STAND, file:health_stand.bmp
res:13, type:0, name:RES_BITMAP_HEALTH_SPORT, file:health_sport.bmp
res:14, type:0, name:RES_BITMAP_HEALTH_STAND_ALARM, file:health_stand_alarm.bmp
res:15, type:0, name:RES_BITMAP_HEALTH_CUP, file:health_cup.bmp

-----------------begin create res.h-------------
-----------------create res.h ok-------------
-----------------begin create res_file-------------
type:0, res_key:5001, offset:261, res_size:84, width:24, height:28
type:0, res_key:5002, offset:345, res_size:2048, width:128, height:128
type:0, res_key:5003, offset:2393, res_size:7, width:7, height:7
type:0, res_key:5004, offset:2400, res_size:2048, width:128, height:128
type:0, res_key:5005, offset:4448, res_size:2048, width:128, height:128
type:0, res_key:5006, offset:6496, res_size:2048, width:128, height:128
type:0, res_key:5007, offset:8544, res_size:2048, width:128, height:128
type:0, res_key:5008, offset:10592, res_size:2048, width:128, height:128
type:0, res_key:5009, offset:12640, res_size:30, width:36, height:6
type:0, res_key:5010, offset:12670, res_size:30, width:36, height:6
type:0, res_key:5011, offset:12700, res_size:30, width:36, height:6
type:0, res_key:5012, offset:12730, res_size:30, width:36, height:6
type:0, res_key:5013, offset:12760, res_size:7, width:7, height:7
type:0, res_key:5014, offset:12767, res_size:7, width:7, height:7
type:0, res_key:5015, offset:12774, res_size:512, width:64, height:64
type:0, res_key:5016, offset:13286, res_size:512, width:64, height:64
-------------create res_file ok---------------
---------------prepare pack head----------
---------------read res_file----------
---------------read code----------
---------------write pack head----------
---------------write res ----------
---------------write code ----------
---------------pack file:健康管家 ok ----------
找不到 D:\MyDrivers\Visual MWatch_Win64\user.exe
生成资源文件...
-------------read appinfo.json-------------
uuid:4ce3da4df2ec7ae50de0dce55d8a53eb
app_id:512512
name:健康管家
icon:5001
version:133
watchface:2
sysapp:0
res_num:16
res:0, type:0, name:IMAGE_ICON, file:health_logo.bmp
res:1, type:0, name:RES_BITMAP_HEALTH_BG, file:health_bg.bmp
res:2, type:0, name:RES_BITMAP_HEALTH_CALORIE, file:health_calorie.bmp
res:3, type:0, name:RES_BITMAP_HEALTH_INTRO_1, file:health_intro_1.bmp
res:4, type:0, name:RES_BITMAP_HEALTH_INTRO_2, file:health_intro_2.bmp
res:5, type:0, name:RES_BITMAP_HEALTH_INTRO_3, file:health_intro_3.bmp
res:6, type:0, name:RES_BITMAP_HEALTH_INTRO_4, file:health_intro_4.bmp
res:7, type:0, name:RES_BITMAP_HEALTH_INTRO_5, file:health_intro_5.bmp
res:8, type:0, name:RES_BITMAP_HEALTH_PAGE_1, file:health_page_1.bmp
res:9, type:0, name:RES_BITMAP_HEALTH_PAGE_2, file:health_page_2.bmp
res:10, type:0, name:RES_BITMAP_HEALTH_PAGE_3, file:health_page_3.bmp
res:11, type:0, name:RES_BITMAP_HEALTH_PAGE_4, file:health_page_4.bmp
res:12, type:0, name:RES_BITMAP_HEALTH_STAND, file:health_stand.bmp
res:13, type:0, name:RES_BITMAP_HEALTH_SPORT, file:health_sport.bmp
res:14, type:0, name:RES_BITMAP_HEALTH_STAND_ALARM, file:health_stand_alarm.bmp
res:15, type:0, name:RES_BITMAP_HEALTH_CUP, file:health_cup.bmp

-----------------begin create res.h-------------
-----------------create res.h ok-------------
-----------------begin create res_file-------------
type:0, res_key:5001, offset:261, res_size:84, width:24, height:28
type:0, res_key:5002, offset:345, res_size:2048, width:128, height:128
type:0, res_key:5003, offset:2393, res_size:7, width:7, height:7
type:0, res_key:5004, offset:2400, res_size:2048, width:128, height:128
type:0, res_key:5005, offset:4448, res_size:2048, width:128, height:128
type:0, res_key:5006, offset:6496, res_size:2048, width:128, height:128
type:0, res_key:5007, offset:8544, res_size:2048, width:128, height:128
type:0, res_key:5008, offset:10592, res_size:2048, width:128, height:128
type:0, res_key:5009, offset:12640, res_size:30, width:36, height:6
type:0, res_key:5010, offset:12670, res_size:30, width:36, height:6
type:0, res_key:5011, offset:12700, res_size:30, width:36, height:6
type:0, res_key:5012, offset:12730, res_size:30, width:36, height:6
type:0, res_key:5013, offset:12760, res_size:7, width:7, height:7
type:0, res_key:5014, offset:12767, res_size:7, width:7, height:7
type:0, res_key:5015, offset:12774, res_size:512, width:64, height:64
type:0, res_key:5016, offset:13286, res_size:512, width:64, height:64
-------------create res_file ok---------------
---------------prepare pack head----------
---------------read res_file----------
---------------read code----------
---------------write pack head----------
---------------write res ----------
---------------write code ----------
---------------pack file:健康管家 ok ----------
找不到 D:\MyDrivers\Visual MWatch_Win64\tmp.log
找不到 D:\MyDrivers\Visual MWatch_Win64\OUT.maibu
正在编译...
watchapp_health_manager.c: In function 'health_create_state_details':
watchapp_health_manager.c:440:18: warning: initialization makes pointer from integer without a cast [enabled by default]
watchapp_health_manager.c: In function 'health_timer_callback':
watchapp_health_manager.c:1179:23: warning: initialization makes pointer from integer without a cast [enabled by default]
正在打包...
-------------read appinfo.json-------------
uuid:4ce3da4df2ec7ae50de0dce55d8a53eb
app_id:512512
name:健康管家
icon:5001
version:133
watchface:2
sysapp:0
res_num:16
res:0, type:0, name:IMAGE_ICON, file:health_logo.bmp
res:1, type:0, name:RES_BITMAP_HEALTH_BG, file:health_bg.bmp
res:2, type:0, name:RES_BITMAP_HEALTH_CALORIE, file:health_calorie.bmp
res:3, type:0, name:RES_BITMAP_HEALTH_INTRO_1, file:health_intro_1.bmp
res:4, type:0, name:RES_BITMAP_HEALTH_INTRO_2, file:health_intro_2.bmp
res:5, type:0, name:RES_BITMAP_HEALTH_INTRO_3, file:health_intro_3.bmp
res:6, type:0, name:RES_BITMAP_HEALTH_INTRO_4, file:health_intro_4.bmp
res:7, type:0, name:RES_BITMAP_HEALTH_INTRO_5, file:health_intro_5.bmp
res:8, type:0, name:RES_BITMAP_HEALTH_PAGE_1, file:health_page_1.bmp
res:9, type:0, name:RES_BITMAP_HEALTH_PAGE_2, file:health_page_2.bmp
res:10, type:0, name:RES_BITMAP_HEALTH_PAGE_3, file:health_page_3.bmp
res:11, type:0, name:RES_BITMAP_HEALTH_PAGE_4, file:health_page_4.bmp
res:12, type:0, name:RES_BITMAP_HEALTH_STAND, file:health_stand.bmp
res:13, type:0, name:RES_BITMAP_HEALTH_SPORT, file:health_sport.bmp
res:14, type:0, name:RES_BITMAP_HEALTH_STAND_ALARM, file:health_stand_alarm.bmp
res:15, type:0, name:RES_BITMAP_HEALTH_CUP, file:health_cup.bmp

-----------------begin create res.h-------------
-----------------create res.h ok-------------
-----------------begin create res_file-------------
type:0, res_key:5001, offset:261, res_size:84, width:24, height:28
type:0, res_key:5002, offset:345, res_size:2048, width:128, height:128
type:0, res_key:5003, offset:2393, res_size:7, width:7, height:7
type:0, res_key:5004, offset:2400, res_size:2048, width:128, height:128
type:0, res_key:5005, offset:4448, res_size:2048, width:128, height:128
type:0, res_key:5006, offset:6496, res_size:2048, width:128, height:128
type:0, res_key:5007, offset:8544, res_size:2048, width:128, height:128
type:0, res_key:5008, offset:10592, res_size:2048, width:128, height:128
type:0, res_key:5009, offset:12640, res_size:30, width:36, height:6
type:0, res_key:5010, offset:12670, res_size:30, width:36, height:6
type:0, res_key:5011, offset:12700, res_size:30, width:36, height:6
type:0, res_key:5012, offset:12730, res_size:30, width:36, height:6
type:0, res_key:5013, offset:12760, res_size:7, width:7, height:7
type:0, res_key:5014, offset:12767, res_size:7, width:7, height:7
type:0, res_key:5015, offset:12774, res_size:512, width:64, height:64
type:0, res_key:5016, offset:13286, res_size:512, width:64, height:64
-------------create res_file ok---------------
---------------prepare pack head----------
---------------read res_file----------
---------------read code----------
---------------write pack head----------
---------------write res ----------
---------------write code ----------
---------------pack file:健康管家 ok ----------


正在编译...

.\mbcc\bin\gcc.exe
------------------------
编译完成
'mbcc\bin\mw.exe' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

5. 错误提示
编译完成
'mbcc\bin\mw.exe' 不是内部或外部命令,也不是可运行的程序
或批处理文件。


又试了一下32位的,结果也一样的情况。
环境变量什么的都按文档设置过的。


作者: dscao    时间: 2015-12-30 16:25
本帖最后由 dscao 于 2015-12-30 16:40 编辑

winxp 32位系统中运行32位的模拟机就正常了。


原例子正常了,但执行修改后的代码又出现上一帖一样的情况了.看来与代码有关.

作者: mark    时间: 2015-12-30 18:47
dscao 发表于 2015-12-30 14:54
运行虚拟机内置的样例文件就出错了,64位的无法正常运行。

1. 主机信息:windows 10 64位

在32位的机子上,把目录放在一个不要包含空格的路径,尝试下
作者: mark    时间: 2015-12-30 18:48
dscao 发表于 2015-12-30 16:25
winxp 32位系统中运行32位的模拟机就正常了。

试下使用其他的编辑器,编辑好后,再拖到编辑区进行模拟
作者: dscao    时间: 2015-12-31 02:21
本帖最后由 dscao 于 2015-12-31 02:27 编辑
mark 发表于 2015-12-30 18:48
试下使用其他的编辑器,编辑好后,再拖到编辑区进行模拟

64位win10试了几台电脑都不行,32位XP系统可以模拟,但中文的地方就显示不了。安装到手机里又正常。好难调试,又一个晚上,暂时不研究了。等以后新的SDK,开放蓝牙判断连接和有天气源码参考时再折腾了。







手表想要的效果图:


目前实现了的(蓝牙还不能判断状态):




作者: 陶坤@麦步    时间: 2015-12-31 09:22
dscao 发表于 2015-12-31 02:21
64位win10试了几台电脑都不行,32位XP系统可以模拟,但中文的地方就显示不了。安装到手机里又正常。好难调 ...

已经很不错了

等着我们更新SDK哈
作者: dscao    时间: 2015-12-31 23:27
本帖最后由 dscao 于 2016-1-1 11:58 编辑

今天重新下载了模拟机,开始可以模拟了。后来把背景图换成几何图形,结果这段过不去:

  1. Geometry *geometry[6]; /*创建存储几何图形的指针数组, 几何图形数量不能超过指针数组大小*/
  2.         uint8_t numgeo = 0;
  3.         LayerGeometry layer_geometry;        /*几何图层结构体*/
  4.         memset(geometry, 0, sizeof(geometry));
  5.         /*直线*/
  6.         Line l = {{2,50}, {124,50}};        //直线的起始点坐标
  7.         Geometry lg = {GeometryTypeLine, FillOutline, GColorBlack, (void*)&l};
  8.         geometry[numgeo++] = ≶        //存入指针数组中
  9.         /*多边形*/
  10.         GPoint ppoint[4] = {{0,0}, {0,128}, {128,0}, {128,128}};//多边形各个点坐标
  11.         Polygon p = {4, ppoint};        
  12.         Geometry pg = {GeometryTypePolygon,  FillArea, GColorBlack,(void*)&p};
  13.         geometry[numgeo++] = &pg;
  14.         /*初始化几何结构体*/
  15.         layer_geometry.num = numgeo;
  16.         layer_geometry.p_g = geometry;

  17.         /*创建几何图层*/
  18.         P_Layer         layer = app_layer_create_geometry(&layer_geometry);
  19.         app_window_add_layer(p_window, layer);
复制代码



如下提示:
正在编译...

D:\simulator_win64\watchface_hm_multi.c: In function 'init_mwd_window':
D:\simulator_win64\watchface_hm_multi.c:309:2: error: unknown type name 'Polygon'
  Polygon p = {4, ppoint};  
  ^
D:\simulator_win64\watchface_hm_multi.c:309:2: warning: excess elements in scalar initializer
D:\simulator_win64\watchface_hm_multi.c:309:2: warning: (near initialization for 'p')

SDK编译正常:
多显电子表.MWP.rar (9.91 KB, 下载次数: 579)

多显电子表.MAI.rar (9.91 KB, 下载次数: 569)

去掉后面的扩展名.rar

作者: mark    时间: 2016-1-4 18:23
dscao 发表于 2015-12-31 02:21
64位win10试了几台电脑都不行,32位XP系统可以模拟,但中文的地方就显示不了。安装到手机里又正常。好难调 ...

模拟器中文不能显示,需要重新下载更新模拟器安装包,之前的安装包缺少文件。
作者: mark    时间: 2016-1-4 18:24
dscao 发表于 2015-12-31 23:27
今天重新下载了模拟机,开始可以模拟了。后来把背景图换成几何图形,结果这段过不去:

模拟器暂时不支持几何图层。后面的版本会支持的。
作者: diablozhu    时间: 2016-1-5 15:35
dscao 发表于 2015-12-31 02:21
64位win10试了几台电脑都不行,32位XP系统可以模拟,但中文的地方就显示不了。安装到手机里又正常。好难调 ...

蓝牙的枚举有问题
我是看了sdk以后才写对了
作者: dscao    时间: 2016-1-6 20:17
本帖最后由 dscao 于 2016-1-7 00:02 编辑
diablozhu 发表于 2016-1-5 15:35
蓝牙的枚举有问题
我是看了sdk以后才写对了

多谢提醒。
好像还是搞不定蓝牙判断这块代码!

enum AppCommStatus maibu_get_ble_status ()
这个不知道怎么用,总是不行。

int8_t maibu_get_ble_rssi (int8_t *rssi)
这个能编译,安装到手表就自动卸载掉了。

去看看你开源的代码
作者: maibuc    时间: 2016-1-8 09:54
您好 请问这个模拟器在哪里下载?是方便用于开发maibu的APP吗?
作者: 陶坤@麦步    时间: 2016-1-8 10:30
maibuc 发表于 2016-1-8 09:54
您好 请问这个模拟器在哪里下载?是方便用于开发maibu的APP吗?

官方的开发者平台有下载的




欢迎光临 麦步社区-论坛 (http://203.195.186.190/) Powered by Discuz! X3.2