BeamMW / beam-ui

Beam Desktop Wallet (Win / Mac / Linux)
https://beam.mw/
Apache License 2.0
26 stars 23 forks source link

App crashes if you create new asset and then try to acquire it right after creation #1013

Open anatolse opened 1 year ago

anatolse commented 1 year ago

Probable reason is here: Beam Wallet Dappnet.exe!AssetsManager::getAssetProps(unsigned int assetId) Line 416 C++

AssetManager has a collection of known assets named _info, and we probably try to get asset info by index before it is inserted into _info

Callstack:

Beam Wallet Dappnet.exe!beam::wallet::WalletID::get_Channel() Line 287  C++
Beam Wallet Dappnet.exe!beam::AmountBig::Print(std::basic_ostream<char,std::char_traits<char>> & os, const beam::uintBig_t<16> & x) Line 1947   C++
Beam Wallet Dappnet.exe!beam::operator<<(std::basic_ostream<char,std::char_traits<char>> & os, const beam::wallet::PrintableAmount & x) Line 185    C++
Beam Wallet Dappnet.exe!std::to_string(const beam::wallet::PrintableAmount & amount) Line 122   C++
Beam Wallet Dappnet.exe!beamui::AmountBigToUIString(const beam::uintBig_t<16> & value) Line 138 C++
Beam Wallet Dappnet.exe!AssetsManager::getAssetProps(unsigned int assetId) Line 416 C++
Beam Wallet Dappnet.exe!AssetsManager::getAssetsMap(const std::set<unsigned int,std::less<unsigned int>,std::allocator<unsigned int>> & assets) Line 459    C++

Beam Wallet Dappnet.exe!beamui::applications::AppsApiUI::getAssets() Line 45 C++ Beam Wallet Dappnet.exe!beamui::applications::AppsApiUI::qt_static_metacall(QObject _o, QMetaObject::Call _c, int _id, void * _a) Line 170 C++

JenkJS commented 1 year ago

For replay:

  1. dapp , branch is feat_addLiquidity
  2. yarn Install
  3. yarn start
  4. Create pool
  5. Select assets for pool and kind ( input not fill)
  6. If transaction is completed , you move on add liquidity page. Fill input (Groth) and click Add Liquidity.