Thanks for the files they were very useful.
I think I've got to the bottom of the problems, when you asked about memory the other day I should have given it more thought.
This certainly appears to be memory related but it easily fixed.
Once we fix the memory issues we can see if vm is working correctly in a shared serial senario, if not it can be addressed. I used the new memory reporting options that are standard in the next release to discover that all of your manual debug messages have nearly blown the 2048Kb limit on your arduino (see below).
You are so close to the limit that even in "release" (normal) mode your program soon starts to fail with a a few more serial.print("big string") calls.
Switching on vm debug currently has a fixed overhead of about 40 bytes + each breakpoint can consume further bytes.
A simple visual micro breakpoint with a "When Hit" message will consume 8 bytes REGARDLESS of the length of the text in the message. Adding {expressions} will consume a few bytes per expression.
In your sketch the code after the "hihi" message can causes extra memory bytes to be consumed by the arduino which, with debug enabled, can just push things over the limit and cause the arduino to crash.
Commenting out the following two unrelated but memory consuming lines in your program stopped the crash.
Serial.println("CRC is not valid!");
Serial.print("Device is not recognized");
Below are the memory reports for release and debug compilations...
Compiling release version of 'XNP_TEMP_V2' for 'Arduino Duemilanove w/ ATmega328'
Data: 1892 bytes (92.4% Full) Compiling debug version of 'XNP_TEMP_V2' for 'Arduino Duemilanove w/ ATmega328'
Data: 1932 bytes (94.3% Full) Solutions I can see two possible solutions
1)
Move all your "strings" to using PROGMEM memory(limited to 1kb I think)
OR
2)
Swap out all your Serial.print() manual debug stuff for Visual Micro breakpoints using the "When Hit" property for nicely formatted information messages.
Doing so should save you about 1800 bytes of memory out of 2048 Don't forget that you can add multiple {expressions} and/or text into the "When Hit" breakpoint property. So a single breakpoint might tell a big story.
You can also format your expressions as required.
Example:-
Function xyz has returned {myExpression,HEX} and x={expression1/expression2}