sciter-sdk/pysciter

import pywinauto generates DOM error for sciter

martinlombana opened this issue · 0 comments

Install pywinauto

Import it in code (even if there is no use for now). Just the import generates this error in sciter (not in pywinauto) When we close the frame.

Exception ignored in: <function Element.__del__ at 0x034CBD60>
Traceback (most recent call last):
  File "D:\Sync\Martin\inProgress\_virtualenvs\metauto\lib\site-packages\sciter\dom.py", line 328, in __del__
  File "D:\Sync\Martin\inProgress\_virtualenvs\metauto\lib\site-packages\sciter\dom.py", line 339, in _unuse
OSError: exception: access violation reading 0x6EB2C7B0

run this app to test:

import sciter
from sciter import SCITER_RT_OPTIONS
import pywinauto


class Frame(sciter.Window):
	def __init__(self):
		super().__init__(ismain=True, uni_theme=True, debug=False, size=(500, 720))
		self.set_dispatch_options(enable=True, require_attribute=False)
		pass


if __name__ == "__main__":
	print("Sciter version:", sciter.version(as_str=True))
	sciter.set_option(SCITER_RT_OPTIONS.SCITER_SET_DEBUG_MODE, True)
	frame = Frame()
	frame.setup_debug()
	frame.load_html(b"<html><body><p name='IS_0'>I want to be substituted</p></body></html>")
	frame.run_app()

To be noted that it causes the same problem even if I use the import in another module, that I then import to the main script.