I have a function that runs after a form is submitted that creates an attachment to a post. However, after the form is submitted, the admin bar icons are replaced either by empty squares or odd characters. I have narrowed this down to the call to wp_insert_attachment.
When that fires off, and the page refreshes, the icons are garbled. If I go to another page, or reload the page, they're ok, but this is a bit disconcerting.
Any ideas why this might be happening? I'll be glad to provide some code, if that would help.