Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix notifications callback #1847

Merged
merged 2 commits into from
Jul 5, 2022
Merged

Fix notifications callback #1847

merged 2 commits into from
Jul 5, 2022

Conversation

ghost
Copy link

@ghost ghost commented Jul 4, 2022

Closes #1846

@ghost ghost requested review from cipig, smk762 and Canialon July 4, 2022 11:04
@cipig
Copy link
Member

cipig commented Jul 4, 2022

those error messages are gone and when i click on an entry, app switches to wallet of the respective coin
i had this crash when it switched to KMD, but not sure if it's related to this
std::out_of_range
i sent a KMD tx, then switched to portfolio and then clicked on the notification (from the KMD tx), so i assume the app was about to update the transactions in the list

[12:50:03] [info] [komodo.prices.provider.cpp:48] [2219217]: komodo price registry size: 241
[12:50:03] [debug] [app.cpp:549] [2219217]: on_fiat_rate_updated
[12:50:03] [info] [qt.portfolio.page.cpp:103] [2219217]: Updating portfolio values with model: true
[12:50:03] [info] [qt.portfolio.model.cpp:105] [2219217]: update_currency_values
[12:50:03] [info] [notification.manager.cpp:66] [2221005]: balance update notification: am_i_sender: true amount: 3.79652941 ticker: KMD human_date:  4 Jul 2022, 12:50
[12:50:03] [info] [global.provider.cpp:140] [2219189]: Successfully get the coinpaprika::api::async_price_converter answer after 1 try
[12:50:03] [info] [global.provider.cpp:140] [2219224]: Successfully get the coinpaprika::api::async_price_converter answer after 1 try
[12:50:03] [info] [global.provider.cpp:140] [2219208]: Successfully get the coinpaprika::api::async_price_converter answer after 1 try
[12:50:03] [debug] [qt.wallet.transactions.model.cpp:210] [2219200]: other time insertion, from 45 to 47
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::substr: __pos (which is 1) > this->size() (which is 0)
[12:50:03] [error] [main.prerequisites.hpp:106] [2219185]: sigabort received, cleaning mm2
[12:50:03] [debug] [qt.wallet.transactions.model.cpp:313] [2219200]: fetching 15 transactions, total tx: 2420
[12:50:03] [debug] [qt.wallet.transactions.model.cpp:227] [2219200]: transactions model size: 62
[12:50:03] [error] [mm2.service.cpp:1799] [2219208]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "FIRO",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219208]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "USDC-PLG20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219206]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "XSGD-PLG20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219203]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "KCS",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219217]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "EURS-PLG20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219203]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "ENJ-KRC20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219188]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "USDT-KRC20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219193]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "SAND-PLG20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219194]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "UNI-PLG20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219209]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "FLUX",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219217]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "CRO-KRC20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219222]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "CHZ-KRC20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219186]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "MOVR",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219220]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "UNI-KRC20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [main.prerequisites.hpp:112] [2219185]: stacktrace:  0# signal_handler(int) at main.cpp:?
 1# 0x00007FBBD54ECD60 in /lib/x86_64-linux-gnu/libc.so.6
 2# gsignal in /lib/x86_64-linux-gnu/libc.so.6
 3# abort in /lib/x86_64-linux-gnu/libc.so.6
 4# 0x00007FBBD586E7EC in /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 5# 0x00007FBBD5879966 in /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 6# 0x00007FBBD58799D1 in /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 7# 0x00007FBBD5879C65 in /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 8# std::__throw_out_of_range_fmt(char const*, ...) in /home/florian/Tools/AntaraAtomicDexAppDir/usr/bin/../lib/libQt5Positioning.so.5
 9# atomic_dex::transactions_model::data(QModelIndex const&, int) const in AntaraAtomicDexAppDir/usr/bin/atomicdex-desktop
10# QSortFilterProxyModel::data(QModelIndex const&, int) const in /home/florian/Tools/AntaraAtomicDexAppDir/usr/bin/../lib/libQt5Core.so.5
11# 0x00007FBBD845CB9A in /home/florian/Tools/AntaraAtomicDexAppDir/usr/bin/../lib/libQt5QmlModels.so.5
12# 0x00007FBBD7F429CE in /home/florian/Tools/AntaraAtomicDexAppDir/usr/bin/../lib/libQt5Qml.so.5
13# QV4::QObjectWrapper::getQmlProperty(QV4::ExecutionEngine*, QQmlContextData*, QObject*, QV4::String*, QV4::QObjectWrapper::RevisionMode, bool*, QQmlPropertyData**) in /home/florian/Tools/AntaraAtomicDexAppDir/usr/bin/../lib/libQt5Qml.so.5
14# QV4::QQmlContextWrapper::lookupInParentContextHierarchy(QV4::Lookup*, QV4::ExecutionEngine*, QV4::Value*) in /home/florian/Tools/AntaraAtomicDexAppDir/usr/bin/../lib/libQt5Qml.so.5
15# 0x00007FBB2C005ACD

@ghost
Copy link
Author

ghost commented Jul 4, 2022

those error messages are gone and when i click on an entry, app switches to wallet of the respective coin i had this crash when it switched to KMD, but not sure if it's related to this std::out_of_range i sent a KMD tx, then switched to portfolio and then clicked on the notification (from the KMD tx), so i assume the app was about to update the transactions in the list

[12:50:03] [info] [komodo.prices.provider.cpp:48] [2219217]: komodo price registry size: 241
[12:50:03] [debug] [app.cpp:549] [2219217]: on_fiat_rate_updated
[12:50:03] [info] [qt.portfolio.page.cpp:103] [2219217]: Updating portfolio values with model: true
[12:50:03] [info] [qt.portfolio.model.cpp:105] [2219217]: update_currency_values
[12:50:03] [info] [notification.manager.cpp:66] [2221005]: balance update notification: am_i_sender: true amount: 3.79652941 ticker: KMD human_date:  4 Jul 2022, 12:50
[12:50:03] [info] [global.provider.cpp:140] [2219189]: Successfully get the coinpaprika::api::async_price_converter answer after 1 try
[12:50:03] [info] [global.provider.cpp:140] [2219224]: Successfully get the coinpaprika::api::async_price_converter answer after 1 try
[12:50:03] [info] [global.provider.cpp:140] [2219208]: Successfully get the coinpaprika::api::async_price_converter answer after 1 try
[12:50:03] [debug] [qt.wallet.transactions.model.cpp:210] [2219200]: other time insertion, from 45 to 47
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::substr: __pos (which is 1) > this->size() (which is 0)
[12:50:03] [error] [main.prerequisites.hpp:106] [2219185]: sigabort received, cleaning mm2
[12:50:03] [debug] [qt.wallet.transactions.model.cpp:313] [2219200]: fetching 15 transactions, total tx: 2420
[12:50:03] [debug] [qt.wallet.transactions.model.cpp:227] [2219200]: transactions model size: 62
[12:50:03] [error] [mm2.service.cpp:1799] [2219208]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "FIRO",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219208]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "USDC-PLG20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219206]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "XSGD-PLG20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219203]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "KCS",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219217]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "EURS-PLG20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219203]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "ENJ-KRC20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219188]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "USDT-KRC20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219193]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "SAND-PLG20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219194]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "UNI-PLG20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219209]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "FLUX",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219217]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "CRO-KRC20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219222]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "CHZ-KRC20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219186]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "MOVR",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [mm2.service.cpp:1799] [2219220]: pplx task error: Failed to read HTTP status line from: fetch_single_balance, request: [
    {
        "coin": "UNI-KRC20",
        "method": "my_balance",
        "userpass": ""
    }
]
[12:50:03] [error] [main.prerequisites.hpp:112] [2219185]: stacktrace:  0# signal_handler(int) at main.cpp:?
 1# 0x00007FBBD54ECD60 in /lib/x86_64-linux-gnu/libc.so.6
 2# gsignal in /lib/x86_64-linux-gnu/libc.so.6
 3# abort in /lib/x86_64-linux-gnu/libc.so.6
 4# 0x00007FBBD586E7EC in /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 5# 0x00007FBBD5879966 in /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 6# 0x00007FBBD58799D1 in /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 7# 0x00007FBBD5879C65 in /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 8# std::__throw_out_of_range_fmt(char const*, ...) in /home/florian/Tools/AntaraAtomicDexAppDir/usr/bin/../lib/libQt5Positioning.so.5
 9# atomic_dex::transactions_model::data(QModelIndex const&, int) const in AntaraAtomicDexAppDir/usr/bin/atomicdex-desktop
10# QSortFilterProxyModel::data(QModelIndex const&, int) const in /home/florian/Tools/AntaraAtomicDexAppDir/usr/bin/../lib/libQt5Core.so.5
11# 0x00007FBBD845CB9A in /home/florian/Tools/AntaraAtomicDexAppDir/usr/bin/../lib/libQt5QmlModels.so.5
12# 0x00007FBBD7F429CE in /home/florian/Tools/AntaraAtomicDexAppDir/usr/bin/../lib/libQt5Qml.so.5
13# QV4::QObjectWrapper::getQmlProperty(QV4::ExecutionEngine*, QQmlContextData*, QObject*, QV4::String*, QV4::QObjectWrapper::RevisionMode, bool*, QQmlPropertyData**) in /home/florian/Tools/AntaraAtomicDexAppDir/usr/bin/../lib/libQt5Qml.so.5
14# QV4::QQmlContextWrapper::lookupInParentContextHierarchy(QV4::Lookup*, QV4::ExecutionEngine*, QV4::Value*) in /home/florian/Tools/AntaraAtomicDexAppDir/usr/bin/../lib/libQt5Qml.so.5
15# 0x00007FBB2C005ACD

Indeed it's not related to the changes applied by this PR

However I think this problem is related to #1849, let me explain myself: while trying to fix that issue I figured out our current transaction history logic has serious loading logic problems, it's far from just a frontend problem

Copy link
Member

@cipig cipig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

problem fixed, thanks

@smk762 smk762 merged commit 78fd761 into dev Jul 5, 2022
@ghost ghost deleted the fix_notifications_callback branch September 15, 2022 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Notification actions may fail
2 participants