1. Beatrix Willius
  2. Valentina Database ADK
  3. Friday, September 16 2022, 05:32 AM
  4.  Subscribe via email
Hi guys,

I've got 3-4 reports with corrupt databases in the last week. All of them show a "Dynamic SQL error":

2022-09-15 16:12:30 ArchiveThread.Archive done
2022-09-15 16:12:30 ArchiveThread.ToTrash
2022-09-15 16:12:30 no move to trash
2022-09-15 16:12:30 ArchiveThread.ToTrash done
2022-09-15 16:12:30 --------------------------
2022-09-15 16:12:30 An error happened:
2022-09-15 16:12:30 Class/Method: MaxModel.Flush
2022-09-15 16:12:30 Time: Thursday, September 15, 2022 4:12:30 PM Eastern Daylight Time 3585679
2022-09-15 16:12:30 Type of Error: VException 5 Dynamic SQL error.
2022-09-15 16:12:30 Error Number: 5
2022-09-15 16:12:30 Error Message: Dynamic SQL error.
2022-09-15 16:12:30 --------------------------
2022-09-15 16:12:30 Stack:
2022-09-15 16:12:30
Sub VDatabase.Flush()
Sub MaxModel.Flush()
Sub MaxModel.Notify(string)
Sub NotificationCenter.Post(string, string)
Sub NotificationManager.Post(string, string)
Sub ArchiveThread.Event_Run()
2022-09-15 16:12:30 Stack done
2022-09-15 16:12:32 ProgressWindowManager.Notify hidePro

2022-09-15 00:35:58 System: macOS 12.6.0
2022-09-15 00:36:00 Valentina Version: 12.4
2022-09-15 00:36:04 MaxModel.GetLocalValentinaDatabase archive path: /Volumes/username/Mail Archive X BKP/Mail Archive full.vdb

It's super unlikely that all users have hard disk troubles.
Comment
There are no comments made yet.
Sergey Pashkov Accepted Answer
Hello Beatrix,

Can you show the method which prints exception info?
2022-09-15 16:12:30 Type of Error: VException 5 Dynamic SQL error.
2022-09-15 16:12:30 Error Number: 5
2022-09-15 16:12:30 Error Message: Dynamic SQL error.
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
Here is the full code of the method:



'reset process activity
if theProcessActivity <> nil and theProcessInfo <> nil then
theProcessInfo.endActivity theProcessActivity
theProcessActivity = Nil
end if

'flush archive if an archive is there
if theArchive <> Nil then theArchive.Flush


One user has the archive on a NAS.
Comment
There are no comments made yet.
Sergey Pashkov Accepted Answer
And the code that generates a report about exceptions?
The error number for the "Dynamic SQL Error." message is 0x7000, it is not clear how 5 appeared there.
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
That should be this method:


Protected Function getExceptionType(theError as RuntimeException) As String

'get the type of the exception

dim ErrorInfo as Introspection.TypeInfo = Introspection.GetType(theError)
dim theResult as String = ErrorInfo.FullName

'special handling for Valentina, because we get here more information
If theError isA VException then
theResult = "VException " + str(VException(theError).ErrorNumber) + " " + VException(theError).Message
end if

Return theResult
End Function


which goes into the code for adding information about the exception to the session log:


theExceptionType = getExceptionType(theError)
ErrorText.Add "Type of Error: " + theExceptionType
ErrorText.Add("Error Number: " + Str(theError.ErrorNumber))
ErrorText.Add("Error Message: " + theError.Message)



So the 5 comes from the exception.
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
Probably V4RB log will help to see how it happens?
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
Ah, yes, that would the the only feature I removed for the current version of my app.

Which debug level do you recommend for getting more information about this problem? EVDebugLevel.kLogErrors?
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
I think the highest one - kLogParams, to be sure we see the whole picture
Comment
There are no comments made yet.
Sergey Pashkov Accepted Answer
Do you have one of these corrupted databases? Did you try to run diagnose?
How it is recovered - using cloning?
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
Ok. I'll try that. Ahem. When an app in the Application folder uses logging it crashes so hard that it doesn't even make a crash log.

http://www.valentina-db.com/bt/view.php?id=9143

I don't have a corrupt database. They tend to be rather large. One user told me that his database is 23 GB. The result of a diagnosis was that the database is okay. Which makes the problem even more odd.
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
One user tried to re-create the database and got the same error again.
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
Got a log from a user. I attached it to the ticket http://www.valentina-db.com/bt/view.php?id=9144 .
Comment
There are no comments made yet.
Ivan Smahin Accepted Answer
But it seems to be ok - no exceptions/errors there.
Comment
There are no comments made yet.
Beatrix Willius Accepted Answer
That's what the user sent me.
Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories