I just released a new version of a program I developed some time back for Mac, PC and Linux. The new version uses wxWidgets 3.0 and wxWebkit to preview some information in a window pane using HTML/CSS. The HTML report is stored in a temporary file and then loaded to the wxWebView using "file::///path_to_report/reportxx.htm" as the path.
The code for the wxWebview is pretty minimal - it opens the window, and uses LoadURL with the file to preview the report file.
The problem is that a handful of users (most running OSX Mavericks it appears) have had the webview show up as a blank window that stays blank. I tried to duplicate it by loading a clean Mavericks partition and clean program install, but of course it works perfectly for me. I managed to get one of the users to look at the actual reports directory and he tells me that the report files are being generated correctly and he can even open the files in Safari. I also checked the paths using a debugger and it is creating the correct path ("file::///path_to_report/reportxx.htm") and passing it to the webview. Also I had users check for possible plugins/add-on/script conflicts in Safari but no luck.
I had one user report a similar issue on Windows 7, but I believe his window is not completely blank so he may have a different issue such as an IE plugin or malicious script.
Note that the same code works on all other platforms - Windows XP, Windows 7, Windows 8, Mac 10.5, 10.6, 10.7, 10.8 and even Ubuntu with no issues. Also it appears to run on many OSX Mavericks machines (including mine), while it fails on a handful of them.
Has anyone had similar issues working with wxWebview cross platform? Any thoughts on what to look at?
wxWebView Showing up Blank Some OSX Mavericks
wxWebView Showing up Blank Some OSX Mavericks
BeerSmith.com
Re: wxWebView Showing up Blank Some OSX Mavericks
I don't work under OSX, but based on the symptoms, there are two things that i'd check:
a) The path to the tempfile. Check if it contains any characters that might need special encoding (e.g. spaces)
b) The locale on the systems where it doesn't work. Maybe it's some text encoding issue
a) The path to the tempfile. Check if it contains any characters that might need special encoding (e.g. spaces)
b) The locale on the systems where it doesn't work. Maybe it's some text encoding issue
Use the source, Luke!
Re: wxWebView Showing up Blank Some OSX Mavericks
IIRC, on OSX, wxWebView does not render properly when launched from within a wxDialog
See this:
http://trac.wxwidgets.org/ticket/13863
Eran
See this:
http://trac.wxwidgets.org/ticket/13863
Eran
Re: wxWebView Showing up Blank Some OSX Mavericks
Thanks - it looks like it was actually the "space" issue in the URL. I've not been able to fully verify with the users having the problem, but when I simulate it on my 64 bit Mac by including a directory with a space in the path name, it does match the behavior that people are reporting. Correcting the URL with ampersand encoding subsequently solves it on those machines.
I'm putting together a new build now to send out to the people having the problem.
Brad
I'm putting together a new build now to send out to the people having the problem.
Brad
BeerSmith.com