Today I finally solved a very strange bug in a Windows Mobile project Im currently working on. The bug would only show up on HTC devices, and not our HTC devices we had at our location. After the application was installed and the user started it, the whole device would freeze and reboot itself after a minute or so.
After some digging around, rebuilding, re-installing for way too many times; we found out that if the HTC TouchFlo 3D today plugin was enabled the device would crash. With that knowledge I was able to pin point the location of the failure which was that the installation DLL sends a WM_WININICHANGE message to refresh the PocketPc Today plugins.
As many sites and forum posts states, this is the only way to refresh the Today plugins.
::SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0xF2, 0);
Of course, this is not documented anywhere within MS documentation; and the documentation that exists states that the wParam isnt used at all (which in fact it is).
It seems that the HTC TouchFlo 3D isnt capable of handling the WM_WININICHANGE properly, and even just opening the calendar application after that sending that message will crash the device. So if your WindowsMobile application sends that message, I would advise you to look into this. Using the replacement message WM_SETTINGCHANGE does not change anything, the device will still crash.
One solution is to check if the HTC TouchFlo Today plugin is enabled, which can easily be retrived through the regkey "HKLM\Software\Microsoft\Today\Items\TouchFLO 3D\Enabled". If it is enabled, then do not send the WM_WININICHANGE message.
Monday, November 24, 2008
Tuesday, November 04, 2008
Trying out SimplifyMedia on Debian
I just noticed SimplifyMedia, and wanted to start sharing music from my home media server. The server is running Debian etch (4.0), and there is no debian repository for it (not surprinsgly as it is not open source). Here's a short description on how I got it to work on my Debian machine.
Startup

Gotchas/Problems
Impression
I was more impressed when reading about it than now after I've used it. The problems that it can not find all files, not able to play all files on a client; are a little too much for me to accept. But hopefully it will improve and become something great!
Startup
- Download the package from SimplifyMedia Downloads.
- Unpack the contents to a folder
tar zxfv simplifymedia.tar.gz - Install all necessary debian packages to get the SimplifyMedia server running
aptitude install libavahi-client3 libavahi-common3 libavahi-compat-libdnssd1 libavahi-core5 libc6 libdaemon0 libdbus-1-3 libfreetype6 libgcc1 libidn11 libpng12-0 libssl0.9.8 libstdc++6 libx11-6 libxau6 libxdmcp6 libxext6 zlib1g - First you need to register for an account, start the SimplifyMedia GUI and enter all needed details. After registering close the GUI.
simplifymedia/SimplifyMedia - Start the simplifymedia server using the newly created credentials
simplifyserver/simplifyserver.sh -n USER -l HomeTest -p PASSWD -s /home/media/Music/ - Now the server will start scanning your folders, and soon publish the location.

Gotchas/Problems
- I'm using the Winamp plugin on my Windows XP laptop, and many of the files does not played when selected. This is a major issue, but I'm hoping it will be fixed soon.
- The server did not find all my mp3's, it's currently missing 15% of my files.
- Even though I'm almost sitting next to the server (using Wlan) the playback stutters sometimes.
- There is no daemon support, so I need to fix something.
- The password is shown in clear text when doing a ps aux
Impression
I was more impressed when reading about it than now after I've used it. The problems that it can not find all files, not able to play all files on a client; are a little too much for me to accept. But hopefully it will improve and become something great!
Tuesday, July 15, 2008
Hudson now supports Team Foundation Server
Today I released a plugin that adds support for Microsoft's source control manager Team Foundation Server to Hudson (a continuous integration server). The plugin makes it possible to retrieve files and poll the server to detect changes on a project. If Hudson detects a change, a new build can be started automatically. Hudson will also display the changes that occurred in each build.

Configuring the plugin is easy as it is only requires the server URL and the path to the project. Hudson will take care of the rest, such as creating a workspace and work folder to store the files in.
The plugin supports both the command line client in the Team Explorer package from Microsoft and the command line client from Teamprise. An upcoming version of the plugin will add support for the opentf command line client.
So if you wanted to give Hudson a whirl but couldn't use it because you were using TFS, now is the chance to try it out! For more information about this plugin, check out the wiki. There are also several other .NET plugins for MSBuild, NAnt, NUnit, FxCop, StyleCop and compile warnings. I'm currently working on a plugin that integrates CodePlex into Hudson.
Update: The plugin can be downloaded here, or through the update manager in Hudson.

Configuring the plugin is easy as it is only requires the server URL and the path to the project. Hudson will take care of the rest, such as creating a workspace and work folder to store the files in.
The plugin supports both the command line client in the Team Explorer package from Microsoft and the command line client from Teamprise. An upcoming version of the plugin will add support for the opentf command line client.So if you wanted to give Hudson a whirl but couldn't use it because you were using TFS, now is the chance to try it out! For more information about this plugin, check out the wiki. There are also several other .NET plugins for MSBuild, NAnt, NUnit, FxCop, StyleCop and compile warnings. I'm currently working on a plugin that integrates CodePlex into Hudson.
Update: The plugin can be downloaded here, or through the update manager in Hudson.
Wednesday, May 28, 2008
Hudson adds support for StyleCop
Last week Microsoft released StyleCop (aka Microsoft Source Analysis for C#), a tool that analyzes C# code and enforces a certain code style (similar to Checkstyle). The tool will go through all C# source files and mark the code style violations. Now Hudson (a Continuous Integration server) together with the Violations plugin has added support for parsing the StyleCop XML report and display the results for every build.
The Violations plugin displays a trend graph over builds so it is real easy to see that your project is progressing in the right direction (decreasing the number of violations). As you can see the plugin also supports FxCop reports.

Each build will display a listing of the files that are violating the code style, and it is also possible to see the number of fixed (or introduced) violations for every build.

Clicking on a file will display excerpts from the C# code showing the violations.

Setup
Follow the guideline here after downloading StyleCop. Add the <Import Project="$(ProgramFiles)\MSBuild\Microsoft\SourceAnalysis\v4.2\Microsoft.SourceAnalysis.targets" /> to every csproj file that you are building within Hudson. When the VS project is built, StyleCop will store a file named StyleCopViolations.xml [Update, if you are using StyleCop 4.2 enter SourceAnalysisViolations.xml in the project folder. As of now, there is no way to store it elsewhere. The XML file contains all violations that were found in the Visual Studio project.
Hudson Configuration
To configure the violations plugin, enable the "Report violations" check box. If there are several VS projects in the build, you should use **/*/SourceAnalysisViolations.xml as it will find XML files in all sub folders.

After configuration, start a new build to analyze and display the StyleCop results in Hudson. To see a trend graph you need at least two successful builds.
Tips
The Violations plugin displays a trend graph over builds so it is real easy to see that your project is progressing in the right direction (decreasing the number of violations). As you can see the plugin also supports FxCop reports.

Each build will display a listing of the files that are violating the code style, and it is also possible to see the number of fixed (or introduced) violations for every build.

Clicking on a file will display excerpts from the C# code showing the violations.

Setup
Follow the guideline here after downloading StyleCop. Add the <Import Project="$(ProgramFiles)\MSBuild\Microsoft\SourceAnalysis\v4.2\Microsoft.SourceAnalysis.targets" /> to every csproj file that you are building within Hudson. When the VS project is built, StyleCop will store a file named StyleCopViolations.xml [Update, if you are using StyleCop 4.2 enter SourceAnalysisViolations.xml in the project folder. As of now, there is no way to store it elsewhere. The XML file contains all violations that were found in the Visual Studio project.
Hudson Configuration
To configure the violations plugin, enable the "Report violations" check box. If there are several VS projects in the build, you should use **/*/SourceAnalysisViolations.xml as it will find XML files in all sub folders.

After configuration, start a new build to analyze and display the StyleCop results in Hudson. To see a trend graph you need at least two successful builds.
Tips
- Do not enable all rules, choose those that are valid for your organization and make sense for you.
- Do not activate too many rules at first, as it probably will generate too many violations. Too many violations may be ignored by your co-workers, as it seems to be too much work to fix them all. When the most critical code style violations has been fixed, increase the number of rules.
Wednesday, May 21, 2008
Advance to the next Eclipse level by using the MouseFeed plugin
MouseFeed is the best eclipse plugin that I have tested/used in a while. The plugin will make you learn the eclipse keyboard shortcuts and thus be quicker when using Eclipse. If you are using the mouse or the menu bar to select an action, and there is a shortcut for the action, the shortcut will be displayed in a big message box.

The message box is not too big, but enough annoying so in order to never see it you are forced to learn the shortcuts. So you learn even if you don't want to!

The message box is not too big, but enough annoying so in order to never see it you are forced to learn the shortcuts. So you learn even if you don't want to!
Subscribe to:
Posts (Atom)
