Question

Having compiled and linked a NaCl module I am now attempting to debug why it seemingly won't run. Unfortunately the platform is not passing on ANY information about why nothing is happening.

I can't believe I'm asking something this basic but what do you have to do to get a single printf() statement to appear in stdout/stderr? Or in the Javascript console?

Yes I've read the SDK page about Debugging and enabled all the dozens of environment variables and flags, I've turned the logging verbosity up to max, and absolutely none of it makes the blindest bit of difference. No information whatsoever appears anywhere.

Occasionally the JS console will print the line "ServiceRuntime::Start (start failed)" (which also appears in stdout) but it's far more often that I get nothing at all.

NaCl SDK version is 28, am running Chrome 30 on OS X Mavericks.

Command used to start Chrome with the Graphics 3D example in the SDK:

export NACL_EXE_STDERR=~/nacl_stderr.log
export NACL_EXE_STDOUT=~/nacl_stdout.log
open -a "Google Chrome" http://localhost:5103/api/graphics_3d/ --args --enable-logging --no-sandbox --vmodule=ppb*=4

This should generate a ton of logging but the log files are never created.

Was it helpful?

Solution

As discussed on the mailing list, the solution is to make sure you invoke chrome (e.g. from the command line) using the actual path to the Chrome binary (for example, "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome") instead of using the open shell command, because open does not give you the stdout/stderr streams from the application it launches.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top