-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tkinter GUI crash on implementatin of HTMLFrame (Win10, python 3.8, PyCharm 2021.1.3) #19
Comments
Hello, Thank you for letting me know about this. Perhaps try running your code from Python (and not PyCharm), or running the Tkinterweb Demo (ie. |
Thank you for the fast reply. So I tried a couple of variations and apparently tkinterweb either doesn't play well with multiple instances of calls to HtmlFrame or if I call other html display type frames (here I had to implement HTMLScrolledText from the tkhtmlview package for simple multiple html interpretations/no<table> tags). However, I have the same issues if I ONLY use tkinterweb HTMLLabel or HTMlFrame for multiple "tabs".
I did not try this in just python (outside of PyCharm), since I DID try the tkinter.Demo() with no issues (in PyCharm) and I was able to run a single tab (if you comment out everything BUT the QAPTab information) in Pycharm, where it is also stable. So it looks like tkinterweb is making more calls to the tcl86t.dll than Win10 thinks is required/good? and it forces the exit out of the program with exit code: -1073741819 (0xC0000005)
This correlates to Win10 event viewer giving this error:Faulting application name: python.exe, version: 3.8.1150.1013, time stamp: 0x5dfab277
Faulting module name: tcl86t.dll, version: 8.6.2.9, time stamp: 0x5c12d592
Exception code: 0xc0000005
Fault offset: 0x00000000000fc633
Faulting process id: 0x4250
Faulting application start time: 0x01d77a6300d17cd1
Faulting application path: C:\Users\irutel\AppData\Local\Programs\Python\Python38\python.exe
Faulting module path: C:\Users\irutel\AppData\Local\Programs\Python\Python38\DLLs\tcl86t.dll
Report Id: 72ba61cf-0246-4888-9eca-1e16652396a5
Faulting package full name:
If you look at the path, Win10 sees this as a Python call issue and not a PyCharm issue?, so as I said, I didn't investigate the Python direct run situation.
I am no expert (I am not a programmer by trade), but this seems like an access violation that could be related to a file open call without a close. Like, Windows already has a file handle to the open dll file and then the call to the next HTMLLabel/Frame is trying to access the file again? I don't know where that would be, but if a check to whether the calls to the dll are open already, might fix this? Again, not a professional, just spitballing why this might be happening.
I should also note that the multiple calls to the HTMLScrolledText (which I think may also access the tcl dll) don't produce the violation, so there may be a way to handle the multiple calls without a crash? I am certainly not smart enough to figure that out in looking at your code, since this seems like subtle issue?
Again, thank you for the fast response and the hints for troubleshooting . . . it was very helpful for me to learn more strategies for problem solving.
I have attached both the simplified code and the html files I am using that cause my issues.
Thanks,Isaac
On Friday, July 16, 2021, 6:35:20 AM CDT, Andereoo ***@***.***> wrote:
Hello,
Thank you for letting me know about this. Perhaps try running your code from Python (and not PyCharm), or running the Tkinterweb Demo (ie. import tkinterweb; tkinterweb.Demo()). Let me know what happens. If you can send me a simplified version of your code that has the issue so that I can try to identify the cause, that would be really helpful. Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hi! I can't seem to find the files, maybe something went wrong when you sent them? |
There should be a 15kb zip file attached. If not, perhaps the reply through GitHub is stripping attachments? If there is no attachment, do you have an alternate email or a place you would like me to upload the file to?
Thanks,
Isaac
…Sent from my iPhone
Begin forwarded message:
From: Isaac Rutel ***@***.***>
Date: July 16, 2021 at 12:16:29 PM CDT
To: Andereoo/TkinterWeb ***@***.***>
Subject: Re: [Andereoo/TkinterWeb] Tkinter GUI crash on implementatin of HTMLFrame (Win10, python 3.8, PyCharm 2021.1.3) (#19)
Thank you for the fast reply. So I tried a couple of variations and apparently tkinterweb either doesn't play well with multiple instances of calls to HtmlFrame or if I call other html display type frames (here I had to implement HTMLScrolledText from the tkhtmlview package for simple multiple html interpretations/no<table> tags). However, I have the same issues if I ONLY use tkinterweb HTMLLabel or HTMlFrame for multiple "tabs".
I did not try this in just python (outside of PyCharm), since I DID try the tkinter.Demo() with no issues (in PyCharm) and I was able to run a single tab (if you comment out everything BUT the QAPTab information) in Pycharm, where it is also stable. So it looks like tkinterweb is making more calls to the tcl86t.dll than Win10 thinks is required/good? and it forces the exit out of the program with exit code: -1073741819 (0xC0000005)
This correlates to Win10 event viewer giving this error:
Faulting application name: python.exe, version: 3.8.1150.1013, time stamp: 0x5dfab277
Faulting module name: tcl86t.dll, version: 8.6.2.9, time stamp: 0x5c12d592
Exception code: 0xc0000005
Fault offset: 0x00000000000fc633
Faulting process id: 0x4250
Faulting application start time: 0x01d77a6300d17cd1
Faulting application path: C:\Users\irutel\AppData\Local\Programs\Python\Python38\python.exe
Faulting module path: C:\Users\irutel\AppData\Local\Programs\Python\Python38\DLLs\tcl86t.dll
Report Id: 72ba61cf-0246-4888-9eca-1e16652396a5
Faulting package full name:
If you look at the path, Win10 sees this as a Python call issue and not a PyCharm issue?, so as I said, I didn't investigate the Python direct run situation.
I am no expert (I am not a programmer by trade), but this seems like an access violation that could be related to a file open call without a close. Like, Windows already has a file handle to the open dll file and then the call to the next HTMLLabel/Frame is trying to access the file again? I don't know where that would be, but if a check to whether the calls to the dll are open already, might fix this? Again, not a professional, just spitballing why this might be happening.
I should also note that the multiple calls to the HTMLScrolledText (which I think may also access the tcl dll) don't produce the violation, so there may be a way to handle the multiple calls without a crash? I am certainly not smart enough to figure that out in looking at your code, since this seems like subtle issue?
Again, thank you for the fast response and the hints for troubleshooting . . . it was very helpful for me to learn more strategies for problem solving.
I have attached both the simplified code and the html files I am using that cause my issues.
Thanks,
Isaac
On Friday, July 16, 2021, 6:35:20 AM CDT, Andereoo ***@***.***> wrote:
Hello,
Thank you for letting me know about this. Perhaps try running your code from Python (and not PyCharm), or running the Tkinterweb Demo (ie. import tkinterweb; tkinterweb.Demo()). Let me know what happens. If you can send me a simplified version of your code that has the issue so that I can try to identify the cause, that would be really helpful. Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hello, It looks like email reply to Github is stripping attachments. If you go to #19 you should be able to drag and drop your zip file. This should upload it. |
Here are the files. |
Hi, This seems to be a Tkhtml bug. For some reason when used with a tk.Text widget in a ttk.Notebook, selecting the tab with Tkhtml causes the app to crash. Try this code if you're curious:
Selecting the 'HTML' tab will crash the app. This issue only seems to be present in 64-bit Windows. I'll keep looking for a fix, or at least a workaround. |
Thanks for the verification and tracking down the specific issue (even though it is not in your project). I anxiously await a work-around or resolution/update to Tkhtml, either of which might allow a table formatted html file loaded into the tab. I can always open a new window, but that would be clunky for my app. Thanks for the help, I will await a fix! Thanks! |
Unfortunately, I haven't been able to find any fixes yet. There are two things that you could do at this point. Firstly, it seems that you are using both |
I think I attempted to run it all with HtmlFrame before and had a similar problem. The HTMLScrolledText provided stable function for the other tabs . . . In any case, I updated the code to ONLY use calls to HtmlFrame and it crashes again. Faulting application name: python.exe, version: 3.8.1150.1013, time stamp: 0x5dfab277 Faulting module name: tcl86t.dll, version: 8.6.2.9, time stamp: 0x5c12d592 Exception code: 0xc0000005 Fault offset: 0x00000000000fc633 Faulting process id: 0xf08 Faulting application start time: 0x01d78e17b6eefb63 Faulting application path: C:\Users\irutel\AppData\Local\Programs\Python\Python38\python.exe Faulting module path: C:\Users\irutel\AppData\Local\Programs\Python\Python38\DLLs\tcl86t.dll Report Id: 1a9998f5-025c-45f6-8009-45ce29b27432 Faulting package full name: Faulting package-relative application ID:I will see about a test file with the same setup to determine if I have the crash in a simplified script. The Python output after the error is: |
Here is the updated code with only the tkinterweb functions (HtmlFrame) and the files to test. It still crashes, even in the simplified format. |
Just chiming in to say I have the exact same issue than irutel and I'm heavily interested in a fix. I'm loading an html content read from a local file that I want to display in a tab and I'm experiencing the same symptoms. Thanks for bringing this up irutel! |
Sorry for the late response. I still haven't been able to find a fix for this Tkhtml bug. That being said, I've made a wrapper for It displays and manages pages on it's own but allows |
Hey @Andereoo, thanks for the not so late response :) I'm out of the office until monday but I'll definitely give this a try then. Thanks for your work, I will keep you posted! 👍 |
@Andereoo, |
I'm excited to read that, can't wait to implement it too! |
I can confirm it works on my end too, I also used the file importing method. Thanks for the fix! |
I have implemented a Tkinterweb (3.9) call (HTMLFrame) inside of a ttk Notebook "Tab". The program is stable until I select the tab with the call where is exits/crashes with the exit code: -1073741819 (0xC0000005). This appears to be a buffer overflow/access violation problem?
Here is the code snippet with the call:
helpFrame = tk.Toplevel()
helpFrame.geometry("700x800")
helpFrame.title("Help Pages")
tabControl1= ttk.Notebook(helpFrame)
introTab = ttk.Frame(tabControl1)
mainHelpTab = ttk.Frame(tabControl1)
setHelpTab = ttk.Frame(tabControl1)
QApTab = ttk.Frame(tabControl1)
tabControl1.add(introTab, text='Introduction')
tabControl1.add(mainHelpTab, text='Main Help')
tabControl1.add(QApTab, text='QATrack+ Interface Help')
tabControl1.add(setHelpTab, text='Settings Help')
tabControl1.pack(expand=1, fill="both")
QApHtml_file = open(resource_path('QATrack+Interface.html'))
QApText = QApHtml_file.read()
QApHtml_file.close()
QApsubFrame = HtmlFrame(QApTab)
QApsubFrame.load_html(QApText)
QApsubFrame.pack(fill="both", expand=1)
The file it opens to grab the HTML changes, but I have simple HTML to HTML that includes tables and a <style></style> section. For all HTML code it will display for about 2 seconds and then exits with the above exit code.
This is also the same problem I am having with HTMlLabel (given that Label is a subclass of Frame, it appears the issue is with something in the HTMLFrame class? Or is this more fundamental with the dll, or selection of dll? I notice there is a folder with tkhtml, with Darwin, Linux, Windows, and a 32-bit, 64-bit options, maybe it is using the 32bit instead of the 64 bit?
Further investigation shows it is a dll, but not in this module. I would love to move this to a discussion forum, instead of listing as an issue, since it seems to be an issue, but not necessarily with the package. Full error from Event Viewer in Win10 gives:
Faulting application name: python.exe, version: 3.8.1150.1013, time stamp: 0x5dfab277
Faulting module name: tcl86t.dll, version: 8.6.2.9, time stamp: 0x5c12d592
Exception code: 0xc0000005
Fault offset: 0x00000000000fc633
Faulting process id: 0x7f4
Faulting application start time: 0x01d779ccb91ee152
Faulting application path: C:\Users\user\AppData\Local\Programs\Python\Python38\python.exe
Faulting module path: C:\Users\user\AppData\Local\Programs\Python\Python38\DLLs\tcl86t.dll
Report Id: 828419ce-7046-4d6c-a266-3ec839124afb
Faulting package full name:
Faulting package-relative application ID:
So an issue with a call to the tcl86t.dll. As a note I will attempt to update to Python 3.9 (with new(?) tcl dll) and see if this helps with the issue. Potentially a collision with 86 vs 64 dll file versions?
The text was updated successfully, but these errors were encountered: