memory leak in windows compact 7

  • Hello,


    we found a memory leak in the OS of windows compact 7. If we change very often the system time with the function:


    [DllImport("coredll.dll", SetLastError = true)]
    private static extern bool SetLocalTime(ref SYSTEMDATETIME lpSystemTime);


    the program memory will decrease until to hang up the software. We found a entry in the internet about this problem:


    https://social.msdn.microsoft.…-wec7?forum=winembmngdapp


    I have searched through the wohle QFEs of microsoft, but I can't find any entries of this problem.
    Now my questions:
    Do you know this problem?
    How we can solve it? May be you have a workaround for this?

  • Hello,


    i can't believe it but it seems to be true i test it under CE6/EC7 with/without Explorer and only under EC7 without Explorer the programm memory increases (see sample below)!


    I saw starting the Explorer frees the memory. So as a quick workaround you may start Explorer in background, check when memory is freed (takes 5-10s) and finally kill the Explorer. Repeat this procedure every time when memory exceeds a special value.


    Furthermore i will check if there exists already a solution.


    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

    Edited once, last by fs-support_ZU ().

  • Hello,


    your workaround for a quick solution works and we had the same idea before. Thanks.


    But what about your next step to solve this problems?
    Do you think, that microsoft make a patch of CE7?

  • Hello,

    Quote

    But what about your next step to solve this problems?
    Do you think, that microsoft make a patch of CE7?


    We will place a support request to Microsoft. I really wonder why nobody did this until now!

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,
    i got respond from Microsoft. Entry in datasysc.db causes this behaviour:

    Code
    1. Record :
    2. Field : 0001001f : "repllog.exe"
    3. Field : 0002001f : "AppRunAfterTimeChange"
    4. Field : 00030013 : 1
    5. End


    Each call of SetSystemTime/SetLaocalTime launchs repllog.exe. That is the reason for the leak. Usually Explorer (detailed ShellAPI) has a mechanism to control that only one instance is running the next passes only the parameters to the first and terminate.


    I got also different advises for a workaround from Microsoft. I will try to customize the db without the corresponding entries.
    I ask Microsoft again if they plan a resolution, because for my understanding erverbody who is use WEC7 with ActiveSync and without Explorer may run into this problem - right?
    I will keep you informed.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

    Edited 3 times, last by fs-support_ZU ().

  • I got further information from Microsoft. They will provide me more details asp in how they proceed with this issue.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

    Edited once, last by fs-support_ZU ().

  • Hello,
    we got following answer from MS: "Das Verhalten ist by-design (= repllog.exe benötigt die Shell API) und wird nicht geändert" (This behavior is by-design (means repllog.exe depends on Shell API) and would not be changed).


    So we have to use one of the workarounds:
    - modify datasysc.db, as outlinde above -> may be overwtitten from coming QFEs:(
    - kill "repllog" from time to time -> overhead and not very genteel:(
    - Remove Active Syc when switch off Explorer (design)
    - Call "ShellRegisterCallbacks()" (refer msdn), from your app or an own shell, i would prefer this technique. Shell samples will be found under "%_WINCEROOT%\Public\Wceshellfe\" or "%_WINCEROOT%\public\shell\oak\". Note, even empty callbacks resolve the problem! But this is not genteel:).
    Calling "ShellRegisterCallbacks()" force IsAPIReady to return true which repllog waits for!


    I will attach a sample which we use under WEC2013.

    Files

    • FSMinShell.zip

      (132.19 kB, downloaded 871 times, last: )

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

    Edited 6 times, last by fs-support_ZU ().