hankinsoft / SQLPro

SQLPro bug & features tracking.
104 stars 27 forks source link

SQLPro Studio crashes when connecting to SSH-tunneled database; behaves fine if tunneled outside of SQLPro #945

Closed cristoslc closed 10 months ago

cristoslc commented 10 months ago

Describe the bug When I connect to a database with SSH tunneling enabled, the application crashes. When I create a local tunnel via SSH port forwarding in Terminal and connect to the database without tunneling turned on in SQLPro, then it works fine.

To Reproduce Steps to reproduce the behavior:

  1. Connect to a bookmark with SSH tunneling turned on

Expected behavior Application should not crash.

ACTUAL behavior Application crashes

Screenshots //

Environment details (please complete the following information):

Additional context Log

WARNING: Last session crashed.
2023/11/07 18:21:10:789  Application com.hankinsoft.sqlpro-studio-setapp v2023.70 (111070.1) has launched (from Setapp).
2023/11/07 18:21:10:789  App startup path is: file:///Applications/Setapp/
2023/11/07 18:21:10:790  Initialize themes
2023/11/07 18:21:10:790  CoderTheme:migrateThemes: - No themes to migrate to new location.
2023/11/07 18:21:10:790  Themes path is: /Users/[username]/Library/Containers/com.hankinsoft.sqlpro-studio-setapp/Data/Library/Themes/
2023/11/07 18:21:10:792  Finished initialize themes (took 0.00 seconds.)
2023/11/07 18:21:10:835  applicationPreferencesChanged
2023/11/07 18:21:10:837  doGetSubscriptionActive entered
2023/11/07 18:21:10:837  doGetSubscriptionActive - No bundle receipt found.
2023/11/07 18:21:10:837  RMAppStoreHelper:hasInvalidReceipt - receipt file does not exist.
2023/11/07 18:21:10:857  openDocument - canOpenUntitledDocument set to false. Exiting.
2023/11/07 18:21:10:858  Application is becoming active.
2023/11/07 18:21:10:889  HSAppStoreSubscriptionHelper:loadProducts Failed to initialize products.
2023/11/07 18:21:11:217  SQLProDocumentController:setCanOpenUntitledDocument:... true
2023/11/07 18:21:11:218  restoreUIState - Started restoring. App recovery URL is: file:///Users/[username]/Library/Containers/com.hankinsoft.sqlpro-studio-setapp/Data/Library/Recovery/AppRecovery.json
2023/11/07 18:21:11:218  Document init called. 0 time.
2023/11/07 18:21:11:231  Document (0x135825000) awakeFromNib.
2023/11/07 18:21:11:232  DatabaseTreeViewController 0x60000371eaa0 init
2023/11/07 18:21:11:235  HSOutlineView (0x134055a00) awakeFromNib.
2023/11/07 18:21:11:235  Started reloadData
2023/11/07 18:21:11:235  Finished reloadData
2023/11/07 18:21:11:239  HSOutlineView (0x144240000) awakeFromNib.
2023/11/07 18:21:11:239  Started reloadData
2023/11/07 18:21:11:239  Finished reloadData
2023/11/07 18:21:11:239  MainTabViewController::loadView - started
2023/11/07 18:21:11:243  MainTabViewController::loadView - super finished)
2023/11/07 18:21:11:246  MainTabViewController::loadView - finished
2023/11/07 18:21:11:247  Document windowControllerDidLoadNib
2023/11/07 18:21:11:264  Started reloadData
2023/11/07 18:21:11:264  Finished reloadData
2023/11/07 18:21:11:264  document:restoreState - Going to restore query length 55.
2023/11/07 18:21:11:325  dbcForConnectionId: failed - no recent connection with id .
2023/11/07 18:21:11:327  HSQueryTabViewController 0x133f37380 entered loadView
2023/11/07 18:21:11:337  NoodleLineNumberView (0x133ea3650) setClientView: 0x144048600. IsMainThread: YES.
2023/11/07 18:21:11:337  layoutManagerDidChangeTextStorage
2023/11/07 18:21:11:337  Started HSTextView::applicationPreferencesChanged (0x144048600)
2023/11/07 18:21:11:338  Finished HSTextView::applicationPreferencesChanged (0x144048600)
2023/11/07 18:21:11:339  favoritesInitialization. iCloud URL: /Users/[username]/Library/Mobile Documents/iCloud~com~hankinsoft~sqlpro/Documents/Favorites. Local url: /Users/[username]/Library/Containers/com.hankinsoft.sqlpro-studio-setapp/Data/Documents/Favorites.
2023/11/07 18:21:11:339  HSFavoriteQuery:copyLocalFavoritesFromCache - copying favorites from cache to documents.
2023/11/07 18:21:11:339  HSFavoriteQuery:favoritesInitialization - Loading favorites.
2023/11/07 18:21:11:339  HSFavoriteQuery:favoritesInitialization - 0 favorites exist in the keychain (0 in the backup).
2023/11/07 18:21:11:339  HSFavoriteQuery:migrateFavorites:: no favorites to migrate.
2023/11/07 18:21:11:340  rootDirectoryForFavorites is: file:///Users/[username]/Library/Mobile%20Documents/iCloud~com~hankinsoft~sqlpro/Documents/Favorites/
2023/11/07 18:21:11:341  favoritesInitialization took 0.00 seconds
2023/11/07 18:21:11:341  Started HSTextView::applicationPreferencesChanged (0x144048600)
2023/11/07 18:21:11:341  Finished HSTextView::applicationPreferencesChanged (0x144048600)
2023/11/07 18:21:11:347  selectTabViewItem (start): <HSTabViewItem '': 0x6000031759a0> ()
2023/11/07 18:21:11:347  selectTabViewItem index is 0
2023/11/07 18:21:11:347  tabView:willSelectTabViewItem: <HSTabViewItem '': 0x6000031759a0>
2023/11/07 18:21:11:350  Tab index 0 is selected
2023/11/07 18:21:11:351  selectTabViewItem (finished): <HSTabViewItem '': 0x6000031759a0> ()
2023/11/07 18:21:11:351  selectTabViewItem (start): <HSTabViewItem '': 0x6000031759a0> ()
2023/11/07 18:21:11:351  selectTabViewItem index is 0
2023/11/07 18:21:11:351  selectTabViewItem (finished): <HSTabViewItem '': 0x6000031759a0> ()
2023/11/07 18:21:11:352  selectTabViewItem (start): <HSTabViewItem '': 0x6000031759a0> ()
2023/11/07 18:21:11:352  selectTabViewItem index is 0
2023/11/07 18:21:11:352  selectTabViewItem (finished): <HSTabViewItem '': 0x6000031759a0> ()
2023/11/07 18:21:11:352  Finished restoring UIState.
2023/11/07 18:21:11:466  doSetCurrentQuery: (length: 55, (55 bytes)). ReplaceRange: {0, 0}.
2023/11/07 18:21:11:467  HSSyntaxHighlighter - FullReplace started.
2023/11/07 18:21:11:467  HSSyntaxHighlighter - FullReplace started.
2023/11/07 18:21:11:472  Counter was: 4
2023/11/07 18:21:11:472  No matching HSLineEntry found for the selected range.
2023/11/07 18:21:11:505  openConnectionDialogWithBlock entered
2023/11/07 18:21:11:507  SQLProConnectionWindowController init.
2023/11/07 18:21:11:513  SQLProConnectionWindowController:updateConnections: entered.
2023/11/07 18:21:11:515  MySQLAutocompleteHelper:loadExistingCacheFiles - baseURL is: /Users/[username]/Library/Containers/com.hankinsoft.sqlpro-studio-setapp/Data/Library/Caches/AutoComplete/C03550
2023/11/07 18:21:11:515  HSAutocompleteEntryCache - restoreFromDictionaryRepresention HSArrayDivide had no results. Doing nothing.
2023/11/07 18:21:11:516  HSAutocompleteHelper:loadAutocompleteCacheFromURL (MySQLAutocompleteHelper) took 0.00 seconds
2023/11/07 18:21:11:524  restoreWindowSize entered.
2023/11/07 18:21:11:529  SQLProConnectionWindowController:updateConnections: entered.
2023/11/07 18:21:11:530  setCollectionEntries with 2 sections (1 entries).
2023/11/07 18:21:11:530  HSCollectionViewWithKeyEvents:reloadData
2023/11/07 18:21:11:530  HSCollectionViewWithKeyEvents:reloadData
2023/11/07 18:21:11:530  HSCollectionViewWithKeyEvents:deselectAll
2023/11/07 18:21:11:530  HSCollectionViewWithKeyEvents:deselectAll
2023/11/07 18:21:11:530  doRefreshConnectionsReloadOnMain started
2023/11/07 18:21:11:530  SQLProConnectionWindowController:updateConnections: entered.
2023/11/07 18:21:11:531  setCollectionEntries with 2 sections (1 entries).
2023/11/07 18:21:11:531  HSCollectionViewWithKeyEvents:reloadData
2023/11/07 18:21:11:531  HSCollectionViewWithKeyEvents:reloadData
2023/11/07 18:21:11:531  doRefreshConnectionsReloadOnMain finished
2023/11/07 18:21:11:531  configureToolbar
2023/11/07 18:21:11:533  SQLProConnectionWindowController:updateConnections: entered.
2023/11/07 18:21:11:533  MongoDBAutocompleteHelper:loadExistingCacheFiles - baseURL is: /Users/[username]/Library/Containers/com.hankinsoft.sqlpro-studio-setapp/Data/Library/Caches/AutoComplete/F44336
2023/11/07 18:21:11:533  PostgresAutocompleteHelper:loadExistingCacheFiles - baseURL is: /Users/[username]/Library/Containers/com.hankinsoft.sqlpro-studio-setapp/Data/Library/Caches/AutoComplete/140695
2023/11/07 18:21:11:533  MSSQLAutocompleteHelper:loadExistingCacheFiles - baseURL is: /Users/[username]/Library/Containers/com.hankinsoft.sqlpro-studio-setapp/Data/Library/Caches/AutoComplete/B4E95C
2023/11/07 18:21:11:534  setCollectionEntries with 2 sections (5 entries).
2023/11/07 18:21:11:534  HSCollectionViewWithKeyEvents:reloadData
2023/11/07 18:21:11:534  HSCollectionViewWithKeyEvents:reloadData
2023/11/07 18:21:11:564  MongoDBDatabaseClient initialize with v1.18.0-pre.
2023/11/07 18:21:17:944  onEditConnection
2023/11/07 18:21:24:548  HSSSHTunnelWindowController endSheetWithReturnCode: OK
2023/11/07 18:21:25:643  SQLProConnectionPersistance:saveConnection:inGroup:error: - connection D706B72F-AFD0-443E-8120-A080F22E6440-15991-0000016E4D73EF74 has been modified. Going to close all existing connections.
2023/11/07 18:21:25:643  Took 0.00 seconds to release 0 connections.
2023/11/07 18:21:25:644  MySQLConnectionWindowController endSheetWithReturnCode: HSModalResponseSaveWithoutConnecting
2023/11/07 18:21:25:645  HSCollectionViewWithKeyEvents:deselectAll
2023/11/07 18:21:25:645  HSCollectionViewWithKeyEvents:deselectAll
2023/11/07 18:21:25:645  SQLProConnectionWindowController:updateConnections: entered.
2023/11/07 18:21:25:697  setCollectionEntries with 2 sections (5 entries).
2023/11/07 18:21:25:697  HSCollectionViewWithKeyEvents:reloadData
2023/11/07 18:21:25:698  HSCollectionViewWithKeyEvents:reloadData
2023/11/07 18:21:25:698  doRefreshConnectionsReloadOnMain started
2023/11/07 18:21:25:698  SQLProConnectionWindowController:updateConnections: entered.
2023/11/07 18:21:25:699  setCollectionEntries with 2 sections (5 entries).
2023/11/07 18:21:25:699  HSCollectionViewWithKeyEvents:reloadData
2023/11/07 18:21:25:699  HSCollectionViewWithKeyEvents:reloadData
2023/11/07 18:21:25:699  doRefreshConnectionsReloadOnMain finished
2023/11/07 18:21:28:258  onEditConnection
2023/11/07 18:21:30:792  MySQLConnectionWindowController:onConnectAndSave:
2023/11/07 18:21:30:802  mysql_library_init result: 0. Client info: 3.3.1. Thread safe: YES.
2023/11/07 18:21:30:803  HSSSHTunnelPool - Creating a new connection.
2023/11/07 18:21:30:803  (SSH) HSChilkatSSHTunnelHelper:connect called
2023/11/07 18:21:30:803  HSChilkatSSHTunnelHelper:connect - getting ssh authentication methods.
2023/11/07 18:21:31:209  HSChilkatSSHTunnelHelper:connected with banner [], identifier: [SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.9]
2023/11/07 18:21:31:504  HSChilkatSSHTunnelHelper:connect - got auth methods from ssh server. (publickey)
2023/11/07 18:21:31:921  SSHTunnel:keysForHost:port: returning an array (1 entries) of fingerprints.
2023/11/07 18:21:31:921  Keydata was found (user previously stored).
2023/11/07 18:21:31:921  SSH:authenticateViaPublicKey - publickey auth path is accessible. Not using bookmark.
2023/11/07 18:21:31:925  HSChilkatSSHTunnelHelper:authenticateViaPublicKey loaded privateKey.
2023/11/07 18:21:31:925  HSChilkatSSHTunnelHelper:authenticateViaPublicKey WITHOUT password.
2023/11/07 18:21:31:929  initializeSSH (allow pool) took 1.13 seconds.
2023/11/07 18:21:38:145  

WARNING: Last session crashed.
2023/11/07 18:21:38:145  Application com.hankinsoft.sqlpro-studio-setapp v2023.70 (111070.1) has launched (from Setapp).

Issues will be closed until environmental details are provided.

If the above template is not completed, issues with be closed with the statement Issue has been closed. Please edit the initial post (or create a new issue) and follow the template. Once completed, the issue may be reopened.

hankinsoft commented 10 months ago

I've submitted a build which should sort this out. 2023.71 should be available within the next ~24 hours. Once its available could you let me know if this is sorted out for you?

cristoslc commented 10 months ago

Still happening with 2023.71.

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               SQLPro Studio [87098]
Path:                  /Applications/Setapp/SQLPro Studio.app/Contents/MacOS/SQLPro Studio
Identifier:            com.hankinsoft.sqlpro-studio-setapp
Version:               2023.71 (111071)
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2023-11-08 16:26:34.5620 -0500
OS Version:            macOS 13.6.1 (22G313)
Report Version:        12
Anonymous UUID:        5E54E485-9E9A-7FC2-F639-16E33AB03DA0

Sleep/Wake UUID:       3509C53B-4FCF-4B7B-AD48-3A8FA48D595F

Time Awake Since Boot: 380000 seconds
Time Since Wake:       25954 seconds

System Integrity Protection: enabled

Crashed Thread:        5  Dispatch queue: com.apple.root.default-qos

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Application Specific Information:
abort() called

Application Specific Backtrace 0:
0   CoreFoundation                      0x00000001816a70e4 __exceptionPreprocess + 176
1   libobjc.A.dylib                     0x00000001811c5fd0 objc_exception_throw + 60
2   CoreFoundation                      0x00000001817919b4 -[__NSCFString characterAtIndex:].cold.1 + 0
3   CoreFoundation                      0x000000018178df7c -[__NSArrayM insertObject:atIndex:].cold.2 + 0
4   CoreFoundation                      0x00000001815cf1fc -[__NSArrayM insertObject:atIndex:] + 912
5   HSCore                              0x0000000107612de8 +[HSChilkatErrorHelper errorMessagesFromXML:errorTag:] + 384
6   HSCore                              0x0000000107612c20 +[HSChilkatErrorHelper errorMessageFromXML:] + 32
7   HSCore                              0x000000010760b8d0 -[HSChilkatSSHTunnelHelper authenticateViaPublicKey:] + 1848
8   HSCore                              0x000000010760a5f4 -[HSChilkatSSHTunnelHelper authenticate:error:] + 176
9   HSCore                              0x0000000107609ab0 -[HSChilkatSSHTunnelHelper connect] + 2920
10  SQLProCore                          0x000000010540abf0 __57-[SQLProDatabaseClient initializeSSH:allowSSHPool:error:]_block_invoke.48 + 1212
11  HSCore                              0x000000010762c630 +[HSSSHTunnelPool tunnelHelperForIdentifier:initializeTunnel:error:] + 296
12  SQLProCore                          0x000000010540a510 -[SQLProDatabaseClient initializeSSH:allowSSHPool:error:] + 316
13  SQLProMySQLCore                     0x00000001059b8ebc -[MySQLClient connect:sshDelegate:dbc:allowSSHPool:] + 180
14  SQLProMySQLCore                     0x00000001059b8de0 -[MySQLClient connect:sshDelegate:] + 80
15  SQLProCore                          0x00000001053d61dc +[SQLProDatabaseConnectionPool connectionWithDetails:error:sshDelegate:] + 88
16  SQLProCore                          0x00000001053d586c +[SQLProDatabaseConnectionPool executeQuery:queryIdentifier:withDBC:error:allowPooled:isUserQuery:clientUUID:sshDelegate:] + 940
17  HSShared                            0x0000000104d49ab4 -[HSDatabaseTreeEntry executeQueryBlock:queryIdentifier:dbc:allowPooled:error:] + 172
18  SQLProMySQLMacOS                    0x0000000105a2e9cc -[MySQLDatabaseTreeEntryServer loadDatabases:allDatabaseNames:error:] + 600
19  SQLProMySQLMacOS                    0x0000000105a2df50 __49-[MySQLDatabaseTreeEntryServer loadEntriesAsync:]_block_invoke + 112
20  libdispatch.dylib                   0x000000018139e874 _dispatch_call_block_and_release + 32
21  libdispatch.dylib                   0x00000001813a0400 _dispatch_client_callout + 20
22  libdispatch.dylib                   0x00000001813a34e0 _dispatch_queue_override_invoke + 788
23  libdispatch.dylib                   0x00000001813b1e98 _dispatch_root_queue_drain + 396
24  libdispatch.dylib                   0x00000001813b26c0 _dispatch_worker_thread2 + 164
25  libsystem_pthread.dylib             0x000000018154c038 _pthread_wqthread + 228
26  libsystem_pthread.dylib             0x000000018154ad94 start_wqthread + 8

On Nov 8, 2023 at 9:11 AM -0500, Kyle Hankinson @.***>, wrote:

I've submitted a build which should sort this out. 2023.71 should be available within the next ~24 hours. Once its available could you let me know if this is sorted out for you? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

cristoslc commented 10 months ago

Also, now SQLPro Studio crashes upon re-opening, so I can't open it at all. On Nov 8, 2023 at 9:11 AM -0500, Kyle Hankinson @.***>, wrote:

I've submitted a build which should sort this out. 2023.71 should be available within the next ~24 hours. Once its available could you let me know if this is sorted out for you? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

hankinsoft commented 10 months ago

2023.72 should now be available via setapp (or if not, then within ~24 hours). I think this one should finally sort this out.

hankinsoft commented 10 months ago

I'm not seeing any crashes with this new build. If you get the chance, please let me know if this is resolved for you.

cristoslc commented 10 months ago

Confirmed, 2023.72 is working fine. Thank you!