Welcome! Log In Create A New Profile

Advanced

Database files locked after a crash

Posted by PaulGruet 
Database files locked after a crash
February 20, 2019 11:50AM
We ave been experiencing occasional crashes which cause our application to lock solid, it cannot even be killed from task manager (Windows 10). This is in itself a major issue, but, since the only way to recover this situation is to reboot the computer. Once I attempt to run the application again it fails with an error message saying the .fic file is locked by another process. How can I release the lock on these files so that they can be accessed again by our program?

Thanks

Paul
Al
Re: Database files locked after a crash
February 20, 2019 12:12PM
Hello Paul

Ever tried to do a jigsaw puzzle without the picture ?

Can you provide Windev product and version, Database type - Classic HFCS or other. Is the app stand alone or running on a server ? What is the error message at the time of the crash ?

Regards
Al
Re: Database files locked after a crash
February 20, 2019 12:29PM
Hi Al

Sorry yes I should have been more specific.

The product is WinDev23 and the database type is HFSQL Classic. It is running locally not on a server

The crash is in fact a complete locking of our application - probably caused by a USB connection issue which I am looking into . The application cannot be killed from task manager or ProcessExplorer when this occurs. Clearly at this point the database is being held locked which I understand. The only way out then is to reboot the PC, however the database file remains locked after the reboot. I get a lock error either from our application or from WDMap.


I have to diagnose the cause of the lockup itself, but do you know a method or application that can unlock the database (.fic) file so that we have a way of recovering from this situation

Regards
Paul
Al
Re: Database files locked after a crash
February 20, 2019 12:49PM
Hello Paul

When it crashes, try running Control Panel > Administrative Tools > Computer Management > Shared Folders.
The Sessions and/or Open Files may give you some clues and you may be able to avoid a reboot by closing sessions and open files. The event viewer is also in that section so it may have an error message.
Is there a message of any kind ?
Is it possible that a code segment is in a loop which cause cause an out of memory crash eventually.
When I have a problem like this I use the debugger to pinpoint the section of code causing the problem.

Regards
Al
Re: Database files locked after a crash
February 20, 2019 01:07PM
Hi Al,

If I am running from the debugger the first thing it does is detach from it when the program freezes! However I then just left the application frozen for about 5 minutes as you suggest it does indeed close and unlock the database so it may indeed be stuck in a loop and memory faulting

The event viewer shows some unhandled exceptions from a third party .net assembly used to communicate via USB to a Data Translation data logger, so catching these and handling them will help us.

However when the database file is locked there are no items in either Open Files or Sessions

The two events in the event viewer are as follows:

Log Name: Application
Source: .NET Runtime
Date: 20/02/2019 11:57:05
Event ID: 1026
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: FTTWKS49.Fire-Testing.local
Description:
Application: wdtst.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Exception
at A.c1ddcb6cbfdae9898f28ea7a99df12064.c2294ceff39aec1dec65cbb7a0c055834(IntPtr, UInt32, OlApiInterop)
at OpenLayers.Base.AnalogInputSubsystem.ce2af07ed45fe29d5aa0dc87bcc3275f2()
at A.cb8a3b168888d692c0f379df9a80959c3.c01b4bc27fb1d70df24a85bc078683509(UInt32)
at A.cb8a3b168888d692c0f379df9a80959c3.ce922221a3e8ec2c57911f7b81b99c6bb(Int32)
at A.cb8a3b168888d692c0f379df9a80959c3.cb1a8c170027d61cc796c5ab1ec806238()
at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()


Event Xml:
<Event xmlns="[schemas.microsoft.com];
<System>
<Provider Name=".NET Runtime" />
<EventID Qualifiers="0">1026</EventID>
<Level>2</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2019-02-20T11:57:05.704797200Z" />
<EventRecordID>10045</EventRecordID>
<Channel>Application</Channel>
<Computer>FTTWKS49.Fire-Testing.local</Computer>
<Security />
</System>
<EventData>
<Data>Application: wdtst.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Exception
at A.c1ddcb6cbfdae9898f28ea7a99df12064.c2294ceff39aec1dec65cbb7a0c055834(IntPtr, UInt32, OlApiInterop)
at OpenLayers.Base.AnalogInputSubsystem.ce2af07ed45fe29d5aa0dc87bcc3275f2()
at A.cb8a3b168888d692c0f379df9a80959c3.c01b4bc27fb1d70df24a85bc078683509(UInt32)
at A.cb8a3b168888d692c0f379df9a80959c3.ce922221a3e8ec2c57911f7b81b99c6bb(Int32)
at A.cb8a3b168888d692c0f379df9a80959c3.cb1a8c170027d61cc796c5ab1ec806238()
at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()

</Data>
</EventData>
</Event>





Followed by:
-----------------


Log Name: Application
Source: Application Error
Date: 20/02/2019 11:57:05
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: FTTWKS49.Fire-Testing.local
Description:
Faulting application name: wdtst.exe, version: 23.0.9.0, time stamp: 0x5ab53b1e
Faulting module name: KERNELBASE.dll, version: 10.0.17134.556, time stamp: 0xadca2670
Exception code: 0xe0434352
Fault offset: 0x001118a2
Faulting process ID: 0xb1c
Faulting application start time: 0x01d4c9126548ff1f
Faulting application path: C:\Program Files\PC SOFT\WINDEV 23\Programs\FrameWork\Win32x86\wdtst.exe
Faulting module path: C:\windows\System32\KERNELBASE.dll
Report ID: 7ff7c7ec-66f1-47e6-96c8-7255875d9f44
Faulting package full name:
Faulting package-relative application ID:
Event Xml:
<Event xmlns="[schemas.microsoft.com];
<System>
<Provider Name="Application Error" />
<EventID Qualifiers="0">1000</EventID>
<Level>2</Level>
<Task>100</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2019-02-20T11:57:05.845975200Z" />
<EventRecordID>10046</EventRecordID>
<Channel>Application</Channel>
<Computer>FTTWKS49.Fire-Testing.local</Computer>
<Security />
</System>
<EventData>
<Data>wdtst.exe</Data>
<Data>23.0.9.0</Data>
<Data>5ab53b1e</Data>
<Data>KERNELBASE.dll</Data>
<Data>10.0.17134.556</Data>
<Data>adca2670</Data>
<Data>e0434352</Data>
<Data>001118a2</Data>
<Data>b1c</Data>
<Data>01d4c9126548ff1f</Data>
<Data>C:\Program Files\PC SOFT\WINDEV 23\Programs\FrameWork\Win32x86\wdtst.exe</Data>
<Data>C:\windows\System32\KERNELBASE.dll</Data>
<Data>7ff7c7ec-66f1-47e6-96c8-7255875d9f44</Data>
<Data>
</Data>
<Data>
</Data>
</EventData>
</Event>



Regards
Paul
pao
Re: Database files locked after a crash
February 20, 2019 01:20PM
Your app uses the automatic management of errors or you use the honerror function?
In your app you use any explicit lock function like HREAD** wtith one of the LOCK options?
Your app uses transactions?

[doc.windev.com]
[doc.windev.com]
[doc.windev.com]

Regards

Paulo Oliveira
Re: Database files locked after a crash
February 21, 2019 09:00AM
We have now traced the source of the crash to a third party .net assembly so we are working with the supplier to rectify that issue. However the matter of locked database files in the event of a crash remains. The files don't appear in the shared folders snap in suggested by Al in an earlier reply. If there is a potential for any crash to leave the database locked we need to be able to advise our customers steps to recover.

Thanks
Paul
Al
Re: Database files locked after a crash
February 21, 2019 10:59AM
Hello Paul

There are a number of free "File Unlock" programs available on the web. One that I have used in the past is called Unlocker.
It is quite old but the review on Softpedia states that it works on Win10 so I have included a link. Maybe you could try some of them out to see if they could work in your situation.

[m.majorgeeks.com]

[www.softpedia.com]

Regards
Al
King
Re: Database files locked after a crash
February 21, 2019 02:50PM
Hi

Can you try to redirect this path C:\Program Files\PC SOFT\WINDEV 23\Programs\FrameWork\Win32x86\wdtst.exe

to somewhere ie easy to access like c:\wd23Apps... instead.

w10 has hard protections on c:\program files and c:\windows...

Besides, c:\program files are normally hosting 64-bit files unless yr w10 is running 32-bits, crash is
typical when running 32-bit apps on 64-bit w10 w/s for access violation issues.

HTH

Cheers

King
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: