Program not closing completely

Discussion in 'Questions (Windows Mobile)' started by derez, Jul 26, 2009.

  1. derez

    derez Expert Licensed User

    Hi !
    Can anyone tell me what may be the reason for a program to leave a process runing after closing ?

    I see the attached list of processes, the small one of "Nivut" is a leftover from the program after running and closing, the larger is the program running (after re launching it).

    I checked that no files opened are left un-closed. any other reason ?
    (the total code is too large to attach)
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Maybe there is somewhere an endless loop (usually with DoEvents) ?
     
  3. derez

    derez Expert Licensed User

    I found the cause of the problem - but I can't understand the reason.
    I have a NUMUPDOWN control to select a number from 0 to 12.

    When I removed it and replaced it with combobox - the problem disappeared.

    The code for the control (from the design part):

    Code:
    addnum(portpanel,Hourupdn,95,160,50,2,12,255,255,255,True,True)@
    The problem exist even if I mark all the line codes refering to this control in the program.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Can you reproduce it with a simple program?
     
  5. derez

    derez Expert Licensed User

    Already tried it with no success...

    Can it be related to the size of the program ? or number of controls ? this was probably the last control I added.
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    The number of controls is only limited by the available memory. Are you running low on memory?
    This case is pretty strange. The OS should not allow more than one instance of the same application running.
    Can you somehow add some logging to your application (like writing some events to a file, or showing a message box)?
     
  7. derez

    derez Expert Licensed User

    The program size (exe file) is 1.2 MB, when running it uses 1.4 MB of memory while no map is loaded. There is still a lot of free memory .

    The problem happens even if I just launch the application and immediately turn it off (so it hasn't loaded any map except for the opening screen).

    I can add a sub to record anything within the cycle which is about 1-2 seconds, or during the app_start execution.

    Tell me what you want to catch, I have no idea.
     
    Last edited: Jul 27, 2009
  8. derez

    derez Expert Licensed User

    I reduced the program to the minimum - it has just one form, one control and two code lines:
    Code:
    #Region Initialization
    Sub app_start
    Sip(False)
    form2.Show 
    End Sub
    #End Region
    If I remove the SIP or the control - it does not have the problem.
     
  9. agraham

    agraham Expert Licensed User

    I AutoScaled Optimised compiled the application and tried it on my Axim X30 (WM2003SE), my iPAQ 214 (WM6.0) and my HTC Diamond (WM6.1). On none of them did I see this behaviour. Is there anything you need to do to provoke it?
     
  10. derez

    derez Expert Licensed User

    Mine is Mio 350 with WM5 , and it has Hebrew installed. The Hebrew has an effect on the IDE - I cannot edit the forms, just the code.

    To see the problem I just have to run the program, close the form and then look at the task manager to see if there is a process running.

    I tried it on WM6 emulator - it doesn't happen there.
     
    Last edited: Jul 28, 2009
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice