The PoddyShein credit management statement crashing problem
UNILYNX
9-6-18
We have an issues with a program crashing the server on the instruction OpenForm(formcode).

We made a very simple program per below to try and see why this crash occurs: -

/ VER: 8.2 and latest 8.4
// UST: 23.09.2008 (update)
// VER: 5.3 071214
// UST: 10.01.2008

global
procedure RunCMForm(record RcVc RepSpec)
begin


string 30 formcode;
formcode = "MICKEYMOUSE";

LogText(0,"Before OpenForm");
OpenForm(formcode);
LogText(0,"After OpenForm");

return;
end;


I have defined a blank form called "MICKEYMOUSE" in the database
This crashes the database and the client when it hits openform()


Do you have any thoughts on what would cause this i.e. is there something else that needs to be initialised before calling OpenForm(formcode) so that it doesn’t crash ?

These are the relevent portions Windows.hal

window CMRClass:1
wtag("language","ENG"), wtag("product",""), wtag("productcode",""), wtag("device","computer")
begin
real v,vs,h;

WindowBegin("Specify Credit Management",CMRClass,CGRcW,RcType);
SetWRect(20,80,450,450);
StaticText(20,v=20,"Filter Records:",false);
EditField(h=150,v+=6,160,"Credit Managements",Normal,f1,false,CMSClass);
CheckBox(h,v+=20,0,"Include Zero Balances",flags[2]);
CheckBox(h,v+=16,0,"Include Closed",flags[3]);
CheckBox(h,v+=16,0,"Include On Hold",flags[4]);
EditField(h,v+=20,80,"Customer",Normal,f2,false,CUSClass);
EditField(h,v+=20,200,"Classifications",Normal,f3,false,CUClassSClass);
EditField(h,v+=20,80,"Branch",Normal,AccStr,false,LocationSClass);
StaticText(20,v+=40,"Filter Rows:",false);
PeriodField(h,v+=6,"Period");
EditField(h,v+=20,150,"Transaction Types",Normal,f4,false,CMTTSClass);
EditField(h,v+=20,50,"Number of Rows",Normal,flags[3],false,0);
EditField(h=80,v+=30,100,"Std. Text",Normal,f5,false,LTxtSClass);
ButtonFrame(h=200,v+=16,100,3,"Type");
RadioButton(h,v,0,0,"Normal",flags[10]);
RadioButton(h,v+=16,1,0,"Monthly Statement",flags[10]);
RadioButton(h,v+=16,2,0,"Write Off",flags[10]);

RadioButton(h,v+=16,3,0,"Surrender Goods",flags[10]);
RadioButton(h,v+=16,4,0,"Write Off Reversal",flags[10]);
RadioButton(h,v+=16,5,0,"Surrender Goods Reversal",flags[10]);

RadioButton(h,v+=16,6,0,"Final Agreement",flags[10]);
RadioButton(h,v+=16,7,0,"Mini Statement",flags[10]);
RadioButton(h,v+=16,99,0,"Custom Document",flags[10]);
EditField(h+140,v,80,"",Normal,f6,false,DocSClass);

EndWindow;
end;

and


window CMFClass:1
wtag("language","ENG"), wtag("product",""), wtag("productcode",""), wtag("device","computer")
begin


WindowBegin("Definition Credit Management",CMFClass,CGHbl,HBlRecType);
SetBlid(CMDefBlock);
FORMDEF;
EndWindow;
end;


and in startup.hal is the following

Document("Credit Management",CMRClass,RunCMForm,CMFClass,modCM);

Any help would be greatly appreciated.

Thank you
Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Latest Posts
Yavuz Yigiterhan
More explanation @Paul: When the issue occurs, should see if restarting presence or lookup helps. If so - that is the issue and should be sorted. First need to ensure that that is the issue...
07:18 2 July 2025
Arzu Erdogdu
Hello! You can mark it as closed as option. If document is connected with other documents you can not delete it so you will not be able to delete PO, as you will not be able to remove Goods receipt...
09:29 13 Jun 2025