I have a custom OS X NPAPI plugin built as universal 32 bit bundle. It works fine under OS x 10.6 in Firefox. It also runs fine in Safari launched in 32 bit mode.
However, it silently fails in Safari launched in 64 bit mode. The 64 bit Safari runs 32 bit plugins in a separate process (WebKitPluginHost). Plugin log shows that the host starts the plugin, calls NP_Initialize, then NP_GetEntryPoints, then NPP_New, which successfully returns created instance. Typically, the next plugin method called would be NPP_SetWindow, however, host never calls it. Instead it silently quits in about 10 seconds after launch, with no messages or whatever. I managed to attach to the host process with GDB, but with no luck, it just notes that the process has finished normally.
I'd much appreciate any hint what I might have done wrong in the plugin, or a URL of open sourced NPAPI plugin which is known to work under WebKitPluginHost, or even a hint what would be the best way to debug this issue (building debug version of WebKit is a last resort, I've been there and now I need to find a solution a bit more quicker)
It appeared that WebKitPluginHost explicitly requires plugin to set NPPVpluginDrawingModel. Since the plugin was windowless I never bothered to do that, and it worked out fine.
Minus six hours of my life for digging that out :(
Building a fat version with a 64-bit segment in the binary would seem to be the most obvious thing to do first.
Related
I am working on a IddCx indirect Display Driver. I have run into a bug that I cant find any reason to blame my own code on. Every two seconds or so IddCxSwapChainReleaseAndAcquireBuffer takes over 100ms, up to 8000ms to complete. It normally takes below 16ms to complete (depends on your frame rate).
I even added timestamps to the IddCx Sample code from Microsoft. It still has this issue, so it cant be a fault with my own code. I have exhausted most of my debugging options.
Changing IddCx versions I am compiling with (1.4 to 1.8) by targeting the libs, the headers, and defining the macros (IDDCX_VERSION_MAJOR, IDDCX_VERSION_MINOR, IDDCX_MINIMUM_VERSION_REQUIRED). 1.9 btw doesnt seem to run well, IddCxDeviceInitConfig() fails with Invalid Parameter if I choose version 1.9.
Changing which UMDF version I am compiling with (2.25 to 2.33).
Changing the Windows SDK version I am using (10.0.19041.0, 10.0.20348.0, 10.0.22000.0, 10.0.22572.0).
Swapping my OS to the Insider Program preview version of win11 (currently 22000.588 co_release).
Things I think may be solutions that I need help on.
When I am running the Driver, within dxdiag, the display says its using WDDM version 1.3, while my other displays use WDDM version 3.0. WDDM 1.3 is old, so maybe this could be causing issues? How do I tell visual studio to compile my driver to compile with WDDM version 3.0? Does my driver need to WHQL Logo'd first?
IddCxGetVersion() returns with version 1801 or 1803 no matter what I change (SDK, IDDCx version, etc), which is from 2018! So what am I doing wrong here to get the OS to choose to use a newer version of IddCx? This may be related to the WDDM version being 1.3 instead of 3.0.
Swapping back to Windows 10. I originally swapped to Windows 11 because the WDK dev environment is completely unstable, with the samples sometimes not creating functional drivers, that fail to call into 'EVT_IDD_CX_ADAPTER_INIT_FINISHED', I have confirmed its being compiled incorrectly (sometimes) on windows 10, and the old dlls from earlier that day will still work, but the new dlls will not. So thats why I am staying with Windows 11, I also need to swap to Windows 11 anyways since we should be moving forwards, not backwards.
forgot to close this.
Realized the issue was that the monitor desktop simply wasnt updating. So the OS was just rendering the desktop less often, resulting in less frames being pushed to the swapchain for me to grab
I've built an Electron app using the Squirrel packager/update manager.
I've had no issues in building the bundle, targeting Windows 64bits only.
I installed it on my Macbook pro (on a windows 7 x64 dual boot) without trouble. I tested it also on a 64 bit Surface pro 3 (Win 10), and another Win 7 PC. Everything works fine.
I published the app and got a few hundred downloads :half the people that downloaded it has it working, and for the other half it just won't start. The process spawns, then dies a second after. I tried starting it in admin, the admin dialog box won't even show. I tried running it from command line
myapp.exe > out.txt
But out is empty. How can I debug this ?
I was having trouble getting the logs for a production build as well.
My solution was to use electron-log to let the production app write logs to disk while debugging the problem.
You can then access the logs on windows at:
%USERPROFILE%\AppData\Roaming\<app name>\log.log.
Add some logs in your app that will give you insights in where the app crashes.
Don't forget to remove electron-log when you're done debugging and don't need to write any logs to disk any more.
I solved it for many users by building directly on a windows 10 fresh install.
The builds I used before were built on a windows 7. Not sure if it was that, I also have been cleaning the node modules a little bit, so maybe one of the modules I removed was the issue. Anyways, I still do not know of to debug the built exe in this kind of situation. There must be a way to get a log or something when the process kills itself
I have done a little work on lazarus' free pascal. So when a client asked me to write an application for a mac, after the initial, "it can't be done" stage. (followed by an asp.net maybe stage) i thought about writing it using lazarus.
Question is. I have only a virtual machine running mac OSX, this means that i do not really want to develop on the mac. However, i just cannot seem to get the applications that i have written in lazarus on windows to work on the mac. I have tried the deployment using the Lazarus Wiki and the MACOS folder is empty and so when i put it on the mac it doesn't run the application.
What is the best way of doing this or am i barking up the wrong tree?
It seems you want to do cross-compiling, which is theoretically possible, but may not be practical, for the reasons mentioned by Marco above.
As an alternative, you could install XCode, FreePascal, and Lazarus on a MacOX machine. You could still do your development and some testing on Windows/Linux. When you hit a certain milestone, you can copy your source code to the Mac and compile your application to test and give to the user.
Even if it were possible to easily cross-compile, there some minor differences between platforms, so (especially if it's a GUI app), you would want to test it on an actual MacOS box before giving it to the client.
I've taken the route described by Noah - and I was incredibly surprised that after about three weeks development on Windows, it took about 10 minutes to get the application running on the Mac.
My route was to install Xcode 4.3 on an old Mac Mini running snow leopard, then install Lazarus using the fink version as described here. This took a while but was done in an evening.
Then I just copied my folder across to the Mac, opened the lpi on the Mac, compiled it. It failed so I removed a windows references, recompiled, and it was working. I was truly amazed.
What linker and assembler do you use to generate binaries? To my best knowledge the linker for recent OS X versions is not available in source.
Afaik what you want (crosscompiling to Mac) is not possible for recent versions (and I've done it for PowerPC myself in the past).
The easiest is to use the Unix "file" command on the binary to see what is generated, and make sure it reads something with "MachO" in it. Easiest is if you have a Linux install (where this command is pretty standard), but versions can be found for windows too (cygwin, mingw and 3rd party)
Ok, this seems like a dumb question because MonoDevelop is getting more mature, so I'm sure I'm just missing it, but I looked around and all the questions about this subject seem to be about remote debugging or debugging on a Mac.
I'm using Ubuntu 10.04 Lucid Lynx, and I just installed MonoDevelop 2.2.1 from the software center.
I created a GTk# 2.0 project, added some widgets and code and everything seems to run fine. Then I added a breakpoint, and it shows up in my breakpoints window, and it says it's active, but the breakpoint never actually hits(stops execution and pulls me into the debugger).
I'm in Debug x86 mode, so I can't figure out what's going on.
Anyone have this happening/know what to do about it?
I'm having the same problem (also on Ubuntu 10.04) and found kind of a hack that is working for me. Instead of setting a breakpoint in the IDE (by clicking on the side or hitting F9), make a call to the System.Diagnostics.Debugger.Break() method in your code where you want the execution to break. After doing that, I am able to step through the code, use the immediate window, etc. Obviously, it's not a very good solution, but at least it's something.
To check whether you have a debugger installed, simply check whether the "Run" menu contains a "Debug" command.
You should be aware that Ubuntu ships a rather old version of Mono (2.4) which has no built-in "sdb" debugger, and its version of MonoDevelop 2.2 is patched to remove the sdb interface. To get semi-functional debugging, install the old "mdb" debugger - the mono-debugger and monodevelop-debugger-mdb packages, IIRC.
To get the best debugging experience (sdb), you need Mono 2.6+ and an unmodified MonoDevelop 2.2+. If you decide to build Mono from source, please read this and this first. Alternatively, you could use openSUSE, which has up-to-date Mono and MonoDevelop packages available.
What versions of Mono runtime and debugger are installed? I tried it with monodevelop 2.2 + mono 2.6 + debugger 0.0.0 under Windows and it works just like expected. Here is a quotation from mono's website, which may be helpful:
Mono comes with two Mono-specific debuggers: a hard debugger and a soft debugger, additionally, you can use the Unix GDB debugger with Mono to debug low level problems
...
Soft Debugger:
...
Moonlight, ASP.NET, Gtk#, iPhone and remote debugging supported
Maybe the problem is in a code? What do you mean by:
... (stops execution and pulls me into the debugger).
I'm just starting out with GWT but I can't even run the getting started example without getting the following error:
Invalid memory access of location 0x10 eip=0x93624148
I am aware of the "java hosted mode 32 bit" stuff, anyway I tried every combination I could think of and still could not get away with that error.
I tried:
Using the eclipse plugin
Setting all possible jvm switches in eclipse to 1.5
Use the command line tool
Set the java environment to java 5 32 bit in the preference pane, and do all of the previous options again, without success (I checked that effectively "java -version" gives me the right 32 bit jvm)
Any suggestion? I can't believe that something which should be apparently immediate is so difficult ...
Thanks for your help
Best regards
Nicola Montecchio
Seems to be fixed in GWT 2.0.
Alternatively, try using the WebKit Nightly.
Steps here:
http://grack.com/blog/2009/11/16/fix-for-gwt-hosted-mode-crash-with-safari-4-0-4/
See release notes for latest SDK 1.7.1.
You might need to switch to Snow Leopard to get it working.
Update: GWT 2.0 is just out today. Give it a go, even thought I've not seen anything related to Leopard in the change list.
I used gwt a lot on my mac with OS X 10.5 on. It actually worked fine. Have you also set the java class version in the projects facets menu in the project preferences to java 5?
You can also provide which java to use in the launch configuration, you don't need to modify in the Mac OSX preference pane.
I actually upgraded to 10.6 when it came out, and it made life with GW easier.
Hope it helped, if you have any more questions let me know.
Best - István