E39 525 2001 dies upon start intermittently

Hi,
This is the first time I'm posting a question here and english is not my native language, so please beare with me.
I have a 2001, 525i which has been working flawlessly up until now.
Recently I've started to experience the following problem.
Sometimes when I start the engine, whenever I try to press the gas pedal it dies. If I on the other hand just leave it running on idle, there seems to be a slight variation in the RPM, but the engine does not stop. However, if I press the gas pedal it stops immedeately.
If I leave the car overnight, the problem is gone, and when I'm driving after a successfull start, there does not seem to be any problem with the power of the engine.
This has happened three times during a two week period, but as far as I remember, only when the motor has been warm. I haven't seen this when I have made a cold start.
Anyone got some ideas?
Best Regards //Jan Persson
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Crankcase position sensor?
Floyd
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Hi,
That was exactly my repairmans educated guess when I described my problems for him over the phone.
He will take a closer look at the car next friday, so we will see then.
Thanks for the help.
Best Regards //Jan Persson
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Motorsforum.com is a website by car enthusiasts for car enthusiasts. It is not affiliated with any of the car or spare part manufacturers or car dealers discussed here. All logos and trade names are the property of their respective owners.