Bug #64777 Application has generated an exception that could not be handled
Submitted: 27 Mar 2012 11:49 Modified: 23 Jul 2012 23:40
Reporter: Patrick Mac Gohan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.2.38 CE R 8753 OS:Windows
Assigned to: CPU Architecture:Any
Tags: crash, plugins, python

[27 Mar 2012 11:49] Patrick Mac Gohan
Description:
I'm writing a plugin for workbench in python.

For this, i try to access to methods with getattr(object, methodname).
When I do this on a grt.classes.db_query_EditableResultset object, workbench crashes with the message :
Application has generated an exception that could not be handled
Process ID=0xd48 (3400) Thread ID=0xac4 (2756)

How to repeat:
This plugin

@ModuleInfo.plugin("wb.sqlide.bugdemo", caption= "crashes workbench", input= [wb.wbinputs.currentQueryBuffer()], pluginMenu= "SQL/Utilities")
@ModuleInfo.export(grt.INT, grt.classes.db_query_QueryBuffer)
def gen_API_doc(qbuffer):
    o = grt.classes.db_query_EditableResultset()
    a = getattr(o, "currentRow")

Should do it
[27 Mar 2012 16:25] Alfredo Kojima
Was able to verify using the GRT shell.
[28 Mar 2012 7:22] Patrick Mac Gohan
This can be done with other objects. I tried with :
db_query_Editor, db_query_QueryBuffer, db_query_Resultset...
Thanks.
[23 Jul 2012 23:40] Philip Olson
This has been fixed as of the soon-to-be-released Workbench 5.2.41, and 
here's the changelog entry:

Passing a "grt.classes.db_query_EditableResultset"
object to "getattr()" could cause a crash.