Archive for December, 2008

Published by Roman on 23 Dec 2008

ProcessSnapshot to take a snapshot of process modules, threads, stacks and performance

While troubleshooting released application on remote production site, it is very useful to grasp a state of the process for further analysis. There are several scenarios in which the following information about process state is helpful:

  • modules (DLLs) loaded into process and their versions
  • threads and their call stacks
  • process and thread performance

An utility ProcessSnapshot takes advantage of Debugging Tools API (dbghelp.dll – note the dialog also displays DLL version in the right bottom corner) and writes this helpful information to text file and it can also take a sequence of the snapshots to compare thread performance and/or stacks and check the difference.

The generated file is in the directory of the utility application and looks like:

Snapshot
  System Time: 10/14/2008 8:46:33 PM
  Local Time: 10/14/2008 11:46:33 PM

Performance
  Creation System Time: 10/14/2008 8:46:28 PM
  Kernel Time: 0.094 s
  User Time: 0.031 s

Modules

  Module: ProcessSnapshot.exe @00400000
    Base Address: 0x00400000
    Base Size: 0x0005b000 (372736)
    Name: ProcessSnapshot.exe
    Path: D:\Projects\Utilities\ProcessSnapshot\Release\ProcessSnapshot.exe
    Product Version: 1.0.0.1
    File Version: 1.0.0.125

  Module: ntdll.dll @7c900000
    Base Address: 0x7c900000
    Base Size: 0x000af000 (716800)
    Name: ntdll.dll
    Path: C:\WINDOWS\system32\ntdll.dll
    Product Version: 5.1.2600.5512
    File Version: 5.1.2600.5512
[...]

Threads

  Thread: 3824
    Base Priority: 8
    Creation System Time: 10/14/2008 8:46:57 PM
    Kernel Time: 0.063 s
    User Time: 0.031 s
    Call Stack
      ntdll!7c90e4f4 KiFastSystemCallRet (+ 0) @7c900000
      USER32!7e4249c4 GetCursorFrameInfo (+ 460) @7e410000
      USER32!7e424a06 DialogBoxIndirectParamAorW (+ 54) @7e410000
      USER32!7e4247ea DialogBoxParamW (+ 63) @7e410000
      ProcessSnapshot!00403f45 ATL::CDialogImpl<CMainDialog,ATL::CWindow>::DoModal (+ 67) [c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\atlwin.h, 3478] (+ 28) @00400000
      ProcessSnapshot!00403b6f CProcessSnapshotModule::RunMessageLoop (+ 74) [d:\projects\utilities\processsnapshot\processsnapshot.cpp, 67] (+ 0) @00400000
      ProcessSnapshot!004049b9 ATL::CAtlExeModuleT<CProcessSnapshotModule>::Run (+ 17) [c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\atlbase.h, 3552] (+ 0) @00400000
      ProcessSnapshot!004041c3 ATL::CAtlExeModuleT<CProcessSnapshotModule>::WinMain (+ 48) [c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\atlbase.h, 3364] (+ 5) @00400000
      ProcessSnapshot!00434477 wWinMain (+ 5) [*d:\projects\utilities\processsnapshot\release\processsnapshot.inj:5, 14] (+ 0) @00400000
      ProcessSnapshot!00415058 __tmainCRTStartup (+ 274) [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c, 263] (+ 27) @00400000
      !00360033

Continue Reading »

Published by Roman on 14 Dec 2008

Skype Beta

I recently advised to take a look at new beta version of Skype software, which I have to use nevertheless I would prefer Jabber for instant messaging if I would be free to choose. I was told that finally multiple chats are hosted in a single window and it is extremely convenient. While this looks hardly an advantage particularly to me, I still wanted to take a look at new fresh better Skype out there.

I am still very much disappointed by the trend of rewriting GUI. For god sake, who the hell needs that every single vendor mimic Vista’s GUI elements on his own? Why the hell would I want Vista buttons on Windows XP? They are still there as if there is no way to put an extra button to switch between compact and full view.

It may look that it is not worth whining around as this is a minor thing just to make it this way and not the other. Here is the Skype team achievement in imitating Vista interface on XP:

Window’s non-client area sometimes is calculating incorrectly and layout is updated so that menu has an extra empty line. The company massively invests in custom GUI that comes out crappy going out of uniform OS look and in additionally it is still buggy after passing QA. Yes, it is still a beta but it still gives a great idea about how things are cooked: a lot of work behind the scene and bugs are still here as a result.

Improved usability is questionable to say the least. A quick glance revealed issues:

  • area for typing in chat text is surprisingly small, even on expanded large enough window
  • roster has persistent useless (for me) items which were optional previously
  • roster has another GUI glitch most likely caused by new look
  • groups reworked as a dropdown list and if previously I could – this was very useful – multiselect groups to be visible by clicking them with a Control key being hold, this is not an option anymore, thanks for that

Update: luckily there is “Classic Windows” option!

Published by Roman on 05 Dec 2008

Microsoft Visual Studio has encountered an internal error.

A picture for relaxation:

It is probably a fresh bug there as it seems to be happening far more frequently with version 2008 (with ot without SP1) as compared to 2005. Luckily it has no effect to code being written, the problem clearly relates to debugger. At some point there is a crash, though which the IDE perfectly survives but longer can start a new debugging session until IDE is entirely restarted.

Published by Roman on 02 Dec 2008

Multichannel audio recording

There has been recently an interesting post “Problem playing back multi-channel wave file under vista” on DirectShow Development forum about certain hardware that is capable of recording 64 channels of audio in 24-bit per sample PCM quality, with a sample recorded .WAV file posted.

I was curious what kind of hardware implements such recording. Google suggests it could be PCM H64 multichannel system from Sadie, UK.

This is definitely an interesting piece of hardware which can fill normally video’s bandwidth with audio only data. BTW, some useful related C++/DirectShow code is here on new Assembla’s web itnerface into subversion repository.