[RESOLVED] Strings cause arduino to crash :(

Strings cause arduino to crash :frowning:

@bratan: Did you read this?

Read this before posting a programming question

In particular:

Warning: In versions of the Arduino IDE up to 1.0.1 (at least) there is a bug in dynamic memory allocation. This affects both malloc/free and new/delete. In particular it also affects the String class, which uses dynamic memory allocation. This is discussed in this forum thread. That thread mentions a work-around (replacement free() function) until the inbuilt libraries are updated.

Please note that, at present, the String library has bugs as discussed here and here.

In particular, the dynamic memory allocation used by the String class may fail and cause random crashes.

I recommend reworking your code to manage without String. Use C-style strings instead (strcpy, strcat, strcmp, etc.).