03-05-2010 06:42 AM - edited 03-05-2010 06:44 AM
I have been developing an asp website for blackberry's (well any mobile device but I am trying to target blackberry's in particular).
I am developing the site using Visual Studio 2008 Team Suite on a Virtual PC running Windows XP SP3.
I downloaded and installed the Blackberry plugin v1.2 for Visual Studio and went to "Tools>Options>BlackBerry>Browser-Options to check that it had installed correctly.
I right click on my default.aspx page and choose browse with. In the browse with dialog I then choose the blackberry browser and click the Set as Default button. I then click cancel as I don't want to browse right at this moment.
Then when I run my website in debug mode, a start debugging dialog pops up with 3 check boxes.
Now this first time I run this it seems to take upwards of 30 minutes for the Device Simulator to load?
Is this normal? I have noticed that if I shut down the RIM.Net.Tools.ScriptHost.exe process in task manager then the Device Simulator works as soon as the process is stopped. This is very strange behavior. Obviously though then the debugging session doesn't start.
Then when I run my website again from visual studio this time everything everything runs much quicker now that the simulator is already running.
However sometimes something becomes corrupted and when I run my website the RIM.Net.Tools.ScriptHost.exe process is launched but it never receives any CPU time. Each consecutive time I try to launch my website in debug mode from Visual Studio another RIM.Net.Tools.ScriptHost.exe process appears in my Task manager processes. ( The first time I noticed this there were 7 of them) I have tested this several times an even left the machine running overnight to see if anything would happen. It didn't
Once this state has occurred it is impossible to fix without un-installing and reinstalling the blackberry plugin. This also requires that the VPC is rebooted. This can take upward of 30 minutes to complete at which point I have to then reload the Simulator which takes another 30 minutes to start.
So far I have had to do this 7 times which has lost me almost a full days work time just trying to get the simulator to perform properly.
Any suggestions how I can make it run properly/quicker?
03-08-2010 01:19 PM
In the v1.2 version of the BlackBerry Web Plug-in there was an issue with connectivity between the Simulator and the Scripthost that occured when running on Virtual PC. What happens is that the call back that is supposed to be returned from the Simulator when it is finished loading never reaches the ScriptHost (For some reason the VPC interrupts or loses this message) and therefore the debug process never finishes.
Your work around, IE killing the RIM.NET.Scripthost is the right solution. When you kill the scripthost the simulator finishes loading. The second time you run debug the scripthost detects that the Simulator is already running so it doesn't sit waiting for the callback.
The bad state you are getting into... where the scripthost is not receiving any CPU time is not something I am familiar with. You shouldn't have to reinstall the plug-in though. (That can't be very fun ) One thing you can try though.. is to reset the Simulator state. To do this follow these steps:
1) Shut down the simulator and script host.
2) Browse to the following directory: C:\Program Files\Research In Motion\BlackBerry VS9 Plugin 1.2\handheld\simulator_4_6_0
3) Remove all files matching the pattern. *.dmp
4) Restart your debugging session.
Doing the above steps resets the simulator state. This could clear the corruption that has occurred. If you still experience the issue let me know and we can try some other things.
Please note that this issue has been fixed in the next version of the Plug-in to be released soon.
Hopefully the work around will see you through until then.
03-25-2010 10:12 AM
I am experiencing the same issue that lain posted. My differences are that I am not on a VM and using Windows 7. I followed your advice about removing the .dmp files and restarted the debugger. Right now I am not getting the popup dialog with the 3 checkboxes although I have seen that in earlier debug sessions. When I do see that popup, I now that I will eventually see the simulator. One thing to note that may/may not be an issue: Last week I installed the Blackberry 8330-Verizon simulator. When viewing the simulators list in Visual studio, it notes that this simulator is unsupported so I kept the Blackberry 9000 as the default simulator. This may be about the time that I no longer will see the 3 checkbox dialog box nor the BB 9000 simulator when debugging but I cannot confirm this.