My (mostly technical) blog

Blog moved to See you there!

If you are developing using Qt Creator for the MeeGo/Harmattan target, and upon launching the emulator for your application you get a message like this in the compiler window:

chmod: /opt/MeeGoApp/bin/MeeGoApp: No such file or directory
warning: aegisSessionOpen() - failed to open platsec device (ret=-1)
warning: aegisSessionOpen() - failed to open platsec device (ret=-1)
/opt/MeeGoApp/bin/MeeGoApp: not found
Killing remote process(es)...
Finished running remote process. Exit code was 127.

Make sure your project path has no spaces. For example C:\Qt Projects\MeeGoApp will fail. Notice the space in “Qt Projects”.

I came across some packages compiled for 32-bit, like Adobe Air that I needed to install on my 64-bit ubuntu, the following commands will fix the flags on the .deb package to force install it on a 64-bit system.

Note that it the converted package might install but not work correctly, so you are at luck whether it will work after that or not.

cd ~/Downloads
mkdir tmp
dpkg-deb -x package_i386.deb tmp
dpkg-deb --control package_i386.deb tmp/DEBIAN
sed -i "s/i386/all/" tmp/DEBIAN/
dpkg -b tmp package_64.deb
sudo dpkg -i package_64.deb


As I’m just trying out Microsoft SQL Server Azure Spatial, the following things need to be removed from any generated SQL script in order to make it run on SQL Server Azure as they are not supported:


I will keep this post updated as I discover new booby traps!
For a full list, check: 

Simply, if you get this error:

Microsoft Visual Studio
Could not load type 'Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemTypeDeniedOrNotExistException' from assembly 'Microsoft.TeamFoundation.WorkItemTracking.Client, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Then you probably installed Visual Studio, Visual Studio service pack, then the Team explorer. Doing it in that matter overwrites parts of Visual Studio SP hence giving you such errors.

The correct way to install would be:

  1. Visual Studio (Team Edition)
  2. Team Explorer
  3. Team Foundation 2008 October Power Tools
  4. Visual Studio 2008 Service Pack 1

To fix the error now, just re-install Visual Studio 2008 Service Pack 1.

As a reminder to myself, these are the steps to deploy an Qt application on the mobile phone.

  1. Project settings:
    1. Add new build configuration S60_5th_Edition_SDK_v1.0 (Qt 4.6.0) Release
    2. Change its Tool Chain to be WINSCW

    3. Add a new Run Setting (ProjectName in Symbian Emulator)
    4. Open the project file ( and add the following to enable network usage:
      symbian {
          TARGET.CAPABILITY = NetworkServices
  2. Mobile deployment:
    1. Without smart installer (Qt 4.6.0)
      • Open command prompt
      • Navigate to project path
      • Run:
        qmake && make release-gcce
      • Then run:
        make sis
      • You now have your .sis file ready. Make sure qt in already installed on the device
    2. With smart installer (Qt 4.6.2+) steps

I’ve run across this situation multiple times, where I have for example, an ID that I get in the code behind, and I want to append it to some href in the aspx, and each time I forget how to do it, so as a reminder for myself, here is how to do it and problems I ran into:

Assuming I have a property in the code behind that returns a GUID

protected Guid CustomerId {
 get { return new Guid(); }

And assuming I have a link in my aspx page that I want to append this property to, here is how to do it

<a href="upgrade.aspx?id=<%= CustomerId .ToString() %>">Upgrade</a>

Note that this will not work if you specify a runat=server to the href for any reason, for example. to show the link or hide it according to specific logic.

If you need to show and hide the link, you can enclose it in a place holder and access that placeholder from the code behind

<asp:PlaceHolder ID="UpdgradeLinkPlaceholder" runat="server">
<a href="upgrade.aspx?id=<%= CustomerId .ToString() %>">Upgrade</a>
Ahmed Sabbour's Facebook profile
May 2017
« Jul    


Error: Twitter did not respond. Please wait a few minutes and refresh this page.

RSS StackOverflow

  • Using QtMobility/Location, a Symbian Qt C++ application runs in emulator but not on device July 26, 2010
    I have a Symbian Qt C++ mobile application that runs fine in the emulator but when the application is compiled into a SIS file and installed on the phone, it installs successfully but does not start and fails silently without any message. The application uses QtMobility 1.0.1 to access the Location API.
  • Answer by sabbour for Using QtMobility/Location, a Symbian Qt C++ application runs in emulator but not on device July 26, 2010
    Found that the issue I'm facing is related to the following bug: which is caused by using Qt Mobility 1.0.1 APIs, which are linked against a library (LBT) that is not available on Symbian 5th edition devices (but will be available on Symbian^3) When I reverted to using the Qt Mobility 1.0.0 APIs on the devi […]
  • How can I create a generic UniqueValidationAttribute in C# and DataAnnotation? April 22, 2010
    I'm trying to create a UniqueAttribute using the System.ComponentModel.DataAnnotations.ValidationAttribute I want this to be generic as in I could pass the Linq DataContext, the table name, the field and validate if the incoming value is unique or not. Here is a non-compilable code fragment that I'm stuck at right now: using System; using System.Co […]
  • How can I POST data to a url using QNetworkAccessManager April 8, 2010
    I have a webservice that I need to POST some data to using Qt. I figured that I can use a QByteArray when POSTing to the web service. My question is, how can I format this array in order to be parsed correctly at the other end? This is the code I have so far: // Setup the webservice url QUrl serviceUrl = QUrl("http://myserver/myservice.asmx"); QByt […]
  • How can I get the selected VALUE out of a QCombobox? January 13, 2010
    In Qt, I can get the selected text of a QComboBox by using the combobox->currentText() method. How can I get the selected value? I checked over for help but I couldn't find a method currentData() which I expected to find. I could only find combobox->currentIndex() Is there a smarter way to do it other tha […]

Recently bookmarked