DB Error on contribution form unless signed in
From the error it looks like drupal username "test@example.com" already exists, when contribution form is submitted, it is trying to add a new drupal user and civicrm contact which is failing because of a duplicate.