-
Notifications
You must be signed in to change notification settings - Fork 109
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
Runtime assertion on OS X #1606
Comments
the only recent change to startup was deckers speedup by skipping chainpower main.cpp lines 150 or so: struct CBlockIndexWorkComparator |
by exception method I've found that this 7362634 change causing this OSX specific startup crash |
@tonymorony can you explain more? Did you use |
@DeckerSU do you have any ideas here? |
@leto Now if you change 7 to 3 here https://github.com/jl777/komodo/blob/dev/src/komodo_defs.h#L21 and rebuild - daemon should start. Could you please try? |
@tonymorony yes, things work fine with a max era value of |
That's why i'm always told that every PR should be verified + tested (MacOS with gcc-8 is a very good case to find an non-obvious errors) and approved first (!) and we should always follow cotribution guide, offered by @ca333. Even for such "small changes", such as Split function was written by @miketout for splitting numeric params related to VRSC eras. But later we start using it everywhere, even for splitting non-eras related AC params despite the fact that it has following code inside:
So, it was intended to use only with eras related params. For example here: Of course, mindless change of ASSETCHAINS_MAX_ERAS from 3 to 7 will cause various non-obvious errors in various places. Bcz every To make sure that i'm correct in above, just comment this line Line 1761 in 8c4362e
So, we need to decide, if we really want to change ASSETCHAINS_MAX_ERAS from 3 to 7, we should check every
and change this:
to this:
Inside So, as a result we have following ways to solve it:
|
thanks! i will add a maxsize parameter to Split |
Was fixed by this commit: 152c86c |
Thanks all! I'll mirror the change to make this more general in Verus as
well!
…On Fri, Jul 12, 2019 at 5:51 PM DeckerSU ***@***.***> wrote:
That's why i'm always told that every PR should be verified + tested
(MacOS with gcc-8 is a very good case to find an non-obvious errors) and
approved first (!) and we should always follow cotribution guide
<https://github.com/jl777/komodo/blob/master/CONTRIBUTING.md>, offered by
@ca333 <https://github.com/ca333>. Even for such "small changes", such as
ASSETCHAINS_MAX_ERAS change. I found the root of issue:
Split <https://github.com/jl777/komodo/blame/beta/src/util.cpp#L417>
function was written by @miketout <https://github.com/miketout> for
splitting numeric params related to VRSC eras. But later we start using it
everywhere, even for splitting non-eras related AC params despite the fact
that it has following code inside:
for ( i = numVals; i < ASSETCHAINS_MAX_ERAS; i++ )
{
outVals[i] = nLast;
}
So, it was intended to use only with eras related params.
For example here
<https://github.com/jl777/komodo/blob/8c4362ed0e8190f025fafefcf4525383fcbe96c8/src/komodo_utils.h#L1761>
:
Split(GetArg("-ac_nk",""), ASSETCHAINS_NK, 0);
And ASSETCHAINS_NK declared as array with only *two* elements (N,K).
Of course, mindless change of ASSETCHAINS_MAX_ERAS from 3 to 7 will cause
various non-obvious errors in various places. Bcz every Split(GetArg(..,..),
...) depends on it.
To make sure that i'm correct in above, just comment this line
https://github.com/jl777/komodo/blob/8c4362ed0e8190f025fafefcf4525383fcbe96c8/src/komodo_utils.h#L1761
and error above will gone.
So, we need to decide, if we really want to change ASSETCHAINS_MAX_ERAS
from 3 to 7, we should check every Split call to be sure that all will be
correct. May be good idea is to add nMaxSplitSize param to it, like this:
void Split(const std::string& strVal, uint64_t *outVals, const uint64_t nDefault, const uint64_t nMaxSplitSize = ASSETCHAINS_MAX_ERAS)
and change this:
for ( i = numVals; i < ASSETCHAINS_MAX_ERAS; i++ )
to this:
for ( i = numVals; i < nMaxSplitSize; i++ )
Inside Split. Then, check every Split call in sources and add
nMaxSplitSize param where needed, like:
Split(GetArg("-ac_nk",""), ASSETCHAINS_NK, 0, 3);
So, as a result we have following ways to solve it:
1. Revert ASSETCHAINS_MAX_ERAS to 3.
2. Modify Split function to pay attention to outVals size by creating
nSize argument, and check every Split call to specify real array size.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1606?email_source=notifications&email_token=AFTGWKBLFRLP576OG4UEG5LP7ERKPA5CNFSM4IBY7GEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ3FV6Y#issuecomment-511073019>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFTGWKGLMHOM3SQW7UG5L3TP7ERKPANCNFSM4IBY7GEA>
.
|
I am seeing this on the latest
jl777
branch and latestdev
branch (commit 49cacbf) :Full backtrace is here, but it's not very useful:
https://gist.github.com/leto/a8088234a7c575f963b8063db87c3183
From what I can see, something in Boost internals is not happy and the seemingly innocuous line of code
uiInterface.InitMessage(_("Verifying wallet..."));
causes that assertion inside boost shared_ptr header fileThe text was updated successfully, but these errors were encountered: