Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error 1113 on Requery()
Message
De
31/05/2013 18:12:36
 
 
À
31/05/2013 16:32:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01575077
Message ID:
01575374
Vues:
75
>>>I've got a weird situation. Hoping it'll ring a bell for someone. A client has an application based on the Mere Mortals framework. In the midst of doing a large processing piece (not sure how large overall, but the repro up to the error takes 45-60 minutes), it fails with error 1113.
>>>
>>>The line that's triggering the error is a Requery() of a local view. Immediately before the Requery(), I've added code that confirms that the view itself is open. (And I just checked: the error that shows up when you try to Requery() a view that's not open isn't 1113.)
>>>
>>>This error occurs after processing tens of thousands of records from a cursor. It's reproducible, always failing on the same record. But as I said, it's a cursor, so table corruption seems extremely unlikely. Also, the client says that it reproduces only with the EXE, not in the IDE. I haven't tested this case because I don't know the app well enough.
>>>
>>>Anybody ever run into 1113 and have any ideas?
>>>
>>
>>So found something, but I don't know what to make of it.
>>
>>I added code to the app to throw information into a log file. When the error occurs, I'm logging (among other things) LIST STATUS for every data session that's open. This part of the logging code is:
>>
>>
>>goApp.AddToLogFile("  ---Data in Use---")
>>LOCAL laSessions[1], lnSessions, lnSession, lnCurSession, lcTempFile, lcStatInfo, lcConfirm
>>lnSessions = ASESSIONS(laSessions)
>>
>>lcTempFile = forcepath("StatList.txt",sys(2023))
>>lcConfirm = set("Confirm")
>>set confirm off 
>>
>>lnCurSession = SET("Datasession")
>>FOR lnSession = 1 TO m.lnSessions
>>	SET DATASESSION TO laSessions[m.lnSession]
>>	goApp.AddToLogFile('  Data Session ' + TRANSFORM(laSessions[m.lnSession]))
>>	
>>	List Status to (m.lcTempFile)
>>	lcStatInfo = filetostr(m.lcTempFile)
>>	goApp.AddToLogFile(m.lcStatInfo)
>>	erase (m.lcTempFile)
>>endfor 
>>
>>set confirm &lcConfirm
>>set datasession to m.lnCurSession
>>
>>
>>When I examine the log, I see that the index file for this view (one tag is created when the view is opened) is listed as:
>>
>>C:\USERS\TGRANOR\APPDATA\LOCAL\TEMP\STATLIST.TXT
>>
>>To make this more interesting, I'm actually logging all this stuff for the record before the error and just before the error occurs. On the record before the error, the index file has a temp file name, but by the time we're about to requery the view on the record where the error occurs, it shows up as STATLIST.TXT.
>>
>>So it sure seems that something's happening to the index file. Not sure how or where, but I can enhance my logging to try to answer "where."
>
>It looks suspicious that the index file somehow gets changed to the name of your logging temp file. Your code looks like it cleans up properly after itself, can you confirm that goApp.AddToLogFile() does so too (and is safe for a change of datasession)?
>
>Is it possible there are a lot of file handles in use between those multiple datasessions? There are per-process file handle limits in Windows, don't know for sure if it's 2K or 16K, getting conflicting answers when researching.

>>Is it possible there are a lot of file handles in use between those multiple datasessions? There are per-process file handle limits in Windows, don't know for sure if it's 2K or 16K, getting conflicting answers when researching.

Al might be on to something here. That theory might explain why it runs from the IDE and not from the .exe - there might be more files open while using the .exe.
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform