I am building a PDF viewer in Ionic 2 using the Mozilla PDF Viewer but have run into a problem. I have built pdf.js in accordance with these instructions. The code generated includes this line:
var worker = new Worker(workerSrc);
Chrome is complaining on this line that it cannot find the file GET http://localhost:8100/build/main.worker.js.
Now then, I have not come across web workers before, so I'm not sure what this error means or where to find, or build, this file. I notice that the build process also yields a file called pdf.worker.js, and I have strong suspicions that this might be the file it's after, although renaming it to main.worker.js had no effect.
I'm sure this is a very simple problem if you are in the know. What am I missing?
Ok, after a little more digging, I found this which pertains more to my situation. I am using Ionic 2 and I don't know how to generate the file referenced in this line:
pdfjsLib.PDFJS.workerSrc = '../../build/webpack/pdf.worker.bundle.js';
Can anyone illuminate my dark mind?
Related
Description of the problem:
I'm testing the irisVR Beta and I'm trying to launch some cranium.obj 3D model I have. I dragged and dropped the model directly on irisVR launch window and clicked launch. A terminal opens up for half a second and closes. Then nothing happens.
Image 1 -- Iris launch window -- indefinite progress bar
Image 2 -- irisVR console.log
Here is the error I am getting in the console.log:
Question:
What is causing this error, and how do I fix it?
Nate here from IrisVR. Just wanted to let you know that for the next few versions (next few weeks), we have removed OBJ support. Your question makes me realize that our documentation needs some TLC and is misleading - I have added updating it to my task list and it should be amended by EOD tomorrow. Thanks for that!
You'll notice that the drop-zone graphic only includes the SketchUp and Revit icons. This won't last long, I promise! We are building a new system for handling the model geometry and optimizing it for VR and it broke part of the OBJ code. Ultimately, these changes are going to lead to some terrific improvements. Given our limited programming bandwidth right now, we had to pick two file formats to carefully maintain throughout this migration process and we'll pick up the pieces with OBJ ASAP
Thanks again for your patience and for using the app! In the meantime, give a SketchUp model a try :)
Another tester here - ran into the same issue on a fresh Bootcamp install, it's not isolated to the *.obj support that Nate mentioned as was able to recreate with both Sketchup and Revit models.
The current release (v0.2.4) appears to have some dependencies on the Microsoft Visual C++ 2010 redistributable. If you don't have this installed, it will block the associated IrisVR ModelConverter from running and that statistics.ivr file from being generated. Unfortunately there is nothing logged to this effect, so took a bit of digging to find. You will however see a window flash up briefly, then close. This is the ModelConverter attempting to launch and quit.
To resolve, download and install the redistributable from here.
I am looking to use Docx4j, specifically to convert html pages to word documents, so I was playing around with it, but I am unable to get the sample code in the git repo to work.
XHTML URL to word doc specifically is what is causing me issues. When I run the code, I obtain a mass of errors when converting, such as
[http-bio-8080-exec-10] ERROR run.FontSize - TODO FontSize Handle units: 2
as well as other errors relating to getColWidth for col1, among other things. When it finally crashes, I get a nullPointerExeption
#
line 974 | traverse in org.docx4j.convert.in.xhtml.XHTMLImporterImpl
which is if (listHelper.peekListStack().getElement()!=null
&& listHelper.peekListStack().getElement().getAttribute("class")!=null)
Are there any configuration changes I need to make to get the XHTMLImporter working out of the box?
I am using it from this Maven Repo, and this seems to be the most up to date version.
Docx4j seems to be working fine by itself, as I have successfully created and written to a docx file, but this issue seems to be plugin-specific. Any ideas on what is happening?
For the NPE, please lodge a bug report at https://github.com/plutext/docx4j-ImportXHTML/issues?state=open including a simple test case so it can be reproduced.
To work around your font size issue, you'll need to use a supported font size unit. See https://github.com/plutext/docx4j/blob/master/src/main/java/org/docx4j/model/properties/run/FontSize.java
I am at my wits end. I've written a xul app and it runs fine if I open the .xul in firefox directly. But xulrunner doesn't cooperate at all. I can run my xul fine by using the -chrome flag for firefox and giving it an absolute path, but -app doesn't work on firefox either. I have all the files required (application.ini, chrome.manifest both in root and /chrome/ and tried with either missing as well) and their format has been checked and re-checked.
I was prepared to paste all my files here and link the code, but I've tried everything, including a boilerplate project from http://www.mozdev.org/projects/wizard/ (from the application wizard) which reacts the same way as my own project.
xulrunner returns no error message, nothing - it just stays there in the task manager, no cpu load, not loading anything to memory, inert.
I've tried other projects (https://github.com/matthewkastor/XULRunner-Examples - the periodic table works at least) but I can't get a single solid lead on why some projects run properly, while others just have xulrunner waiting and doing nothing. It also seems this is a rare problem because most people can at least run the boilerplate fine, even if their own projects don't initially run.
I don't think it's necessary to post my code at the moment since it behaves the same way as the boilerplate. Can anyone tell me possible reasons why xulrunner won't work with the boilerplate but will with the example project?
I'm running v25 on win xp sp2 and I have been searching and reading all day, so I'm pretty sure I've read everything related - thanks in advance; I hope 5 days of work won't be wasted :(
edit:
SOLUTION: I messed up and didn't notice that prefs.js was missing or empty. Even if you have no preferences in your app, prefs.js is needed to set up the environment and tell firefox or xulrunner where the xul file to start from is. Without this pointer it has no idea. Yes, the MDN article does state this and what it contains is accurate, this was a big mistake on my part, as it seems I subconsciously (or not?) ignored the prefs.js file because I had no need for preferences in my app.
tl;dr if your apps don't work but the example files do, check your prefs.js even if you don't use preferences.
Posting this to close this question, since it doesn't need further answering.
The fault was with me - the app required a valid prefs.js file which I hadn't created because I was under the impression it wasn't required unless you intended to have preferences in your app. The MDN (at least at the time) specified this.
Some months ago I installed Lazarus 0.9.28 + FPC 2.2.4 to work on a new project. Some time after it I ran into some bugs related with image loading on a TImage. After googling a bit I found some information pointing to the fact that the bugs I was facing were already solved in a later version of FPC (can't remember the link now).
So I decided to download and install a newer version. This was around January and the latest stable version was not released yet, so I choose to install the snapshot Lazarus 0.9.31-29128 + FPC 2.4.2-2011-01-20. I opened my project with the new IDE and compiled it.
Luckily the bugs I faced were gone, but I have run into an IDE (?) one. After the upgrade, when I am on the code tab of some of my forms I do not see the code formatted. Instead I only see plain text, like this:
But on some forms I see the code formatted correctly, like this:
Anyone has run into this before? If yes, could you solve it and how? Or can anyone tell me what the correct way to upgrade a Lazarus project between versions is?
It is more of a nuisance than a real problem but still I would like to solve it. Any help would be appreciated.
EDIT
I noticed that in the forms where the code shows correctly highlighted the LCLVersion in the .lfm file is 0.9.28.2, while in the forms where the code shows like plain text that property in the .lfm file is 0.9.31. Could have something to do with the problem? I tried changing the value but it did not change anything.
Thanks in advance and best regards
I don't know if this is actually causing your problem, but Lazarus keeps a set of settings in application local. ($user\AppData\Local\lazarus on my vista).
This config dir is not erased upon deinstallation, and the new installation will reuse this.
In case of strange problems, remove the config dir, and let the current installation generate a new one.
I've got a really strange error and any light that anyone can shed on this would be greatly appreciated.
I made some changes to some VB6 source which builds a COM object. The automated build which builds our app returned an error. No problem I thought--I'll just back out my changes. Well backing out my changes isn't making the problem go away.
Specifically when I attempt to build the app via a .vbg file, with a command line like path\to\vb6\vb6 ProjectFile.vbg /make
I get a message
"Compile Error in File '', Line : Object library
invalid or contains references to object definitions that could not be
found."
As I said, I reverted the source code so I'm really stumped as to why this error is still occurring. Any VB6 gurus around who might be able to point me at an answer?
I can post the exact code in question but the fact that it was building correctly, stopped building correctly and now refuses to build correctly makes me think this is not a problem with my code but rather some problem in the environment. Like something got put in the registry as a result of the previous build error.
Any tips, hints, or suggestions greatly welcome. I realize my question is a bit sketchy but I'm not even sure what's important to include and what isn't.
EDIT 1:
Thanks for the excellent suggestions guys. I think it is something to do with VB6 doing some sort of auto-registration.
Just to add a bit more detail: this problem does not occur when I build the referenced vbp file from the IDE. It only happens on the make on the .vbg which contains the vbp. Also the build tool in question automatically pulls latest source and the error happens on both my local box and the dedicated build box.
EDIT 2:
Hi again all,
The release engineering fellow figured out how to get this to build in his build environment so it's currently ok. Once we're past this crunch, I'll try to interrogate him about what he did and share the details with everyone.
Thanks again for all the great suggestions. This is what's so great about SO; that is, I asked about a 10-year-old technology and I got several great and on-point ideas.
Make sure that the VBG and all the VBP's got rolled back as well. That error is consistent with a project trying to reference a CLSID that is no longer valid for the dependency. Have you tried loading up the project group and building from the IDE, if that works and you save and check in all the changes to the group and project files, you might be fixed up.
I'm guessing the fact that you mention that it was a COM component might be the source of the problem. If any of the public method's or properties have changed then I seem to remember that VB6 will change the interface GUIDs and auto register the new ones.
My suggestion would be to check the registry to look for any mention of the component name, make a note of any associated CLSIDs, back up the registry, and then delete the references.
As cmsjr mentions it could also be a bad CLSID reference in your .vbp files.
The other option is that the failure has caused a problem with some .tlb (type library) or olb (object library) files.
The best thing to do is move all your compatibility DLL to a separate and combined directory. The reason for this is control over what VB6 is using to check for binary compatibility. In addition the Typelibs that are generated IMPORT the references. So if you using Binary DLL Ver 10 for compatibility however the import is pulling in Binary DLL Ver 9 you will have issues. By keeping all the libraries in a single folder and pointing your projects to the DLLs in that folder you ensure that the respective TypeLib Import the correct version.
Finally if you have multiple levels of DLL reference each other. You may run into mysterious error where the VB6 is unable to compile using binary compatibility. In such cases you need to compile the lowest DLL in the hierarchy (Utility DLL perhaps) copy it over into the compatibility folders. Work your way up the chain until everything compiles in one shot again.
This is because if have DLL A reference DLL B which Reference DLL C. VB6 will get sometimes get confused if you make a change to A and C. will compile fine but A will not until the compatibility libraries are updated.
Hunt down and delete any .obj and .exp files that may be lying around from the previous failed build.
You will have to open the project & re-type in the lines that you changed.
Save the project alongwith VBG and re-compile after that.
I think that will fix it.
EDIT: The idea is that the cls/bas file remember the class (CLSID) that you used. So, if you change the references but don't change the lines in the cls/bas - it is a mismatch of type (what was referenced vs what is typed in cls/bas file).