memory corruption WideCharToMultiByte

Recently I have been debugging some memory corruption that happened only after something executed 64 times, free complained that memory has been corrupted. Thus started the usual process of debugging. I started ApplicationVerifier and set the application and enabled the basic checks.

Application Verifier- Basic Checks

Application Verifier- Basic Checks

Soon my application started failing with access violation during startup, this happened even before I reached the code where memory was corrupted. Now I have two problems to investigate. This time I was crashing with call to WideCharToMultiByte. Started debugging to see exactly where it was failing:

  ntdll.dll!RtlUnicodeToUTF8N() Unknown
  KernelBase.dll!WideCharToMultiByte() Unknown
  vfbasics.dll!000007fef081cd0c() Unknown
> heapcorruption.exe!dllNotificationFunction(unsigned long NotificationReason, const _LDR_DLL_NOTIFICATION_DATA * NotificationData, void * Context) Line 64 C++
  ntdll.dll!string "Enabling heap debug options\n"() Unknown
  ntdll.dll!LdrpFindOrMapDll() Unknown
  ntdll.dll!LdrpLoadDll() Unknown
  ntdll.dll!LdrLoadDll() Unknown
  vfbasics.dll!000007fef08074de() Unknown
  KernelBase.dll!LoadLibraryExW() Unknown
  heapcorruption.exe!main() Line 94 C++
  heapcorruption.exe!invoke_main() Line 75 C++

[Read More]

over to hugo

Have been using octopress for a while now, but one thing i dont like is it’s reliance on ruby and time it takes to regenerate. Found that hugo is much better at these. Earlier site regeneration used to take ~5 minutes now happens in ~.2 seconds! Thus came the attraction of moving over- but as i found i am not the first to do so. I have read various posts and these are my steps to port it over:

The best part is no more rubydevkit and gem/bundler installs, what a big relief

[Read More]

C# yaml config

yaml is pretty good way to define config for an application rather than xml file. There are many libraries available for parsing yaml in C#. Two of the libraries i tried are: yamlconfig and sharpyaml. I liked the general concept behind yamlconfig but it wasn’t that good to just integrate and get started, so I chose sharpyaml over it. The thing I liked about sharpyaml is how easy it is to get it going, I did not had much success with yamlconfig. [Read More]


These days vim is preferred editor, and have started using it at work and home alike. That means my vimrc kept evolving and had to sync at both the sites. Thought would back it up some where I can handily find it when required.

This post has all the contents of my vimrc as backup

[Read More]

deleting all matching files recursively

I am a big fan of linux command line utils and work with many of those on windows as well. One of the commands I have started to like is xargs. I Like the way you could compose commands with pipes. Have tried using xargs on windows without much success.

One of the things I often use this is to clean temp directories of certain log files. My linux commands would have been:

find . -name "*.syslog" | xargs rm

Now I could have done this on windows as:

dir /s /b *.syslog | xargs rm

but xargs dies with environment being too large, instead had to switch to a less elegant solution:

forfiles /s /p . /M *.syslog /c "cmd /c rm @path"

[Read More]

controlling processor frequency

My aging MacBook Pro just got a new life (Apple replaced main-board due to graphics card issue), it worked out pretty good. Thought it is perhaps time to upgrade to Windows 10. Now that i have upgraded fans won’t stop whizzing, they were running at full speed even when the CPU is idling.

Seems like some sort of bug, didn’t wanted to mess around much hardware setups and did not wanted to install fan speed controlling utility as well. Found a cool setting that gave me what i wanted, thing is to clamp down frequency.

[Read More]

setting up ghpages on windows

Now that i have been using windows regularly thought of moving over the setup to my windows desktop. I was initially skeptical about how octopress and ruby will pan out. Here are my setup steps:

[Read More]

google drive quota

Google drive while a great service lacks the capability of showing the folder/file sizes. I guess it helps a lot to know the hogs, given you get only 15GB for free. I have been looking around for solution to this problem recently and found some discussion on Google Product Forum.

To cut the chase: you can browse to this link: and it should list the the files sorted by size. Well it is still missing the folder size information, but I feel better using this than some third party plugins.

[Read More]