Hot Topic (More than 10 Replies) server logging of crash (Read 5622 times)
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
server logging of crash
May 29th, 2012 at 8:33pm
Print Post Print Post  
the Sesame server engine just crashed (while a Sesame client was executing a 'print' button), and here is the entry in the s2_log0000.log

"16:56:53I$k2S_COM 510091Communications error with socket set notice.`|2012/05/29  15:18:56I$k2S_COM 510091Communications error with socket set notice 2.`|2012/05/29  15:23:30I$k2S_ENGLogging start of server...`

Please advise.
  

Larry
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: server logging of crash
Reply #1 - May 30th, 2012 at 12:44pm
Print Post Print Post  
Did it crash (stop running completely)?

That error would indicate that a network problem - an unexpected disconnect.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: server logging of crash
Reply #2 - May 30th, 2012 at 2:11pm
Print Post Print Post  
one of the client workstations was attempting to print to a network printer.  The Sesame server engine on the server stopped completely, and Microsoft Windows displayed its "this program has stopped unexpectedly; press 'send report' to notify Microsoft of this problem, blah blah blah".  When these crashes happen (and it isn't specific to just one workstation), it is 'often' when someone is printing something.

One of the first things my Print command button code does is to use CreateAProcess to 'set' the printer to use for that print routine (some buttons 'set' the color printer for sales orders; some 'set' the Label printer for delivery or inventory labels, etc).  I have an 'internal housekeeping Client record' that we use to designate some universal things like printers (previous solution was:  for example, our network 'sales order printer' is named wcOrderL on all of our workstations.  But if that printer has a temporary problem and we can't print to it, then to print orders I have to either 1) go into Sesame Designer and name another printer in the code, then get everyone out of Sesame, then reconcile - and then reverse that process when the wcOrderL printer become functional again;   or   2)  go into every workstation and rename a different printer (the wcInvoic printer, for example) to be 'wcOrderL' so that Sesame code will print to the correct printer.   A big, cumbersome pain - and a real problem if I'm physically not in the office (my staff is many things, but technically savvy/adept is not among those many attributes).   The benefit of the solution I came up with is that now, if we want to redirect a certain print function to a different printer, we just pull up client record 1000, and change the name of the printer in the OrderPrinter field, then save the client record, and all print routines will now read this newly inserted printer name and use it to print orders.   No fuss, no muss.

Here is the print code - am I doing something idiotic that is just not reasonable?  Should I have a longer Loiter for the 'workstation wishing to print' to allow more time to make the 'default printer designation' ?  Should I add code that 'checks to see if vPrinterOrders is not "" before allowing the rest of the code to run?

  vPrint = 0
  vRS1 = @XResultSetSearch(@FN, "Client", SEARCH_MODE_AND, SEARCH_SYNTAX_QA, "!ClientID=" + "1000")
  If vRS1 > -1
    {
      If @XResultSetLocked(vRS1) = 1
     {
       vPrint = 1
      
        }
         else If @XResultSetLocked(vRS1) = 0
           {
                 
             If @XresultSetTotal(vRS1) = 1                        // if there is exactly one matching record in Client, and it's #1000
                 {
                 vPrint = 0
                  vPrinterLabels = @XResultSetValue(vRS1, "PrinterLabels")
                  vPrinterInternal = @XResultSetValue(vRS1, "PrinterInternal")
                  vPrinterOrders = @XResultSetValue(vRS1, "PrinterOrders")
                  vPrinterInvoices = @XResultSetValue(vRS1, "PrinterInvoices")
                 }
           }
    }
     
  XResultSetClose(vRS1)

If vPrint = 1
  {
    @MsgBox("Printer definition table is locked.","Please try again in a second.","")
  }
    else if vPrint = 0

           { // this "{" allows the remainder of code to run

             CreateAProcess("RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n " + vPrinterOrders)
             Loiter(1000)
  

Larry
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: server logging of crash
Reply #3 - May 30th, 2012 at 2:21pm
Print Post Print Post  
There are several possible points of failure here, though none should crash (ever). I would need the whole application and exact steps to follow to narrow it down and fix the actual problem.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: server logging of crash
Reply #4 - May 30th, 2012 at 5:14pm
Print Post Print Post  
Something I just stumbled on is:

I use @CreateAProcess("make a different printer the default printer")  and then a @Loiter command to give the workstation time to 'set' the new default printer.

What I have found is that AlternateDefaultPrinter() works great (and is probably a heck of a lot faster than CreateAProcess) but it will only work with NewDocument() and NewPage.  AlternateDefaultPrinter() will not work with @PrintAForm.  @PrintAForm ignores AlternateDefaultPrinter() and only prints to the default printer. 

Mark,  the above is just a snippet of the entire print code (which is quite lengthy) that I thought was the relevant part.  The crash happened when a user tried to reprint a sales order.  The code worked its way down at least to a @AskUserQuestion() point, but crashed before the code reached the actual "vPrt = @PrintAForm(0, 1, 1, 0, 28, -1, -1, -1, -1, 1, 1)"  command.

When you say you need the whole application, do you mean 'the entire code of that print button', or 'the entire application suite of databases' ?
  

Larry
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: server logging of crash
Reply #5 - May 30th, 2012 at 5:29pm
Print Post Print Post  
I need to be able to reproduce the crash. The easiest way to do that is to have your entire application with exact steps to cause the crash to happen. This allows me to fix the actual problem in Sesame, rather than find a fault in your SBasic. While your SBasic may be initiating the crash, and it may be avoidable, I'd like to fix the situation so that no matter what you write in SBasic (other than endless loops and other logic problems that simply can't be detected), Sesame will manage.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: server logging of crash
Reply #6 - May 30th, 2012 at 6:24pm
Print Post Print Post  
OK, I can do that.  I recently (several months) upgraded to 2.5.2, and the crashing problem seems to be more frequent than it was with ver 2.5.0. 

Shall I zip the app and send to customer service 'as is'?  Or shall I delete all of the data first (to make the file size much more manageable), then add back in enough data records so that you can operate different daily functions enough to see what's going on?
       In other words, does it make a difference to you if there are a LOT of records that Sesame might need to sift/search through during the course of executing its code, or is it irrelevant if it's 1000 records versus 4 records (and the time difference Sesame would wait to acquire the info it needed)?
  

Larry
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: server logging of crash
Reply #7 - May 30th, 2012 at 9:04pm
Print Post Print Post  
4 records should work for Mark, Just place the DB and DAT files in a zip folder and shoot them over to support@lantica.com and I'll make sure Mark gets them in the morning.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: server logging of crash
Reply #8 - May 31st, 2012 at 2:12am
Print Post Print Post  
ok, I'll do it.  Thanks, Ray.
  

Larry
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: server logging of crash
Reply #9 - May 31st, 2012 at 7:32pm
Print Post Print Post  
files and s2 log sent
  

Larry
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: server logging of crash
Reply #10 - May 31st, 2012 at 8:37pm
Print Post Print Post  
Looks like I will need your include files as well.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: server logging of crash
Reply #11 - Jun 1st, 2012 at 1:03am
Print Post Print Post  
Mark,

Apologies, but by "include files" do you mean the "sbasic_include.sbas" ?  And if so, is it only the 'include file' that is on the server ?
  

Larry
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: server logging of crash
Reply #12 - Jun 1st, 2012 at 12:47pm
Print Post Print Post  
I may need both the one on the server (less likely) and the one on the client (much more likely). I need to be able to compile and run your SBasic code. As is, it does not compile because there are undefined constructs in the code that I assume are defined by changes to an included file or an additional include file.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: server logging of crash
Reply #13 - Jun 1st, 2012 at 2:20pm
Print Post Print Post  
I sent last night the 'include' file from the server.  I'll send the include file from one of the workstations this morning (although the crashes have appeared to be instigated from activities on several (not just one particular) workstations.
  

Larry
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: server logging of crash
Reply #14 - Jun 1st, 2012 at 2:43pm
Print Post Print Post  
Sorry, no need. I was testing on Linux. Linux is case-sensitive and you made your include statements all in caps.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: server logging of crash
Reply #15 - Jun 1st, 2012 at 4:52pm
Print Post Print Post  
just now emailed instructions on 'adding dummy sales orders' to my app,    in order for you to test the software
  

Larry
Back to top
IP Logged