[LYN-7245] AP unit test segfault - Clean up debug messages (#5192)
* Added newline to debug prints. Added additional debug prints based on previous segfault log Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com> * Add more debug messaging Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com> * Add db path to output Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
This commit is contained in:
@@ -1067,12 +1067,15 @@ namespace AssetProcessor
|
||||
|
||||
if (dropAllTables)
|
||||
{
|
||||
AZ_TracePrintf("AssetDatabase", "Closing existing db connection\n"); // Temporary debug output to help with tracking down a crash
|
||||
// drop all tables by destroying the entire database.
|
||||
m_databaseConnection->Close();
|
||||
|
||||
AZ_TracePrintf("AssetDatabase", "Getting db file path\n"); // Temporary debug output to help with tracking down a crash
|
||||
AZStd::string dbFilePath = GetAssetDatabaseFilePath();
|
||||
if (dbFilePath != ":memory:")
|
||||
{
|
||||
AZ_TracePrintf("AssetDatabase", "Deleting existing db %s\n", dbFilePath.c_str()); // Temporary debug output to help with tracking down a crash
|
||||
// you cannot delete a memory database, but it drops all data when you close it anyway.
|
||||
if (!AZ::IO::SystemFile::Delete(dbFilePath.c_str()))
|
||||
{
|
||||
@@ -1082,7 +1085,7 @@ namespace AssetProcessor
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
AZ_TracePrintf("AssetDatabase", "Re-opening connection\n"); // Temporary debug output to help with tracking down a crash
|
||||
if (!m_databaseConnection->Open(dbFilePath, IsReadOnly()))
|
||||
{
|
||||
delete m_databaseConnection;
|
||||
|
||||
Reference in New Issue
Block a user