"NaCl module crashed" only on Chrome OS

978 views
Skip to first unread message

Victor Hsieh

unread,
May 14, 2012, 3:25:15 AM5/14/12
to native-cli...@googlegroups.com
Hi,

I'm trying to run my nacl-snes on Chromebook, but it crashes immediately.  I only see "NaCl module crashed" in browser log but nothing else.  Is it possible to get more information about the crash here?  For example, how to enable printf so that I can see something in chrome's log?  Or enable stack trace?

It only crashed on Chrome OS (64bit, tried R20 and R21 with pepper 18-20), but not on my 32bit Mac and 64bit Linux, beta and dev release.

Thanks,
Victor

Nick Bray

unread,
May 14, 2012, 2:26:30 PM5/14/12
to native-cli...@googlegroups.com
What this message means is that some time after your module has started up the render process loses contact with it.  "Crash" is a little too specific of an error message, you may have hit an assert, or the program may have called exit().  I personally haven't developed on Chrome OS, so I can't address the particular debugging limitations you are working under, but I can outline how I'd deal with the problem on other platforms:

There are env variables to redirect NaCl's output to files  (NACLVERBOSITY=0/1/2, NACLLOG=file, NACL_EXE_STDOUT=file, NACL_EXE_STDERR=file).  Prefer using absolute paths, Chrome interprets relative paths is a way that is slightly counterintuitive.  (Relative to the Chrome executable?  It's been a while since I had to deal with this.)

If redirecting to a file is a problem, see: native_client/tests/postmessage_redir/ for a way to send stdout to postmessage.  The downside is you'll still need to sent an environment variable (NACL_EXE_STDOUT=DEBUG_ONLY:dev://postmessage) and if you're using postmessage as part of your app you'll need to sort through the stdout spam.  If setting environment variables is a problem, we'd need to talk to the Chrome OS folks and see if they have any debugging tricks.

Please keep us updated.  It would help us to have feedback on where the rough spots are when debugging on Chrome OS.


--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To post to this group, send email to native-cli...@googlegroups.com.
To unsubscribe from this group, send email to native-client-di...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/native-client-discuss?hl=en.

Nick Bray

unread,
May 14, 2012, 3:33:26 PM5/14/12
to native-cli...@googlegroups.com
You made me curious, so I started digging.

On a Chrome OS device, go to chrome://system and click on "Expand..." for ui_log.  You should see chrome's stdout, including NaCl output.

Note: the log isn't live, so you'll need to reload the page to see any updates.

Victor Hsieh

unread,
May 16, 2012, 1:28:47 AM5/16/12
to native-cli...@googlegroups.com
FYI, I finally found the log under /var/log/ui/ , and /home/chronos/log/chrome_* isn't the right place for my log.

And to set NACLVERBOSITY, I export the variable in /sbin/session_manager_setup.sh .

--
Reply all
Reply to author
Forward
0 new messages