Error when retrying frame.load_file(file_name) OSError: exception: access violation reading 0x00000000
AlexandrDragunkin opened this issue · 1 comments
AlexandrDragunkin commented
Hello!
How to call frame.load_file several times within one module?
I'm getting an error. Help!
calculator is an example taken here https://github.com/c-smile/sciter-js-sdk/tree/main/samples/calc
import sys, os
# For PYTHON 3.7 I had to do this. Otherwise, ctypes.find_library load 4.x version by default from system32
os.environ["PATH"] = os.pathsep.join((os.pathsep.join(sys.path),
os.environ["PATH"])
)
import sciter
import pathlib
print(f'SciterVersion={sciter.version()}')
class Frame(sciter.Window):
def __init__(self,link = None,file_name = None):
super().__init__(ismain=True, uni_theme=True)
self.link = link
self.file_name = file_name
pass
def main():
file_name = os.path.join(pathlib.Path(__file__).resolve().parent,
'calc', 'main.htm')
print(f'FullPath load_file={file_name}')
#frame = sciter.Window(ismain=True, ispopup = True, debug = False)
frame = Frame()
frame.load_file(file_name)
frame.expand()
frame.run_app()
if __name__ == '__main__':
main()
main() # Error when calling again builtins.OSError: exception: access violation reading 0x00000000
AlexandrDragunkin commented
The problem is resolved in version sciter.dll 5.0.3.10