hmm.. think found an old resurrected bug with rc2 while testing this,anyway
you have 2 problems.
first, it seems that something is preventing kmeleon from existing normally
this part of the restart script isn't closing your kmeleon
WinClose("[CLASS:KMeleon Browser Window]", "")
this is a normal close(non-force)
then when this fails to function.. this part terminates(kills) kmeleon:
ProcessClose("k-meleon.exe",1)
but i only added the kill command for when there are too many kmeleon windows(which is a rare case) with 7 or more kmeleon windows.
that means that 6 of the normal calls to end kmeleon failed to close it and the kill command had to jump in.
this could be caused by a plugin that prevents kmeleon from closing properly.
to test this:
try opening kmeleon with one tab(bblank page) and close it from the close button and check in the taskmanager if km is still running.
if a plugin is loaded with kmeleon, regardless of a website is calling it or not.. it may prevent normal close.
if a badsite installed this plugin, it might have caused this problem.. installing on top might not fix it because, the malware plugin will still be there.. also th plugin may not be in kmeleon's plugins folder.. it could be loaded from the registry(like java plugins or quicktime 7+ plugins).. and the plugin may also be in firefox plugins folder because kmeleon automatically reads some plugins from firefox.
first open help> about plugins.. and check for any fishy plugin, something that you do not know of that you didn't install.
also check if you've upgraded a plugin recently or installed new plugin.. this too might be a cause.
if nothing out of the ordinary in plugins.. try a clean install(backup your profile folder first.. this way you won't need to customise again) and start with a fresh new default profile. see if you have the same problem.. if not then it could have been a corrupted kmeleon component or remnant file causing the problem.
problem 2 is sessions plugin.. it's not able to either restore previous session or continue normally.. this can also be caused by bad plugin, an after affect of problem 1.
i hope you find the cause which is probably due to a malware or corrupted file