Monday, June 1, 2015

IBM MobileFirst Platform Foundation (Worklight) - nodename nor servname provided or not known (some ip)

Hey there,

Due to Mac@IBM initiative, I've moved my primary workstation to 2014 MacBook Pro (15') with an OSX Yosemite 10.10.3.

Being a Mobile Architect in IBM Mobile Center of Competency, I also do a lot of work with IBM MobileFirst Platform Foundation (aka Worklight).
In one of my current projects (developed with IBM MFPF) I got the error in the title when building an iPad environment.
Looking in /etc/hosts and /private/etc/hosts the mappings were correct. The solution was to change the host name using the scutil command:
scutil --set HostName "localhost" 

Happy IMF coding! :)

Friday, November 28, 2014

Intel® RealSense™ AppChallenge - Phase 2 - Demo 1


This week I got the Intel® RealSense™ Camera and I've started creating the Visual Studio extension for the Intel® RealSense™ AppChallange.

First, I've installed the Intel® RealSense™ SDK which has some very nice samples for both C++ and C#.
Then I've installed Visual Studio 2013 Community edition (Thank you Microsoft!) and then VS 2013 SDK.

All tools are now in place!

The Natural Interaction Visual Studio (2013) extension is designed to be initialized when a solution is loaded - here the devices are discovered and entities initialized (e.g. SpeechRecognition). Once this happens, the user can go to the menu TOOLS and then Options... to view the Natural Interaction extension settings. In my case, I used a small vocabulary file for the "Start debugging" and "Stop debugging" sentences.

After some hours of coding, I've come to the following (promising) result:

This is Demo 1 - more commands (like Step into, step out) will follow. Also, the gestures are to be expected in the near future... but that is for another post!

Have fun!

Monday, November 24, 2014

Intel® RealSense™ AppChallenge - Phase 2


Last week I was nominated as a Phase 2 finalist for Intel® RealSense™ AppChallenge to develop a Natural Interaction Visual Studio extension.
This week I will get the Dev kit that contains the Intel® RealSense™ 3D camera and I will start developing the VS extension.

I'll post here how the project gos!

Stay tuned!

Tuesday, October 15, 2013

AccessViolationException: Attempted to read or write protected memory - COM libraries


In one of my project I have a .NET library that is registered to COM in order to be used from a C++ library.
Due to some error, I had to change the interface of an type; I added a new property ID and I set the type of this ID property to be int.
Once testing was done, I deployed the library in production and I started to see the following error:
Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. T
his is often an indication that other memory is corrupt.
   at System.String.wstrcpy(Char* dmem, Char* smem, Int32 charCount)
   at System.String.CtorCharPtrStartLength(Char* ptr, Int32 startIndex, Int32 length)
   at System.StubHelpers.BSTRMarshaler.ConvertToManaged(IntPtr bstr)

The source of this error was pretty obvious (since the modification I stated earlier was the only one).
I remembered that the type in which I've added the new property ID is mapped to an Entity Framework type (using AutoMapper) and in this entity the ID was of type decimal. After changing the type from int to decimal, the AccessViolationException was gone...