NAV Classic Client crash

sresre Member Posts: 62
Hi all,

I've got a problem with a special form and I'm not able to solve it. I've created a dialog for our sales managers which allows them to see "all" relevant information on one screen. Technicalliy, I'm using about 50 fields which have global variables as source expression. Then there is a central function which calls the individual functions in a codeunit which do the actual calculation. I'm not able to use flowfields since there are certain criteria which play a role and can't be expressed as filters. That's why there are a lot of loops in those functions as well to count the relevant records.

My problem is that the client completely crashed from time to time - so the only option is to send a report to Microsoft ;-) I've searched this forum for similar problems. I didn't find much but the essence is that there might be some endless loops. I've checked my code and I'm not able to find any. Furthermore the problem doesn't occur on a regular basis. So e.g. after it happend to one user s/he can restart the session and do exactly the same thing and it will work. If there were an endless loop it should crash always, right? So I was thinking if this could have something to do with memory allocation or something like that. But I don't know how to find out or where to start.

Did anyone encounter similar problems and find a solution? Or can anyone give me a hint how to analyse what's happening? I think the client monitor is not an option as the problem might occur after one our or half a day.

Thanks in advance
Sascha

Comments

  • AndwianAndwian Member Posts: 627
    What version and Build No. did you use?
    Please see if there are any platform update for you, and let's pray it could solve your problem.
    Regards,
    Andwian
  • sresre Member Posts: 62
    Andwian wrote:
    What version and Build No. did you use?

    I had that in mind forgot to write it down: We've been on NAV4 SP3 before and upgraded (just technically) to NAV2009 SP1 (6.00.29626).

    But the point is: We have had this problem since a while. We've been using NAV4 SP3 and made sure to use all available rollups and updates but had the problem on Win XP and Vista (so here again with diffrent rollups) and even with the latest build. But this didn't solve the problem. That's why I'm not too optimistic that this could be solved with the latest build of NAV2009SP1 (not sure if that's the version we're using or not).

    But I think I'll give it a try anyhow and check for the latest version ...

    Thanks
    Sascha
  • AndwianAndwian Member Posts: 627
    From my point of view, it could be the issue of the platform, instead of your code.

    Unfortunately, if we could not identify the point where the crash occur, it would be hard for us. The best try is to report it to Microsoft, attach it with the Error report from Event Viewer, and they will suggest you the platform version, or maybe create a new one. That one that I ever done previously.

    Good luck!
    Regards,
    Andwian
  • vaprogvaprog Member Posts: 1,139
    sre, are you using RecordRefs in your code?

    If yes try to not reuse RecordRef variables in a loop, but move the code to a function and use a local RecordRef variable there. And always use close on any RecerdRef for which you used the Open function.

    There are memory allocation issues with RecordRefs, which are partly resolved by the technic above. These issues might lead to a proper out of memory error message, but quite frequently cause the client to crash without warning. You may monitor the client's memory usage.
  • sresre Member Posts: 62
    Thanks Andwian and vaprog for your proposals.

    @Andwian: I'll try to check the event viewer and see if there's any use of what I'll find there.
    @vaprog: I've checked my code but unfortunatelly I'm not using any RecordRef in the objects that are used there.

    Thanks so far
    Sascha
  • bbrownbbrown Member Posts: 3,268
    See Tech Article 982154 on PartnerSource and request build 30863
    There are no bugs - only undocumented features.
  • sresre Member Posts: 62
    bbrown wrote:
    See Tech Article 982154 on PartnerSource and request build 30863

    Hey, that's a great hint ... I didn't know why I had that idea myself :-) Maybe I'm just too focused on my own development instead of available hotfixes - but it's quite an impressive list :-)

    Thanks!
  • sresre Member Posts: 62
    Just a short update: We've applied the hot fixes which appeared appropriate (build 6.00.30212 and 6.00.30863) without any effect.

    Any comments? :-)
  • jordi79jordi79 Member Posts: 273
    is there an error message from the crash? normally there will be an error message or an operating system error.
  • sresre Member Posts: 62
    jordi79 wrote:
    is there an error message from the crash? normally there will be an error message or an operating system error.

    Hey Jordi,

    what kind of message do you mean? When the client crashes then there is this normal "... doesn't work anymore ... do you want to send a problem report to Microsoft?" that often comes up when an application crashes.

    In the event log there's this message 1000 which tells us that there is no real hint available (see screenshot ... which is in German, sorry).

    Sascha
  • jordi79jordi79 Member Posts: 273
    i have had this problem before, and i do not think you can do anything about it. i was using a client to run a certain batch job every 30 seconds, and this client basically checks the contents of a folder and processes the text file in them. and yes, it crashes every once in a while. but we ported the processes of this client to a NAS, and the crashes become less frequent. maybe you should do the same.
  • sresre Member Posts: 62
    jordi79 wrote:
    but we ported the processes of this client to a NAS, and the crashes become less frequent. maybe you should do the same.

    NAS is not an option as we're talking about a special dialog for the sales guys here. It's really a pity that there is no solution available as this is the basic dialog for the sales team and on many machines Navision crashed about 2 times a day. I'm still thinking that this might have something to do with the large number of global variables used to display information and that all information for those 50 fields is retrieved from the database everytime the dialog is updated.
  • vaprogvaprog Member Posts: 1,139
    sre wrote:
    I'm still thinking that this might have something to do with the large number of global variables used to display information and that all information for those 50 fields is retrieved from the database everytime the dialog is updated.
    You might want to redesign the form to use a temporary record, then, instead of all the globals. Also, this allows you to cache results to save on recalculation effort.
  • sresre Member Posts: 62
    vaprog wrote:
    You might want to redesign the form to use a temporary record, then, instead of all the globals. Also, this allows you to cache results to save on recalculation effort.
    Are you really sure this might make a difference? Information would still have to be retrieved at runtime so the only difference would be that I'd have a global temporary record variable instead of lets say 50 integer variables. Do you have any experience with that (or to put it another way can you exlain why you think that this would make a difference)?

    Thanks
    Sascha
  • jordi79jordi79 Member Posts: 273
    Hi,
    Since it is the NAV client that is crashing... then you should use another client to display your dashboard. like excel. Modify your program to update a REAL Table. Then configure an excel worksheet to get data from that particular table (if you are using native db, u will need nodbc, if you are using MSSQL, u have no problems here), and write an excel macro to update the work sheet periodically.
  • sresre Member Posts: 62
    Thanks for that as well but that's not sufficient. The dialog not only displays the number of documents (e.g. all quotes for that sales person, all open orders, all cancelled orders, all customers that haven't been contacted in a certain period of time) but allows to directly drill down to the relevant information. So I can see two of my orders hav been cancelled -> F6 an I'll be able to directly access these 2 orders. It's not possible to have something similar with Excel ... so not what I'm looking for, sorry.
  • vaprogvaprog Member Posts: 1,139
    sre wrote:
    Are you really sure this might make a difference?
    No. I have never designed a form displaying 50 global variables. I do not have client crashes when displaying such a form.
    You do think your client crashes because of those globals or because of repeated extensive calculations.
    I do not think that extensive calculations will hurt the client in any way. Still, this approach might give you chance to minimise calculations needed.
    To use a record is the only way that comes to mind to get rid of those globals. And after all, displaying record data is basic duty of the client. If the client breaks doing this then it is hopelessly broken.
    sre wrote:
    Do you have any experience with that
    Yes, I have built many forms displaying temporary records, both, ordinary forms called to display a temporary table (FORM.RUN(No,TempRec);) or forms with property SourceTableTemporary=Yes, which need to populate rec from within the form object. I have never had any problems with client crashes doing this.
Sign In or Register to comment.