NACL Isn't Loading Modules? - c++

I'm wanting to start developing with NaCl / Pepper and I've gotten my build environment working great, but I can't seem to use any of the examples in my browser.
I've enabled Native Client, debugging, etc. But none of the modules seem to trigger the 'loaded' event, so I have no idea what is going on. This goes for .pexe and .nexe
I have the git here, and I honestly have no idea if there's a problem with my build process, my browser configuration, or what. Has anybody got a clue what's going on here?
This is the closest I've gotten to an error message, and apparently this is a chrome runtime flag, but running chrome with this flag has no effect, and now instead of working, no messages are output.

Try disabling debugging. Enabling debugging means that the NaCl loader will start the Native Client module, and then immediately suspend it and wait for the debugger to connect (then you can resume it with the debugger). So if you don't connect a debugger it will just wait forever. Also if you want to use the debugger on Windows, you need to disable Chrome's sandbox to allow the local TCP connection (for the record, the error message that gets cut off in the screen shot links to the following chrome bug)

Related

ChromeOS errors in GCP Logging

I'm seeing errors in StackDriver logging for my Compute instance. The logs are showing repeated issues every hour, creating a lot of noise. I have a Spring Boot API deployed in a container to a VM in Compute Engine using latest stable version of Container OS.
I'm relatively new to GCP and don't understand what is causing this issue, searches have come up empty so far.
Failed to call method: org.chromium.SessionManagerInterface.RetrieveActiveSessions: object_path= /org/chromium/SessionManager: org.freedesktop.DBus.Error.ServiceUnknown: The name org.chromium.SessionManager was not provided by any .service files
CallMethodAndBlockWithTimeout(...): Domain=dbus, Code=org.freedesktop.DBus.Error.ServiceUnknown, Message=The name org.chromium.SessionManager was not provided by any .service file
Error calling D-Bus proxy call to interface '/org/chromium/SessionManager': The name org.chromium.SessionManager was not provided by any .service files
The same 3 lines are repeating every hour. Anyone aware of what might be causing this or how to fix/suppress these?
I looked into this error, and as per my findings:
The error message that you have been receiving is a manifestation of Chrome to reliably exit shortly after starting up.
The UI’s job (which encompasses Chrome, the session_manager and the window manager) gets shut down by upstart because of it's thrashing, and when the test tries to restart the session_manager, the session_manager cannot communicate it over to the D-Bus.
The crash collection software in Container OS was originally for Chromebooks (The laptop using Chrome browser). So the code typically expects Chrome and some other related software on the system.
However, Container OS is a server OS, and does not have Chrome. So if Chrome is missing, the software will report some errors. They are actually not real failures, just some verbose error messages.
Overall, It is safe to ignore these logs and continue using your VM Instances.
Hope this helps.

Can't get breakpoints on XmlHttpRequest module working (Javascript engine/XHR requests)

IMPORTANT: Please do not give answers related to setting Javascript breakpoints in Google Chrome's DevTools debugger. I am trying to get breakpoints working in the C++ source code for the Chromium open source browser, not within the DevTools debugger.
I'm trying to get breakpoints working in the following module so I can't trap XHR requests made by Javascript code running in a page hosted by Chromium:
C:\Users\realsensible\Documents\chromium\src\third_party\WebKit\Source\core\xmlhttprequest
I set breakpoints on nearly every salient method in that module, but they are never hit. PhistucK pointed out that Chrome launches several processes and that it is very possible that the process executing the Javascript engine is not the same process as the main process that VS launched, thereby defeating breakpoints.
To try and test this, I launched Chrome.exe outside of VS. I then attempted to attach to every "chrome" process that I saw in the VS Attach to Process list box (I double-checked this process list by also listing the "chrome" processes in the Task Manager). There were 5 processes named "chrome"; the "main" chrome process and four child processes it launched. For each process I:
1) Attached to one of the chrome processes from VS with my breakpoints active on nearly all of the significant XmlHttpRequest methods.
2) (Re) loaded a web page that I know makes many XHR requests from Javascript.
3) Detached from the process
In all 5 trials none of the breakpoints were ever hit.
Note, I have set breakpoints on other modules in the project that are not related to the Javascript engine, and they do work. Apparently it's just the Javascript related code that I can't get breakpoints to trigger on.
Does anyone know how to get breakpoints working for the Javascript engine in Chromium?
The official instructions for debugging Chromium on Windows and specifically for setting breakpoints in renderer processes are here: https://www.chromium.org/developers/how-tos/debugging-on-windows#TOC-Multi-process-issues.
Which of those steps have you tried?
Also, just to clarify: the JavaScript engine is V8, and it's in <chromium>\src\v8. It doesn't know anything about XMLHttpRequest because that's not an ECMAScript feature. The code in <chromium>\src\third_party\WebKit\ is Blink, the HTML rendering engine. It contains the implementation of XHR (among many other things) and makes it available to JavaScript code via a layer called "bindings". (For setting breakpoints in renderer processes this distinction is irrelevant, as the procedure is always the same.)

Background Application in Windows IoT Core stops responding

I created a Background Application for Windows IoT Core on a Raspberry Pi 3. It is to become a hub application for a "smart home remote" (Nuimo) which uses BLE GATT to communicate.
The odd thing is that after a short time of running, the application simply stops responding and also drags Visual Studio along. VS then responds very slowly, has trouble detaching from the debugging process, shows "waiting for a background task to complete" dialog. However, no exceptions seem to be thrown (I enabled breaking on all exceptions). This makes it very difficult to find the cause of the problem.
I tried:
removing parts of the application
enabling breaking on all exceptions
combining multiple events coming from the BLE device to prevent flooding the application with events.
Unfortunately none of this helped.
Relevant documentation I read:
https://developer.microsoft.com/en-us/windows/iot/docs/backgroundapplications
https://learn.microsoft.com/en-us/windows/uwp/devices-sensors/bluetooth-dev-faq
https://learn.microsoft.com/en-us/windows/uwp/devices-sensors/gatt-client
https://learn.microsoft.com/en-us/windows/uwp/launch-resume/access-sensors-and-devices-from-a-background-task
Therefore I'm wondering whether anybody could share experience and hints where to look for the issue.
The code is at https://github.com/wind-rider/nuimo-hub and https://github.com/wind-rider/nuimo-windows (too much to post here since I don't know what part the issue is in)
Update: in the process explorer (via Windows Device Portal) I see that suddenly the memory used by the app drops when it stops responding, but its process (backgroundTaskHost.exe) is not immediately gone. It seems that somehow the Background App is unloaded, and that Visual Studio doesn't notice it since the host process is not shut down?
Now - how to know why the task is unloaded?
I assume that a Windows IoT Core background app is a special kind of background task that is not limited by the resource constraints applying to background tasks for "normal UWP apps"? Quote: "Background Applications are applications that have no direct UI. Once deployed and configured, these applications launch at machine startup and run continuously without any process lifetime management resource use limitations." (from https://developer.microsoft.com/en-us/windows/iot/docs/backgroundapplications)

Unable to debug glassware- Google glass

I am unable to debug glassware.I have tried the solution in this thread How to debug Google Glass GDK application?
This application uses voice commands, It gets installed but doesn't start the default activity.I am unable to find any classes to select in the run configurations.But messages are logged in Log cat.
Update:By activating DDMS I am able to debug.. But its strange that after few times of debugging, app stops working .. I dont get any exceptions logged.
You generally don't setup a default activity for Glass since there's not a way to "run" a specific application. You will likely want to set up a voice command and add a listener for that voice command. This is how your application will launch.
Even with no exceptions, could you post your LogCat output? This might help to shed a little more light on the issues you're having. I've been able to debug applications without any issues, so I know it's possible.

Windows Service stays in Starting state

I have a Windows service written in CPP that I start manually. The service starts up just fine and works ok. However we have recently noticed in the Windows Services GUI that the service shows in the Starting state. Upon examining the Event Viewer it clearly shows that the service has entered the Running state.
Anyone got any nuggets of gold on this one?
Thanks.
The problem turned out to be an unaccounted for call to the SCM to start the service. Deleted the line and the problem went away.