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
0
Comments
Please see if there are any platform update for you, and let's pray it could solve your problem.
Andwian
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
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!
Andwian
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.
@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
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!
Any comments? :-)
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
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.
Thanks
Sascha
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.
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. 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.