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

terminate called after throwing an instance of 'std::bad_alloc' #7

Open
lzqustc opened this issue Aug 16, 2021 · 0 comments
Open

terminate called after throwing an instance of 'std::bad_alloc' #7

lzqustc opened this issue Aug 16, 2021 · 0 comments

Comments

@lzqustc
Copy link

lzqustc commented Aug 16, 2021

2021-08-16 06:31:33.621 [ 4] E AplClientBridge:AplClientRenderer::executeCommands
2021-08-16 06:31:33.621 [ 4] E AplClientBridge:executeCommands::create document
2021-08-16 06:31:33.621 [ 4] E AplClientBridge:executeCommands::Parse
2021-08-16 06:31:33.621 [ 4] E AplClientBridge:executeCommands::FindMember(commands)
2021-08-16 06:31:33.621 [ 4] E AplClientBridge:executeCommands::create apl::Object
2021-08-16 06:31:33.621 [ 4] E AplClientBridge:executeCommands::m_Root->executeCommands
2021-08-16 06:31:33.626 [ 4] E AplClientBridge:AplCoreEngine::delayaction.cpp:checkCommand: DelayAction::checkCommand(), mCommand->execute
2021-08-16 06:31:33.632 [ 4] E AplClientBridge:AplCoreEngine::corecommand.cpp:validate : CoreCommand::validate()
2021-08-16 06:31:33.632 [ 4] E AplClientBridge:AplCoreEngine::speakitemcommand.cpp:propDefSet : SpeakItemCommand::propDefSet()
2021-08-16 06:31:33.650 [ 4] E AplClientBridge:AplCoreEngine::corecommand.cpp:propDefSet : CoreCommand::propDefSet, buddyinfo=
Node 0, zone DMA 19 20 20 10 7 4 4 5 5 5 63
Node 0, zone HighMem 7 1 1 1 1 3 1 2 0 3 112

2021-08-16 06:31:33.670 [ 4] E AplClientBridge:AplCoreEngine::corecommand.cpp:propDefSet : CoreCommand::propDefSet, free=
total used free shared buff/cache available
Mem: 1338336 278312 745172 15664 314852 976416
Swap: 358396 0 358396

terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc

APL [1.6.1]
using AVSDeviceSDk 1.24 + SmartScreenSDK 2.7, test the " Alexa, tell me a joke"
armv7, arm linux, gcc version 5.5.0 (Linaro GCC 5.5-2017.10)

I think since the memory is enough (by checking "free" or "cat /proc/buddyinfo"), it shouldn't throw the bad_alloc.
The break point is the function propDefSet() of all xxxcommands.cpp

but if I move the function propDefSet() from xxxcommands.cpp to xxxcommands.h, then the 'bad_alloc' issue is gone.
And I notice that in the version APL[1.3.2], the propDefSet() are defined and implemented in all head files.

so my question is , why move propDefSet() from .h to .cpp? and why this change can lead to 'bad_alloc' crash issue?

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

No branches or pull requests

1 participant