.net mobile debugging issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SteepAndDeep
    New Member
    • Mar 2008
    • 4

    .net mobile debugging issue

    I am having trouble stopping debug mode within my mobile app using VS2008 in .net 2.0 mode. I am following MS best practtices as to how forms should be loaded using ShowDialog. Once a particualr form of mine is loaded and then I click the stop debugging button the app stays open (freezes) and then I need to do a soft reset on the device. This is how I am opening the form:

    frmLimnology frm = new frmLimnology(Si te, true);
    frm.Owner = this;
    frm.ShowDialog( );

    Anyone run into something similar?
    thanks
    Last edited by SteepAndDeep; Jul 21 '08, 06:39 PM. Reason: spelling
  • markmcgookin
    Recognized Expert Contributor
    • Dec 2006
    • 648

    #2
    Hi,

    Are the 2 variables you are passing the form supported in the constructor of the form? Are they valid and not null (or will it support nulls)

    try frm.Show() instead of showDialog() as that launches the form in Dialog style and halts the parent code until it is closed (unless you need this) if you have any more trouble post some more code off the form that you are having an issue with.

    Cheers,

    Mark

    Comment

    • SteepAndDeep
      New Member
      • Mar 2008
      • 4

      #3
      I am using a Symbol MC70 w/ windows Mobile 5.0 with a barcode scanner. It appears that VS cannot successfully stop debugging if a form is opened that is Enabled for barcode scanning. I am using Symbol's Dev kit 1.7. If I set the EnableScanner property to false I don't have any problems.

      Comment

      • markmcgookin
        Recognized Expert Contributor
        • Dec 2006
        • 648

        #4
        Originally posted by SteepAndDeep
        I am using a Symbol MC70 w/ windows Mobile 5.0 with a barcode scanner. It appears that VS cannot successfully stop debugging if a form is opened that is Enabled for barcode scanning. I am using Symbol's Dev kit 1.7. If I set the EnableScanner property to false I don't have any problems.
        We have developed applications using the barcode scanner on the MC70 and havent had any of those problems.... hmm.

        I'll try and dig out some code for you...

        Comment

        • SteepAndDeep
          New Member
          • Mar 2008
          • 4

          #5
          Setting the EnableScan property to true on the form activate method and set the EnableScan property to false on the deactivate method of the form seems to have resolved my issue. I tried this after receiving the following from motorla:

          When you click to Terminate Debugging in Visual Studio 2005 or Visual Studio 2008, it shuts down the communication between you host PC and the MC7004. This will not necessary terminate the program on the MC7004.

          The program on the MC7004 is relying on and requiring communication with the host PC to run stabily in debug mode. Taking that link away causes the program to become unstable. It can either error out and crash or lock up.

          Either way, because the program did not exit cleanly, it was not able to release the Scanning API resouces and shut down properly. Since the Scanning API resources were not released properly, another application more than likely will not be able to access the Scanning API again and claim those resouces. This can only be resovled with a warm or cold boot.

          Usually, when working with programs in Windows Mobile 5.0, it is best to put a Command Button that calls the program to Close and use that the end debugging. When the program closes, the debugging session will end.

          If the program for whatever reason does end up unstable and locking up, a warm or cold boot is required to fix the problem if the Scanning API resources were not released.

          Comment

          Working...