1. Beatrix Willius
  2. Valentina Database ADK
  3. Freitag, September 16 2022, 05:32 AM
  4.  Abonnieren via E-Mail
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.
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
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.
Kommentar
There are no comments made yet.
Beatrix Willius Akzeptierte Antwort
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.
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
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.
Kommentar
There are no comments made yet.
Beatrix Willius Akzeptierte Antwort
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.
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
Probably V4RB log will help to see how it happens?
Kommentar
There are no comments made yet.
Beatrix Willius Akzeptierte Antwort
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?
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
I think the highest one - kLogParams, to be sure we see the whole picture
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
Do you have one of these corrupted databases? Did you try to run diagnose?
How it is recovered - using cloning?
Kommentar
There are no comments made yet.
Beatrix Willius Akzeptierte Antwort
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.
Kommentar
There are no comments made yet.
Beatrix Willius Akzeptierte Antwort
One user tried to re-create the database and got the same error again.
Kommentar
There are no comments made yet.
Beatrix Willius Akzeptierte Antwort
Got a log from a user. I attached it to the ticket http://www.valentina-db.com/bt/view.php?id=9144 .
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
But it seems to be ok - no exceptions/errors there.
Kommentar
There are no comments made yet.
Beatrix Willius Akzeptierte Antwort
That's what the user sent me.
Kommentar
There are no comments made yet.
Beatrix Willius Akzeptierte Antwort
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.
Kommentar
There are no comments made yet.
Beatrix Willius Akzeptierte Antwort
Spoke too soon. The user got the error again. I've attached the log and some information to the ticket.
Kommentar
There are no comments made yet.
Beatrix Willius Akzeptierte Antwort
What do you say to the latest log file? I don't see anything in there.
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
Neither do I.Still thinking
Kommentar
There are no comments made yet.
Ivan Smahin Akzeptierte Antwort
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?
Kommentar
There are no comments made yet.
Beatrix Willius Akzeptierte Antwort
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.
Kommentar
There are no comments made yet.
Beatrix Willius Akzeptierte Antwort
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.
Kommentar
There are no comments made yet.
  • Seite :
  • 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