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.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 1
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.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 2
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.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 3
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.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 4
Ivan Smahin Accepted Answer
Probably V4RB log will help to see how it happens?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 5
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.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 6
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.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 7
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.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 8
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.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 9
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.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 10
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.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 11
Ivan Smahin Accepted Answer
But it seems to be ok - no exceptions/errors there.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 12
Beatrix Willius Accepted Answer
That's what the user sent me.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 13
Beatrix Willius Accepted Answer
Got another report about the same issue.

The user had his databases on a fast NAS. I made him a new version of my app with the latest Valentina version so that he could do logging from the application folder. And the problem didn't show up anymore.

What is really really odd is that the last 3 reports about the issue all were from Belgium.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 14
Beatrix Willius Accepted Answer
Spoke too soon. The user got the error again. I've attached the log and some information to the ticket.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 15
Beatrix Willius Accepted Answer
What do you say to the latest log file? I don't see anything in there.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 16
Ivan Smahin Accepted Answer
Neither do I.Still thinking
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 17
Ivan Smahin Accepted Answer
The only idea that comes to my mind for now is - we have recently changed Mac's Carbon deprecated API to Posix one, so now we receive not mac-specific errors, but Posix's ones. So, err_no = 5 is EIO - I/O error. As I get you, the customer keeps db on some NAS - probably this is the source of the problems.

And one more question - could you send me db diagnose report if it fails?
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 18
Beatrix Willius Accepted Answer
I had one user with segment problems. I can't say if the segment problems or the dynamic SQL error came first. For the others there was only the dynamic SQL error. One user has a really fast NAS system. My app should work even there - especially when the database is only closed.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 19
Beatrix Willius Accepted Answer
And another one with a twist: the user doesn't have a NAS but uses a USB drive. He said the following:

In this particular case, and I am not sure why, the drive just disappeared during the backup process. This is what caused the error I suppose.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Database ADK
  3. # 20
  • Page :
  • 1
  • 2


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