Quasar Debug/Release build difference in virtual FileSystem
-
Hey guys,
im running a proof of concept, where I try to load an html dialog, made with the quasar framework, into an embedded browser of a C++/wxWidgets app. The files of that dialog are loaded from memory, using a virtual filesystem. A call does look like this: “memory:index.html”.
I tweaked the Blink backend of the embedded browser to prepend a “memory:” on every url, which does not hold a schema already, so that a url call like href or src does always look in the virtual file system for files.
If I use a quasar debug build, I am able to show the html with some minor problems. But if I instead use a quasar release build, the content of the dialog is not shown at all, except for a little pure html text (<p>Hello</p>), that I cheated into the index.html file to see if it has been loaded at least.I am pretty sure this is because of the virtual file system, wich does not work like a real file system, but rather like a map. So the resource can be pulled out of memory when providing the key value to it, which happens to be the full path and name of the file.
Example: This implies, that I cant use html anchors like: “index.html#section1”, because the virtual file system does not hold a file with the key name “index.html#section1”, but only the whole file data of the index.html which was saved with the key “index.html”.I compared the index.html of a debug and a release build, but couldn’t see a big difference for the calling of the content:
Debug:
<body>
<!-- DO NOT touch the following DIV -->
<div id=“q-app”></div>
<p>Hello</p>
<script type=“text/javascript” src=“js/app.c6614fbb.js”></script><script type=“text/javascript” src=“js/runtime.2b9fc57b.js”></script><script type=“text/javascript” src=“js/vendor.01bfe24d.js”></script></body>Release:
<body><div id=q-app></div><p>Hello</p><script type=text/javascript src=js/app.7627cc00.js></script><script type=text/javascript src=js/runtime.dd2a45f6.js></script><script type=text/javascript src=js/vendor.943ebca2.js></script></body>Any suggestions why the release build can’t be loaded from memory or how to make it work still? Does the release build use any anchors or similar file name changing actions, maybe?
Thanks!
Natu -
Hey again,
with a bit of work I could see that it is the blink backend, that has problems showing a release build of quasar, because with my standard trident backend, it works.
Quite surprising, because blink is supposed to deal better, not worse.Still, can you tell me about differences between the debug and the release build?
Thanks.
Natu -
Hello,
I’m just curious about it and I don’t specifically know how to help you but have you tried to compare the whole debug and release build folders? Maybe it is not just about the index.html but about the Javascript files…
Good luck!
cheers
-
Hey,
yes you are right. There are more changes than just in the index.html.
I made some more experiments and found an interesting fact: If I am loading a release build (which does not work properly) and than catch the content with:
“document.getElementsByTagName(‘html’)[0].innerHTML;”
I then can load that html code properly as index.html. So blink is self correcting all the .js calls, but the final “refresh” does not work. But I couldn’t find the call to the main page or an attempt to refresh that content, yet.Thanks
Cheers -
Last update here: It was an issue with the blink backend. With the newest master I was able to load release and debug builds alike.
-
Cool! good luck