Closed bugaevc closed 3 years ago
Did the app restart correctly afterwards, or does the crash persist?
No idea, I haven't tried.
The problem persists on latest release (2.0-alpha1) as well as current master (02f918d6377f78481de1b9d9485bfb4fa183aaaa) on NixOS:
```console $ result/bin/com.github.bleakgrey.tootle ** Message: 22:57:56.310: Build.vala:41: Tootle 2.0-alpha1 ** Message: 22:57:56.310: Build.vala:41: Running on: NixOS 22.05 (Quokka) ** Message: 22:57:56.310: Build.vala:41: Build prefix: "/nix/store/f2hcs6mpajqf6xaqbx6r4slfczmmr5bw-tootle-unstable-2021-09-09" ** Message: 22:57:56.362: SecretAccountStore.vala:11: Using libsecret v0.20.4 ** Message: 22:57:56.364: SecretAccountStore.vala:45: Loaded 0 accounts ** Message: 22:57:56.365: AccountStore.vala:81: Reset active account ** Message: 22:57:56.365: Application.vala:134: Presenting NewAccount dialog ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:57:56.369: string_to_string: assertion 'self != NULL' failed ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:57:56.370: string_to_string: assertion 'self != NULL' failed ** Message: 22:57:56.492: NewAccount.vala:65: Reset state ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:57:56.492: string_to_string: assertion 'self != NULL' failed ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:57:56.492: string_to_string: assertion 'self != NULL' failed ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:57:56.492: string_to_string: assertion 'self != NULL' failed ** Message: 22:57:56.606: Application.vala:134: Presenting NewAccount dialog ** Message: 22:57:56.609: NewAccount.vala:65: Reset state ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:57:56.609: string_to_string: assertion 'self != NULL' failed ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:57:56.609: string_to_string: assertion 'self != NULL' failed ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:57:56.609: string_to_string: assertion 'self != NULL' failed ** Message: 22:57:56.609: NewAccount.vala:65: Reset state ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:57:56.609: string_to_string: assertion 'self != NULL' failed ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:57:56.609: string_to_string: assertion 'self != NULL' failed ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:57:56.609: string_to_string: assertion 'self != NULL' failed ** Message: 22:57:56.609: NewAccount.vala:65: Reset state ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:57:56.609: string_to_string: assertion 'self != NULL' failed ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:57:56.609: string_to_string: assertion 'self != NULL' failed ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:57:56.609: string_to_string: assertion 'self != NULL' failed ** Message: 22:58:02.028: NewAccount.vala:96: Checking instance URL ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:58:02.030: string_to_string: assertion 'self != NULL' failed ** Message: 22:58:02.030: Network.vala:49: GET: https://nixnet.social/api/v1/instance ** Message: 22:58:02.824: AccountStore.vala:152: https://nixnet.social is using Mastodon ** Message: 22:58:02.825: NewAccount.vala:111: Registering client ** Message: 22:58:02.876: NewAccount.vala:47: Successfully associated MIME type for automatic authorization ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:58:02.876: string_to_string: assertion 'self != NULL' failed ** Message: 22:58:02.876: Network.vala:49: POST: https://nixnet.social/api/v1/apps ** Message: 22:58:03.799: NewAccount.vala:124: OK: Instance registered client ** Message: 22:58:03.800: NewAccount.vala:131: Opening permission request page ** Message: 22:58:03.800: Host.vala:11: Opening URI: https://nixnet.social/oauth/authorize?scope=read write follow&response_type=code&redirect_uri=tootle://auth_code&client_id=Cb3PejqOeVMYgCYhJWZ3FfmnR3hdIb6pYGMbRSK-5mQ ** Message: 22:58:05.543: NewAccount.vala:65: Reset state ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:58:05.543: string_to_string: assertion 'self != NULL' failed ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:58:05.543: string_to_string: assertion 'self != NULL' failed ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:58:05.543: string_to_string: assertion 'self != NULL' failed ** Message: 22:58:05.770: NewAccount.vala:65: Reset state ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:58:05.771: string_to_string: assertion 'self != NULL' failed ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:58:05.771: string_to_string: assertion 'self != NULL' failed ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:58:05.771: string_to_string: assertion 'self != NULL' failed ** Message: 22:58:06.545: NewAccount.vala:96: Checking instance URL ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:58:06.547: string_to_string: assertion 'self != NULL' failed ** Message: 22:58:06.547: Network.vala:49: GET: https://nixnet.social/api/v1/instance ** Message: 22:58:06.781: AccountStore.vala:152: https://nixnet.social is using Mastodon ** Message: 22:58:06.781: NewAccount.vala:111: Registering client ** (com.github.bleakgrey.tootle:967989): WARNING **: 22:58:06.781: NewAccount.vala:51: Using manual auth method ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:58:06.781: string_to_string: assertion 'self != NULL' failed ** Message: 22:58:06.781: Network.vala:49: POST: https://nixnet.social/api/v1/apps ** Message: 22:58:07.766: NewAccount.vala:124: OK: Instance registered client ** Message: 22:58:07.766: NewAccount.vala:131: Opening permission request page ** Message: 22:58:07.766: Host.vala:11: Opening URI: https://nixnet.social/oauth/authorize?scope=read write follow&response_type=code&redirect_uri=urn:ietf:wg:oauth:2.0:oob&client_id=P4h_zxBpXNNv4vGEe9awibUniH8ji2gasszTDgDSATA ** Message: 22:58:14.259: NewAccount.vala:142: Requesting access token ** (com.github.bleakgrey.tootle:967989): CRITICAL **: 22:58:14.260: string_to_string: assertion 'self != NULL' failed ** Message: 22:58:14.260: Network.vala:49: POST: https://nixnet.social/oauth/token?redirect_uri=urn:ietf:wg:oauth:2.0:oob&client_id=P4h_zxBpXNNv4vGEe9awibUniH8ji2gasszTDgDSATA&client_secret=PlWhKupiA3ZVctvuzqiYR54Te_lUxWr7xsALh9JqiSE&grant_type=authorization_code&code=bKbIfhDOoZhJow8J2tT_WmldvHVcq9vHf2NFuG9iuA4 ** Message: 22:58:14.968: Network.vala:49: GET: https://nixnet.social/api/v1/accounts/verify_credentials ** Message: 22:58:15.199: InstanceAccount.vala:98: @cnx@nixnet.social: profile updated Segmentation fault (core dumped) ```
The log above was produced from the result of the recipe at https://github.com/McSinyx/nixpkgs/commit/14b6226ea03cda69010db6fb145ed394d33ca618
Upon logging in to my instance, Tootle immediately segfaulted with this stacktrace:
The crash is on this line:
https://github.com/bleakgrey/tootle/blob/cb7a17963ca491562e83005ec19018e9b94dd134/src/Services/Accounts/InstanceAccount.vala#L22
It gets compiled to the following C code:
In GDB, I see that
_tmp1_
and_tmp2_
are bothNULL
, and the crash is at trying to access_tmp2_->priv->_access_token
.Build
The OS is Fedora Linux 34.
I built the app at 8907af6753027389f24d299d8ab97bfe0d8f2ca1 (which is my PR based on cb7a17963ca491562e83005ec19018e9b94dd134), with the following additional patch applied:
The purpose of the patch is to be able to do a non-Flatpak build with whatever version of GTK 4 I have installed and the very latest libadwaita as a subproject. Perhaps you'd want to include something like that upstream; but it doesn't seem to be related to the crash.
Logs