Game of Thrones CGI

Während ich darauf gewartet habe, dass sich mein XCode deinstalliert, bin ich über folgende Video gestolpert. Es zeigt die Unterschiede zwischen den real gedrehten und den finalen, mit Computer nachbearbeiteten Szenen der Serie Game of Thrones.

YouTube Preview Image

First CodeProject Article

This week I published my first article at www.codeproject.com. (Now I’m a real programmer ;) ) It’s about playing audio files in WPF. Go check it out here:

http://www.codeproject.com/KB/audio-video/wpfaudioplayer.aspx

2.August 2011

Reporting a bug annoyance

2011 02 Aug

Today’s annoyance comes from TweetDeck – an application I use to follow my Facebook contacts. So, I clicked the wrong button and got this screen:

Closing a column in TweetDeck with only one column available

Well, that’s well designed. The close button for this rather destructive dialog box is outside the visible area. And there’s absolutely no other way to close this dialog box (ESC doesn’t work). The only way to solve this problem is to quit the application. I mean: Seriously???

Ok, nobody is perfect. So I went to the TweetDeck homepage and wanted to contact the author/support – but there is no way to contact any support directly. I absolutely hate software products where you can’t tell the authors that they screwed up things.

28.Juli 2011

Hädrönn Cjölidder

Build your own electron collider the Ikea way
26.Juli 2011

Enterprise

Enterprise Crew beim Shuttle Launch
21.Juli 2011

Sent Items in Outlook 2011 with Exchange and POP3

Today I needed to resend an email I sent a day before – using Outlook 2011 for Mac. It took a while to compose this email so I got quite scared when I looked at my “Sent Items” folder and the mail wasn’t there.

My situation: I’m using an Exchange mailbox is primary mailbox and have a POP3 account for my university email address. The latter I only use to send emails (as the actual university email address is just a forwarding). If you have a similar setup and problem, read on.

On Outlook for Windows, sending an email through this email address/account, moves the sent email to the main “Sent Items” folder – which at the same time is the “Sent Items” folder for my Exchange mailbox.

Not so on Outlook for Mac. Here we have a separate “Sent Items” folder for POP3 accounts (called “On my computer”). I had this folder disabled since (I thought) I only use my Exchange mailbox. The option hide/show this folder is in the preferences under “General”. (I only have the German version of Outlook, so screenshots are in German only; sorry for that.)

Option to show or hide the "On my computer" folder(s).
Option to show or hide the "On my computer" folder(s).

Now the “On my computer” folder showed up in my “Sent Items” folder and there my mails were.

Sent items on my computer folder
Sent items on my computer folder

Now, the quest at hand was: How do I get my sent mails into my “Sent Items” Exchange folder. The solution: Create a rule for this.

So, I went to “Settings” –> “Rules” and created a new rule in the “Outgoing” rules section.

Creating a local rule
Creating a local rule

Here you create a rule with:

  • Condition: Account is YourPop3Account
  • Execute: Move message to “Sent Items (Exchange)”

Leave the rest as it is and hit “OK”. Now try to send an email from your POP3 account and, voilà, the email you just sent should appear in your Exchange’s “Sent Items” folder.

20.Juli 2011

Standards

Standards

(via xkcd)

13.Juli 2011

Hunting DLL loading errors

Today I tried the software I’ve been writing on another computer – and it immediately crashed. I got this error message:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly ‘TrackerInterface-Mixed-Full.dll’ or one of its dependencies. The specified module could not be found.

Here, it tells me that my DLL “TrackerInterface-Mixed-Full.dll” could not be loaded. The first thing I thought was that the application couldn’t locate this DLL – because of the FileNotFoundException. Unfortunately this wasn’t the problem.

So I figured “or one of its dependencies” was the real problem. However, the error message doesn’t tell you what dependency (DLL) is actually missing – even when debugging.

So, I did some searching and found the Assembly Binding Log Viewer (or “Fusion Log Viewer”) which comes with Visual Studio. Unfortunately it didn’t do what I needed. It seems that this is actually more for .NET assemblies rather than native DLLs. (You need to run it with Adminstrator rights; otherwise it won’t work. Just in case you’ll ever need it.)

After some more searching I found a tool called Dependency Walker. And that’s exactly what did the trick. So I opened “TrackerInterface-Mixed-Full.dll” with it and got the following result:

Dependency Walker output with missing DLLs

Here you have my “TrackerInterface-Mixed-Full.dll” at the top of the tree and its dependencies listed below it. For one, you can see immediately that the file “QTCORED4.DLL” is missing. But you can also see that one dependency (“MAPPARSERD1.DLL”) is missing some dependencies as well. (Fortunately, Dependency Walker automatically expands all dependencies that again have missing dependencies.)

I hope this helps in case you’re running into this problem yourself.

Note: The part “The specified module could not be found.” of the error message indicates some missing DLLs. There can be other reasons for getting a “Could not load file or assembly ‘Assembly.dll’ or one of its dependencies.” which then have other texts after this one.

Note 2: This only seems to happen when using native DLLs from .NET applications/assemblies.

27.Juni 2011

WPF crashes on exit

So, I’m working on my WPF application and everything runs fine, but when I close it, I get this error message (together with this doesn’t-say-me-anything stacktrace):

[System.ComponentModel.Win32Exception]	{"Invalid window handle"}
  WindowsBase.dll!MS.Win32.HwndWrapper.DestroyWindow(object args) + 0x11a bytes
  WindowsBase.dll!MS.Win32.HwndWrapper.Dispose(bool disposing, bool isHwndBeingDestroyed) + 0x8c bytes
  WindowsBase.dll!MS.Win32.HwndWrapper.Dispose() + 0x14 bytes
  PresentationCore.dll!System.Windows.Interop.HwndSource.Dispose(bool disposing) + 0x1f6 bytes
  PresentationCore.dll!System.Windows.Interop.HwndSource.WeakEventDispatcherShutdown.OnShutdownFinished(object sender, System.EventArgs e) + 0x33 bytes
  WindowsBase.dll!System.Windows.Threading.Dispatcher.ShutdownImplInSecurityContext(object state) + 0x49 bytes
  mscorlib.dll!System.Threading.ExecutionContext.runTryCode(object userData) + 0x51 bytes
  mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x6a bytes
  mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool ignoreSyncCtx) + 0x7e bytes
  mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x2c bytes
  WindowsBase.dll!System.Windows.Threading.Dispatcher.ShutdownImpl() + 0x72 bytes
  WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) + 0xe1 bytes
  WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame) + 0x49 bytes
  WindowsBase.dll!System.Windows.Threading.Dispatcher.Run() + 0x4c bytes
  PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore) + 0x17 bytes
  PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) + 0x6f bytes
  PresentationFramework.dll!System.Windows.Application.Run(System.Windows.Window window) + 0x26 bytes
  PresentationFramework.dll!System.Windows.Application.Run() + 0x1b bytes
  GuideDock.exe!GuideDock.App.Main() + 0x94 bytes
  mscoreei.dll!__CorExeMain@0()  + 0x38 bytes
  mscoree.dll!748c7f16()
  [Frames below may be incorrect and/or missing, no symbols loaded for mscoree.dll]
  mscoree.dll!748c4de3()
  kernel32.dll!@BaseThreadInitThunk@12()  + 0x12 bytes
  ntdll.dll!___RtlUserThreadStart@8()  + 0x27 bytes
  ntdll.dll!__RtlUserThreadStart@8()  + 0x1b bytes

This problem seemed to appear only randomly until I figured it out today. The problem can be reproduce by this XAML/C# code (together with a WPF window):

1
2
3
4
5
6
7
8
9
10
11
12
13
public partial class MainWindow : Window {
  public MainWindow() {
    InitializeComponent();
 
    this.m_touchCanvas.MouseLeave += (s, e) => CrashAppOnClose();
  }
 
  private void CrashAppOnClose() {
    Window wnd = Window.GetWindow(this.m_touchCanvas);
    // This line throws a Win32Exception with "Ivalid window handle".
    wnd.PointToScreen(new Point());
  }
}

Now, when the user closes the window (without using the mouse; eg. with Alt+F4) while the mouse is still in the window, the call to wnd.PointToScreen() (line 11) results in the Win32Exception above. Unfortunately, the doesn’t seem to be any way to check whether this exception will be thrown – I already tried Window.IsLoaded as suggested here with no luck.

What’s more annoying is that the call to PointToScreen() does not appear in the stacktrace. I can’t even imaging how this is possible. That’s why it took me ages to figure this one out.

Btw: I’d like to send a bug report to Microsoft but they haven’t got my account working in three months.

Download the example project

Updates:

  • The problem only arises on 64-bit Windows system. A correct exception is thrown on 32-bit systems.
  • On 64-bit systems the Win32Exception can’t be caught in a try ... catch block. Both PointToScreen() and the point where the exception is thrown are on the same thread.
  • I’ve managed to create a bug report for this problem.

Solution/Workaround:
Given the 32-bit error message – which reads “This Visual is not connected to a PresentationSource.” – I found a way to circumvent this problem. You need to use PresentationSource.FromVisual like this:

private void CrashAppOnClose() {
  Window wnd = Window.GetWindow(this.m_touchCanvas);
  if (PresentationSource.FromVisual(wnd) != null) {
    wnd.PointToScreen(new Point());
  }
}
26.Juni 2011

Happy Birthday

Birthday Cake by Will Clayton

Happy Birthday, Blog. Jaa, genau heute von fünf Jahren gab es auf diesem Blog den ersten Blog-Eintrag. Seit dem haben genau 673 Einträge das Licht der Welt erblickt. Das sind 134,6 Einträge pro Jahr oder 0,37 Einträge pro Tag. Aber wen interessiert das? Jetzt wird erst mal gefeiert. :D

24.Juni 2011

Watson Fail

Watson fails to recognize a simple Linux command

20.Juni 2011

iDad

iDad.jpg

(via Cult of Mac)

16.Juni 2011

Microsoft Update für Mac

Icon für Microsoft AutoUpdate

Auch auf dem Mac bietet Microsoft für seine Produkte – z.B. Office 2011 – ein Update-Programm an: “Microsoft AutoUpdate” (offizielle Schreibweise). Wer danach jedoch in seinem Anwendungen-Ordner sucht, wird nicht fündig. Statt dessen findet man das Programm im Hilfe-Menü unter “Auf Updates überprüfen”.

Direkt-Link zur Microsoft Hilfe

9.Juni 2011

Chuck Norris and the OSI network stack


Chuck Norris has only one OSI level – Physical

(Hint)

1.Juni 2011

So hätte Apple den C64 vorgestellt

YouTube Preview Image