Normal Topic Experiencing crashes when adding/editing records (Read 3939 times)
Epoc
Member
*
Offline



Posts: 3
Joined: Apr 26th, 2018
Experiencing crashes when adding/editing records
May 29th, 2019 at 11:49pm
Print Post Print Post  
Hello. Recently, we've been having trouble with a particular function causing clients to crash frequently. The function is supposed to let the user import a CSV file that will automatically generate new records with associated parts list subrecords based on the imported data. Out of the 3 times we've used the function, it has ran to completion once. Every other time, the client window locks up and freezes after the user has selected a file, while it is adding records, causing the client to crash to desktop with the user losing all of their work. Both the client and server are on the same local network, running Windows 10 and Sesame 2.6.4, and have a fair amount of RAM available (8gb+).

Since the function itself is quite lengthy, here is the rough pseudocode:

>User chooses directory of CSV file
>Import CSV file, format data, remove any headers
>While unread data remains {
     >Create new record in main form, fill in fields
     n = @FormNewRecord( vForm )
     Company = Split( vRecord, "," )
     >While unread part data remains {
           >lookup part information from another database
           vPartData = @XLookupSourceListAll( @FN, vPartNo, "Parts!Part_No", vSrcList )
           >create new record in subform, add data and do price calculations
           i = @FormNewRecord( vSubform )
           FormFieldValue( vSubform, "Manufacturer", i, @AccessStringArray( vPartData, 1 ) )
           >commit subform after adding record
           FormCommit( vSubform )
     }
     >commit main form after all subform parts have been added
     FormCommit( vForm )
}
>display any error messages generated during import


More details are available in the attached file.

While I suspect it has something to do with the nested while loops, we have had similar issues in the past with functions that add or delete many records in subfields at a time. Could this be a memory issue? Could a fluctuation in connectivity between client and server cause this? If you have any insight or further questions, let me know.
Thank you,
-Alec
  

Import_Kit_program.txt ( 7 KB | 61 Downloads )
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: Experiencing crashes when adding/editing records
Reply #1 - May 30th, 2019 at 3:40pm
Print Post Print Post  
Hi Alec,

Does the client actually crash with Windows error message like "This program has encountered an error and needs to close"?

Are you experiencing network communication errors when just using Sesame?

-Ray
  

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