I have just updated mu iPhone 3GS to iPhone OS 4.0 Beta 2 and I have noticed that some apps do not work (apps such as the camera app that always gets stuck while taking a photo, or after launching the settings app it suddenly closes).
If you have installed iPhone OS 4.0 Beta 1 on your iPhone I would recommend you stay at this version because the second beta release is very buggy.