我是Android开发的新手,我正在尝试创建一个小游戏。我的CountDownTimer
的{{1}}子类中的构造函数创建了我的第一个GameView
。
为了传递下一个级别,我应该做的是调用SurfaceView
的{{1}},重新调整下一级别的所有元素并再次创建新的cancel()
。我在实现CountDownTimer class
的{{1}}类CountDownTimer
中执行此操作。
我一直在线阅读,但大多数解决方案都使用run()
,正如我所说,我在GameView
的子类中工作。
这是我收到的错误
Runnable
提前感谢您的时间
答案 0 :(得分:0)
感谢@Roman我设法解决了我的问题,答案在这里是为了更详细的解释---> runOnUiThread inside a View
我做过的事情我刚刚使用18:43:06 UTC - mysqld got exception 0xc0000005 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.
key_buffer_size=2147483648
read_buffer_size=16777216
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 2852645 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x1c6215421c0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
7ff64e61d542 mysqld.exe!Item_subselect::exec()[item_subselect.cc:575]
7ff64e6231b2 mysqld.exe!Item_singlerow_subselect::val_decimal()[item_subselect.cc:1259]
7ff64e490f53 mysqld.exe!Item_func_ifnull::decimal_op()[item_cmpfunc.cc:3382]
7ff64e51bf4b mysqld.exe!Item_func_numhybrid::val_decimal()[item_func.cc:1453]
7ff64e511586 mysqld.exe!Item_func_mul::decimal_op()[item_func.cc:2067]
7ff64e51bf4b mysqld.exe!Item_func_numhybrid::val_decimal()[item_func.cc:1453]
7ff64e4e46ac mysqld.exe!Item_direct_ref::val_decimal()[item.cc:8598]
7ff64e48ef18 mysqld.exe!Arg_comparator::compare_decimal()[item_cmpfunc.cc:1763]
7ff64e49d4b1 mysqld.exe!Item_func_gt::val_int()[item_cmpfunc.cc:2608]
7ff64e4e3a41 mysqld.exe!Item::val_bool()[item.cc:211]
7ff64e49cb9c mysqld.exe!Item_cond_and::val_int()[item_cmpfunc.cc:6102]
7ff64ea3682e mysqld.exe!evaluate_join_record()[sql_executor.cc:1483]
7ff64ea3a437 mysqld.exe!sub_select()[sql_executor.cc:1288]
7ff64ea369b5 mysqld.exe!evaluate_join_record()[sql_executor.cc:1634]
7ff64ea3a437 mysqld.exe!sub_select()[sql_executor.cc:1288]
7ff64ea356c1 mysqld.exe!do_select()[sql_executor.cc:941]
7ff64ea3703b mysqld.exe!JOIN::exec()[sql_executor.cc:199]
7ff64e608571 mysqld.exe!handle_query()[sql_select.cc:185]
7ff64e4c27f6 mysqld.exe!execute_sqlcom_select()[sql_parse.cc:4947]
7ff64e4c46de mysqld.exe!mysql_execute_command()[sql_parse.cc:2597]
7ff64e4c7faa mysqld.exe!mysql_parse()[sql_parse.cc:5363]
7ff64e4c12c9 mysqld.exe!dispatch_command()[sql_parse.cc:1287]
7ff64e4c226a mysqld.exe!do_command()[sql_parse.cc:854]
7ff64e469634 mysqld.exe!handle_connection()[connection_handler_per_thread.cc:295]
7ff64ee7ad82 mysqld.exe!pfs_spawn_thread()[pfs.cc:2195]
7ff64eba46fb mysqld.exe!win_thread_start()[my_thread.c:38]
7ff64ef3b39f mysqld.exe!_callthreadstartex()[threadex.c:376]
7ff64ef3b5ea mysqld.exe!_threadstartex()[threadex.c:354]
7ff887d48364 KERNEL32.DLL!BaseThreadInitThunk()
7ff888b65e91 ntdll.dll!RtlUserThreadStart()
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (1c6215902a0): (18:43:06 UTC - mysqld got exception 0xc0000005 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.
key_buffer_size=2147483648
read_buffer_size=16777216
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 2852645 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x1c6215421c0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
7ff64e61d542 mysqld.exe!Item_subselect::exec()[item_subselect.cc:575]
7ff64e6231b2 mysqld.exe!Item_singlerow_subselect::val_decimal()[item_subselect.cc:1259]
7ff64e490f53 mysqld.exe!Item_func_ifnull::decimal_op()[item_cmpfunc.cc:3382]
7ff64e51bf4b mysqld.exe!Item_func_numhybrid::val_decimal()[item_func.cc:1453]
7ff64e511586 mysqld.exe!Item_func_mul::decimal_op()[item_func.cc:2067]
7ff64e51bf4b mysqld.exe!Item_func_numhybrid::val_decimal()[item_func.cc:1453]
7ff64e4e46ac mysqld.exe!Item_direct_ref::val_decimal()[item.cc:8598]
7ff64e48ef18 mysqld.exe!Arg_comparator::compare_decimal()[item_cmpfunc.cc:1763]
7ff64e49d4b1 mysqld.exe!Item_func_gt::val_int()[item_cmpfunc.cc:2608]
7ff64e4e3a41 mysqld.exe!Item::val_bool()[item.cc:211]
7ff64e49cb9c mysqld.exe!Item_cond_and::val_int()[item_cmpfunc.cc:6102]
7ff64ea3682e mysqld.exe!evaluate_join_record()[sql_executor.cc:1483]
7ff64ea3a437 mysqld.exe!sub_select()[sql_executor.cc:1288]
7ff64ea369b5 mysqld.exe!evaluate_join_record()[sql_executor.cc:1634]
7ff64ea3a437 mysqld.exe!sub_select()[sql_executor.cc:1288]
7ff64ea356c1 mysqld.exe!do_select()[sql_executor.cc:941]
7ff64ea3703b mysqld.exe!JOIN::exec()[sql_executor.cc:199]
7ff64e608571 mysqld.exe!handle_query()[sql_select.cc:185]
7ff64e4c27f6 mysqld.exe!execute_sqlcom_select()[sql_parse.cc:4947]
7ff64e4c46de mysqld.exe!mysql_execute_command()[sql_parse.cc:2597]
7ff64e4c7faa mysqld.exe!mysql_parse()[sql_parse.cc:5363]
7ff64e4c12c9 mysqld.exe!dispatch_command()[sql_parse.cc:1287]
7ff64e4c226a mysqld.exe!do_command()[sql_parse.cc:854]
7ff64e469634 mysqld.exe!handle_connection()[connection_handler_per_thread.cc:295]
7ff64ee7ad82 mysqld.exe!pfs_spawn_thread()[pfs.cc:2195]
7ff64eba46fb mysqld.exe!win_thread_start()[my_thread.c:38]
7ff64ef3b39f mysqld.exe!_callthreadstartex()[threadex.c:376]
7ff64ef3b5ea mysqld.exe!_threadstartex()[threadex.c:354]
7ff887d48364 KERNEL32.DLL!BaseThreadInitThunk()
7ff888b65e91 ntdll.dll!RtlUserThreadStart()
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (1c6215902a0): SELECT tmp.filter_group_id, ... the query above)
Connection ID (thread ID): 10
Status: NOT_KILLED
在Thread
内创建了一个不同的run()
。我再说一遍,我在post()
的子类中。
SurfaceView
希望将来对其他人有所帮助!