Firefox NPAPI plugins broken in OSX on VMware - macos

It seems like Firefox NPAPI plugins are broken in Mac OSX (tested on 10.6 and 10.7) VMware virtual machines. Does anyone know why, or have an idea for a workaround - e.g. detect when the user is running Firefox/OSX/VM?
Context:
My plugin consumes 100% CPU only if FF && OSX && VM. However, the plugin is still functional. This is always reproducible and happens across multiple VMs.
Adobe Reader, Adobe Flash, and a test plugin I built using Firebreath (the tutorial) were all broken as well in this environment.
Firefox outputs the following log message in Console: "invalid pixel format" and "invalid context". Probably related to OpenGL - see bug report.
Running the glxinfo command gives a similar error:
cb-sea-miniosx64-03:~ seabld$ glxinfo
name of display: /tmp/launch-LojaDe/:0
Thu Jul 5 20:13:51 cb-sea-miniosx64-03.comm-build.scl1.mozilla.com glxinfo[1009 <Error>: unknown error code: invalid pixel format
Thu Jul 5 20:13:51 cb-sea-miniosx64-03.comm-build.scl1.mozilla.com glxinfo[1009] <Error>: kCGErrorFailure: Set a breakpoint # CGErrorBreakpoint() to catch errors as they are logged.
X Error of failed request: GLXBadContext
Major opcode of failed request: 0 ()
Serial number of failed request: 16
Current serial number in output stream: 16
The Instruments profiler reports a lot of time spent in IOSurfaceCreate/IOSurfaceClientCreate for my plugin. The browser uses IOSurface to share rendering data with the plugin if I understand correctly.
A sample taken using Activity Monitor did not seem to have any useful info - except that the CPU problem is in the main thread (DispatchQueue).
One workaround is to run Firefox in 32-bit mode: right-click the FF application > Get Info > Open in 32-bit mode. But we can't expect users to do it.

Sounds as though OS X VMWare guests simply don't have fully functional 3D acceleration. If anything, this is a VMWare bug (not exposing full 3D acceleration), or possibly a Firefox bug (responding badly to a lack of 3D capabilities); it's almost certainly not your fault.
I wouldn't spend too much time trying to work around it, especially given that every other plugin you've tried (including Flash!) seems to be affected by the exact same problem. List it as a "known issue" and move on.

Related

ERR_NO_BUFFER_SPACE error on M1 Macbook Pro

I have been using the Macbook Pro M1 for web development for the past 7 months.
Lately, after about 1-2 minutes of starting my dev server (React with Vite and Gatsby), I get an ERR_NO_BUFFER_SPACE in Chrome, and I don't have an internet connection.
My co-workers with non-M1 Macbooks do not have the same issue.
So looking for this error in Chromium we get a reference to ENOBUFS in the source code here:
https://chromium.googlesource.com/chromium/src/+/HEAD/net/base/net_errors_posix.cc
According to this https://www.encyclo.co.uk/meaning-of-ENOBUFS the error is due to:
In programming, ENOBUFS is a POSIX error code defined in . This condition caused by lack of memory in the OS`s buffers. Typically occurs in socket programming
I would suspect that there's a bug in the socket programming in Chrome that is mostly manifested in the ARM version of the operating system. This could either be a Chrome bug or an OS bug.
In this message https://groups.google.com/g/nodejs/c/ahVUQHRVhAo?pli=1 it suggests that it could be caused by excessive writes. Could something in your React code be overloading a network buffer?
I had the same problem with my angular projects, but after closing visual studio the connection came back to normality. I uninstalled some extensions such as ninja log, WSL, html to jsx, etc. I could work normal again. I'm also using M1 Macbook Pro. I hope this can help you.

Firefox crash when called by Selenium Remote Driver on Mac OS X

I have just installed the Selenium Remote Driver on my Mac OS X 10.8.5 machine, and using Firefox 43.0.4 (the latest stable to date) when running this code:
#!/usr/bin/perl
use strict;
use warnings;
use Selenium::Remote::Driver;
use Selenium::Firefox;
my $firefox = Selenium::Firefox->new;
$firefox->get('http://www.google.com');
causes the browser to open, and then crash, outputting the following error to console:
kernel[0]: firefox-bin (map: ...) triggered DYLD shared region unnest for map: ..., region ...->.... While not abnormal for debuggers, this increases system memory footprint until the target exits.
Any clue as to what might be causing this?
Is it a programming error on my part?
Should I be using some specific flag to prevent this?
Or is this something I should report as a bug?
Any help is much appreciated. You will have noticed this is my first post to the site. I hope it is not out of order in any way, please excuse me if it is.
Thank you in advance.
Best regards,
Mark.
This is probably related to an issue with Selenium and FX 43 64bit. As of now there is no fix, only workarounds. These include:
Updating to newest Selenium version which makes FX not check addon signatures.
Using 32 bit version of Firefox
Using an older version of Firefox, e.g. 42
See https://github.com/SeleniumHQ/selenium/issues/1431 for more details.

Game App cannot run in Genymotion

I am having trouble loading a game app on genymotion. The game is Star Wars Force Collection. I can load the game, get the splash screens, then it crashes.
I have done some research before I posted here. The possible problems found in the genymotion logcat file:
There was a line noting Google services was out of date, "Google Play services out of date. Requires 4030500 but found 3225136"
Fatal signal 11 (SIGSEGV) at 0x00000364 (code=1), thread 1796 (RefQueueWorker#)
W/NetworkManagementSocketTagger( 280): setKernelCountSet(10040, 1) failed with errno -1
Some have pointed out ARM Translator problem and OpenGL.
Then again I'm really not sure the problem, and I want to post the logcat file here but I don't know how to attach it.
For problem 1, I have seen other thread here that may have fixed it with code, I'm not savvy enough for that and my Google is not updating itself.
That's about it. A few details about genymotion and the VM. I am running the latest version of genymotion and virtualbox. I am using the downloaded Custom image 4.3 as provided by Genymotion. I flashed the ARM Translation v1.1. I flashed the Gapps onto it, (I tried a higher version of Gapps to try and solve the problem, but that just made it crash) and then Star Wars Force Collection, most up to date version.
Also, worth noting that the app was running fine for v2.++, until an update to v3.++ made the game crash. I updated my graphics drivers to try and mend any graphics issues.
So there it is, any suggestions will be appreciated.

Countless warnings with SDL/OpenGL on OS X when dynamic graphics device switching is active

On Snow Leopard with a macbook pro that has two graphics devices the following error is printed to stderr multiple times a second:
Wed Oct 6 02:35:27 nausicaa.local TestApp[92464] <Warning>:
CGDisplayIsCaptured: Fixing up display ID 0x4272ec2 for offline
mux head to 0x4272ec0
When I force the graphics device to be either Nvidia or Intel it works as expected.
Does anyone know how I can deal with that problem? I suppose I could probably just force the graphics device to switch before OpenGL initializes, but neither do I know a reliable way that does that, nor does it sound like a particular good solution.
Any better ideas?
This looks like something that needs to be fixed in SDL itself. As far as I can tell, CGDisplayIsCaptured is complaining that the display ID SDL most likely got before the graphics switch is no longer technically valid, even though CGDisplayIsCaptured understands what SDL wants. Unfortunately, that information doesn't actually solve your problem.

WebKitPluginHost silently quits my 32 bit plugin on OS X 10.6

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.

Resources