PString is not significantly different from WString. It still allocates and deallocates memory (which is where the bug is). It is not a magical way to avoid using char arrays and doing the work yourself.
I'm sorry, but you are wrong. I can tell you confidently that PString does no explicit memory allocation at all (everything is on the stack). PString requires you to pass it a pointer to a char array in its constructor and that is the only memory it works with. How you create that char array is up to you. So yes, you could create that array on the heap, but that wouldn't make your statement about PString true, since PString has nothing to do with how you create your char array.
Using PString as a starting point, I added the functionality that String provides that is missing in PString. Now the only difference between String and my PString is in how you instantiate it. With PString, it is like this:
char str[32];
PString Str(str, 32);
The great thing about PString is that it is impossible to write past the end of your array (it just truncates), which is certainly not true if you do everything as C-style char array manipulations. I added a Serial.print("") to PString::write() which prints a warning when a string has been truncated (rather than just crashing). PString also is quite cheap (I believe it is 4-bytes per instance and it adds next to nothing additional to your program size). My point is that PString is a beautiful thing; everyone should absolutely be using it. C-style char array manipulations are cumbersome and dangerous and there is no reason to still be doing things that way (unless you really need that extra 4 bytes).
Very weird but in my uno code works perfect (more than 3 min already)
That is weird. Anyone care to verify my results with a Mega? Not that it matters since we already know what the problem is. I've been stable as can be now that I'm using PString.