Python是否应该崩溃?(Is Python ever supposed to crash?)
我在Windows上运行独立的Python v3.2.2 / Tkinter程序,不调用任何外部库。 空闲在报告异常方面非常有用,并且程序已被调试到没有报告的地步。 然而,python解释器有时会在非确定性时间崩溃 - 操作会运行良好一段时间,然后突然挂起。 崩溃触发标准的Windows无响应进程对话框询问我是否要将故障转储发送给Microsoft:
"pythonw.exe has encountered a problem and needs to close. We are sorry for the inconvenience."
Python中的崩溃报告说,解释器本身很少崩溃。 我的问题是:无论Python脚本中有多少错误,理论上它有什么办法可以让翻译崩溃? 由于没有任何例外情况被报道,并且随机时间发生崩溃,所以很难缩小范围。 但如果解释者在理论上被认为是防撞的,那么我正在做的事情就是触发一个错误。
代码(滚动条形图演示)发布在wxPython的最佳实时绘图小部件上? 。 它有3个按钮 - 运行,停止,重置。 为了导致崩溃,只需按一下按钮,随便选择一分钟左右。 没有互动,演示将永久运行而不会崩溃。
I am running a stand-alone Python v3.2.2/Tkinter program on Windows, not calling any external libraries. Idle has been very helpful in reporting exceptions, and the program has been debugged to the point where none are reported. However, the python interpreter does occasionally crash at non-deterministic times - operations will run fine for a while and then suddenly hang. The crash triggers the standard Windows non-responding process dialog asking if I want to send a crash dump to Microsoft:
"pythonw.exe has encountered a problem and needs to close. We are sorry for the inconvenience."
Crash reporting in Python says that the interpreter itself rarely crashes. My question is: no matter how many mistakes there are in a python script, is there any way it should in theory be able to crash the interpreter? Since there are no exceptions being reported and the crashes happen at random times, it's hard to narrow down. But if the interpreter is in theory supposed to be crash-proof, then something I'm doing is triggering a bug.
The code (a scrolling strip-chart demonstration) is posted at What is the best real time plotting widget for wxPython?. It has 3 buttons - Run, Stop, Reset. To cause a crash just press the buttons in random order for a minute or so. With no interaction, the demo will run forever without crashing.
原文:https://stackoverflow.com/questions/7627903
最满意答案
使用这样的命令,
SQLITE_MASTER
id name place ================================== 1 office,developer rajkot SELECT * FROM sqlite_master WHERE name like '%Office%'
要么
SELECT * FROM sqlite_master WHERE name like '%Developer%'
要么
SELECT * FROM sqlite_master WHERE name like '%Office,Developer%'
首先,它提供相同的输出
它将提供包含Office,Developer和Office,Developer等名称的记录
Use command like this,
sqlite_master
id name place ================================== 1 office,developer rajkot SELECT * FROM sqlite_master WHERE name like '%Office%'
OR
SELECT * FROM sqlite_master WHERE name like '%Developer%'
OR
SELECT * FROM sqlite_master WHERE name like '%Office,Developer%'
Above all gives same output
it will give the records which contains name like Office,Developer and Office,Developer
相关问答
更多-
这是常见问题: “Core Data vs. SQLite for SQL经验丰富的开发人员” “核心数据vs Sqlite和性能...” “核心数据vs sqlite3” “是否值得使用一个简单的sqlite应用程序的核心数据在iphone上一个表,没有关系或复杂的子表/视图? 总之,Core Data可以大大简化您的代码,特别是对于复杂的对象模型。 您几乎免费获得撤消/重做支持。 它还提供了一些非常显着的性能优势 ,特别是在iPhone上。 即使看起来似乎违反直觉,考虑到您认为框架有多少开销,在大多数情 ...
-
Noob错误,我没有检查数据库的“目标成员”部分中的复选框。 感谢每个人的时间。 Noob error, I hadn't checked the check box in the 'Target Membership' section for the database. Thanks for everyones time.
-
您需要在查询之前打开数据库。 使用sqlite3_open()打开数据库。 在sqlite3_prepare_v2之前有这一行。 if (sqlite3_open([databaseFilePath UTF8String], &database) == SQLITE_OK) 还可以使用sqlite3_finalize(statement); 和sqlite3_close(database); 一旦插入数据。 You need to open your database before querying it ...
-
SQL Query无法在iphone应用程序中获取所需的数据(SQL Query does not fetch the required data in iphone application)[2023-01-27]
据我所知,你在OR周围缺少括号: SELECT * FROM ContentMaster LEFT JOIN Category ON ContentMaster.CategoryID=Category.CategoryID LEFT JOIN Topic ON ContentMaster.TopicID=Topic.TopicID WHERE (ContentMaster.ContentTagText='%@' OR ContentMaster.ContentTitle='%@') AND Categ ... -
使用这样的命令, SQLITE_MASTER id name place ================================== 1 office,developer rajkot SELECT * FROM sqlite_master WHERE name like '%Office%' 要么 SELECT * FROM sqlite_master WHERE name like '%Developer%' 要么 SELECT * FR ...
-
发出在SQLite中获取数据的问题(Issue fetching data in SQLite)[2023-07-08]
要处理此类错误,最好使用内容提供程序,它会处理此类请求。 如果要继续使用sqlite,请为ur sqlite对象创建单例并使调用同步 To handle such errors, its best to use Content Providers,it handles such requests. If you want to continue using sqlite, create a singleton for ur sqlite object and make calls synchronous -
iPhone快速sqlite查询(iPhone quick sqlite query)[2023-02-14]
使用LIMIT和OFFSET获取数据块。 另外,让UITableView驱动提取过程。 当它触发tableView:cellForRowAtIndexPath:并且有问题的行不可用时,从SQLite中获取并缓存包含该行的行块。 您还可以在后台使用后台线程或事件循环来获取块,以便在用户滚动表时最大限度地减少延迟。 Use LIMIT and OFFSET to fetch chunks of the data at a time. Also, let the UITableView drive the fet ... -
iphone中的sqlite数据库(sqlite database in iphone)[2024-02-26]
//Declare Class as Following to store user details UserDetails.h @interface UserDetails : NSObject { NSString *strUserName; NSString *strPassword; } @property (nonatomic,assign) NSString * strUserName; @property (nonatomic,retain) NSString * strP ... -
Sqlite数据无法获取(Sqlite data not getting fetching)[2023-11-01]
while(sqlite3_step(compiledStatement) == SQLITE_ROW) { int i = sqlite3_step(compiledStatement); NSLog(@"%i",i); **//over here i am getting the 101 value in console** And my pointer getting out from here ... -
问题解决了,我错过了重置 sqlite3_reset(searchStmt); Problem solved, i was missing the reset sqlite3_reset(searchStmt);