android crash signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)Is there a way to run Python on Android?How do save an Android Activity state using save instance state?How can I profile C++ code running on Linux?Activity restart on rotation AndroidClose/hide the Android Soft KeyboardWhy is the Android emulator so slow? How can we speed up the Android emulator?“Debug certificate expired” error in Eclipse Android pluginsIs there a unique Android device ID?What is 'Context' on Android?Proper use cases for Android UserManager.isUserAGoat()?
In Star Trek IV, why did the Bounty go back to a time when whales were already rare?
Can I use my Chinese passport to enter China after I acquired another citizenship?
How do I repair my stair bannister?
Teaching indefinite integrals that require special-casing
Is infinity mathematically observable?
Science Fiction story where a man invents a machine that can help him watch history unfold
Reply ‘no position’ while the job posting is still there (‘HiWi’ position in Germany)
Should a half Jewish man be discouraged from marrying a Jewess?
Is there enough fresh water in the world to eradicate the drinking water crisis?
Does "Dominei" mean something?
Are taller landing gear bad for aircraft, particulary large airliners?
Why isn't KTEX's runway designation 10/28 instead of 9/27?
Can the harmonic series explain the origin of the major scale?
Female=gender counterpart?
Why are all the doors on Ferenginar (the Ferengi home world) far shorter than the average Ferengi?
Is exact Kanji stroke length important?
Did US corporations pay demonstrators in the German demonstrations against article 13?
Visiting the UK as unmarried couple
Java - What do constructor type arguments mean when placed *before* the type?
I2C signal and power over long range (10meter cable)
What does the "3am" section means in manpages?
A known event to a history junkie
Is there an wasy way to program in Tikz something like the one in the image?
Why does this part of the Space Shuttle launch pad seem to be floating in air?
android crash signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
Is there a way to run Python on Android?How do save an Android Activity state using save instance state?How can I profile C++ code running on Linux?Activity restart on rotation AndroidClose/hide the Android Soft KeyboardWhy is the Android emulator so slow? How can we speed up the Android emulator?“Debug certificate expired” error in Eclipse Android pluginsIs there a unique Android device ID?What is 'Context' on Android?Proper use cases for Android UserManager.isUserAGoat()?
the crash happen rarely and i was not able to reproduce it on several android test devices.
the crash report is signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
can it be the result of UB that happened in a different place in the lifetime of the program? or can you spot an error in the following code?
why std::vector is not in use? execution speed is critical and this is faster, the implementation of the code with vector might been unoptimized and that what caused it to be slower.
what the code does :
create an array of arrays of objects that have a render method
create an int to keep track of the maximum index to use from the first array
create an array of int to keep track of the draw order of the first array
create an array of int to keep track of the capacity of the first array arrays
the code
this is the object function where the crash happen :
each object recursively call his child nodes
Render(GameObject*** container, int* container_keys, int* container_index, int* keys_count)
if (enable == false) return;
if (renderable != nullptr)
int draw_order_index = -1;
//search what index is equal to draw_order
for (int i = 0; i < *keys_count; i++)
if (renderable->draw_order == container_keys[i])
draw_order_index = i;
break;
//add new if not found
if (draw_order_index == -1)
draw_order_index = *keys_count;
//size limit determined in initialization
if (draw_order_index >= 199) return;
(*keys_count)++;
container_keys[draw_order_index] = renderable->draw_order;
container_index[draw_order_index] = 0;
//how many items in the array
int container_size = container_index[draw_order_index];
//size limit determined in initialization
if (container_size >= 9999) return;
//insert new items
container[draw_order_index][container_size] = this;
//increase count
container_index[draw_order_index]++;
for (int i = 0; i < childs_size; i++)
childs[i]->Render(container, container_keys, container_index, keys_count);
this is the initialization :
when isRunning
set to false, the program terminate
int draw_orders = 200;
int array_size = 10000;
keys_count = 0;
container = new(std::nothrow) GameObject**[draw_orders];
if (container == nullptr) isRunning = false; running_error = 3; return;
container_keys = new(std::nothrow) int[draw_orders];
if (container_keys == nullptr) isRunning = false; running_error = 4; return;
container_index = new(std::nothrow) int[draw_orders];
if (container_index == nullptr) isRunning = false; running_error = 5; return;
for (int i = 0; i < draw_orders; ++i)
container[i] = new(std::nothrow) GameObject*[array_size];
if (container[i] == nullptr) isRunning = false; running_error = 6; return;
this is the call to the root object :
when render_dirty
is true the size indexes are set to zero and the data get repopulated and new draw orders get sorted, new draw order priority get sorted once in the lifetime of the program
if (render_dirty == true)
for (int i = 0; i < keys_count; i++)
container_index[i] = 0;
RootGameObject->Render(container, container_keys, container_index, &keys_count);
bool sort = true;
while (sort)
sort = false;
for (int i = keys_count - 1; i >= 1; i--)
if (container_keys[i] < container_keys[i - 1])
sort = true;
int high_draw_order = container_keys[i - 1];
container_keys[i - 1] = container_keys[i];
container_keys[i] = high_draw_order;
int high_index_size = container_index[i - 1];
container_index[i - 1] = container_index[i];
container_index[i] = high_index_size;
GameObject** high_containter = container[i - 1];
container[i - 1] = container[i];
container[i] = high_containter;
android c++ android-ndk
add a comment |
the crash happen rarely and i was not able to reproduce it on several android test devices.
the crash report is signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
can it be the result of UB that happened in a different place in the lifetime of the program? or can you spot an error in the following code?
why std::vector is not in use? execution speed is critical and this is faster, the implementation of the code with vector might been unoptimized and that what caused it to be slower.
what the code does :
create an array of arrays of objects that have a render method
create an int to keep track of the maximum index to use from the first array
create an array of int to keep track of the draw order of the first array
create an array of int to keep track of the capacity of the first array arrays
the code
this is the object function where the crash happen :
each object recursively call his child nodes
Render(GameObject*** container, int* container_keys, int* container_index, int* keys_count)
if (enable == false) return;
if (renderable != nullptr)
int draw_order_index = -1;
//search what index is equal to draw_order
for (int i = 0; i < *keys_count; i++)
if (renderable->draw_order == container_keys[i])
draw_order_index = i;
break;
//add new if not found
if (draw_order_index == -1)
draw_order_index = *keys_count;
//size limit determined in initialization
if (draw_order_index >= 199) return;
(*keys_count)++;
container_keys[draw_order_index] = renderable->draw_order;
container_index[draw_order_index] = 0;
//how many items in the array
int container_size = container_index[draw_order_index];
//size limit determined in initialization
if (container_size >= 9999) return;
//insert new items
container[draw_order_index][container_size] = this;
//increase count
container_index[draw_order_index]++;
for (int i = 0; i < childs_size; i++)
childs[i]->Render(container, container_keys, container_index, keys_count);
this is the initialization :
when isRunning
set to false, the program terminate
int draw_orders = 200;
int array_size = 10000;
keys_count = 0;
container = new(std::nothrow) GameObject**[draw_orders];
if (container == nullptr) isRunning = false; running_error = 3; return;
container_keys = new(std::nothrow) int[draw_orders];
if (container_keys == nullptr) isRunning = false; running_error = 4; return;
container_index = new(std::nothrow) int[draw_orders];
if (container_index == nullptr) isRunning = false; running_error = 5; return;
for (int i = 0; i < draw_orders; ++i)
container[i] = new(std::nothrow) GameObject*[array_size];
if (container[i] == nullptr) isRunning = false; running_error = 6; return;
this is the call to the root object :
when render_dirty
is true the size indexes are set to zero and the data get repopulated and new draw orders get sorted, new draw order priority get sorted once in the lifetime of the program
if (render_dirty == true)
for (int i = 0; i < keys_count; i++)
container_index[i] = 0;
RootGameObject->Render(container, container_keys, container_index, &keys_count);
bool sort = true;
while (sort)
sort = false;
for (int i = keys_count - 1; i >= 1; i--)
if (container_keys[i] < container_keys[i - 1])
sort = true;
int high_draw_order = container_keys[i - 1];
container_keys[i - 1] = container_keys[i];
container_keys[i] = high_draw_order;
int high_index_size = container_index[i - 1];
container_index[i - 1] = container_index[i];
container_index[i] = high_index_size;
GameObject** high_containter = container[i - 1];
container[i - 1] = container[i];
container[i] = high_containter;
android c++ android-ndk
Include the crash dump with the back trace.
– Dan Albert
Mar 9 at 0:16
add a comment |
the crash happen rarely and i was not able to reproduce it on several android test devices.
the crash report is signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
can it be the result of UB that happened in a different place in the lifetime of the program? or can you spot an error in the following code?
why std::vector is not in use? execution speed is critical and this is faster, the implementation of the code with vector might been unoptimized and that what caused it to be slower.
what the code does :
create an array of arrays of objects that have a render method
create an int to keep track of the maximum index to use from the first array
create an array of int to keep track of the draw order of the first array
create an array of int to keep track of the capacity of the first array arrays
the code
this is the object function where the crash happen :
each object recursively call his child nodes
Render(GameObject*** container, int* container_keys, int* container_index, int* keys_count)
if (enable == false) return;
if (renderable != nullptr)
int draw_order_index = -1;
//search what index is equal to draw_order
for (int i = 0; i < *keys_count; i++)
if (renderable->draw_order == container_keys[i])
draw_order_index = i;
break;
//add new if not found
if (draw_order_index == -1)
draw_order_index = *keys_count;
//size limit determined in initialization
if (draw_order_index >= 199) return;
(*keys_count)++;
container_keys[draw_order_index] = renderable->draw_order;
container_index[draw_order_index] = 0;
//how many items in the array
int container_size = container_index[draw_order_index];
//size limit determined in initialization
if (container_size >= 9999) return;
//insert new items
container[draw_order_index][container_size] = this;
//increase count
container_index[draw_order_index]++;
for (int i = 0; i < childs_size; i++)
childs[i]->Render(container, container_keys, container_index, keys_count);
this is the initialization :
when isRunning
set to false, the program terminate
int draw_orders = 200;
int array_size = 10000;
keys_count = 0;
container = new(std::nothrow) GameObject**[draw_orders];
if (container == nullptr) isRunning = false; running_error = 3; return;
container_keys = new(std::nothrow) int[draw_orders];
if (container_keys == nullptr) isRunning = false; running_error = 4; return;
container_index = new(std::nothrow) int[draw_orders];
if (container_index == nullptr) isRunning = false; running_error = 5; return;
for (int i = 0; i < draw_orders; ++i)
container[i] = new(std::nothrow) GameObject*[array_size];
if (container[i] == nullptr) isRunning = false; running_error = 6; return;
this is the call to the root object :
when render_dirty
is true the size indexes are set to zero and the data get repopulated and new draw orders get sorted, new draw order priority get sorted once in the lifetime of the program
if (render_dirty == true)
for (int i = 0; i < keys_count; i++)
container_index[i] = 0;
RootGameObject->Render(container, container_keys, container_index, &keys_count);
bool sort = true;
while (sort)
sort = false;
for (int i = keys_count - 1; i >= 1; i--)
if (container_keys[i] < container_keys[i - 1])
sort = true;
int high_draw_order = container_keys[i - 1];
container_keys[i - 1] = container_keys[i];
container_keys[i] = high_draw_order;
int high_index_size = container_index[i - 1];
container_index[i - 1] = container_index[i];
container_index[i] = high_index_size;
GameObject** high_containter = container[i - 1];
container[i - 1] = container[i];
container[i] = high_containter;
android c++ android-ndk
the crash happen rarely and i was not able to reproduce it on several android test devices.
the crash report is signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
can it be the result of UB that happened in a different place in the lifetime of the program? or can you spot an error in the following code?
why std::vector is not in use? execution speed is critical and this is faster, the implementation of the code with vector might been unoptimized and that what caused it to be slower.
what the code does :
create an array of arrays of objects that have a render method
create an int to keep track of the maximum index to use from the first array
create an array of int to keep track of the draw order of the first array
create an array of int to keep track of the capacity of the first array arrays
the code
this is the object function where the crash happen :
each object recursively call his child nodes
Render(GameObject*** container, int* container_keys, int* container_index, int* keys_count)
if (enable == false) return;
if (renderable != nullptr)
int draw_order_index = -1;
//search what index is equal to draw_order
for (int i = 0; i < *keys_count; i++)
if (renderable->draw_order == container_keys[i])
draw_order_index = i;
break;
//add new if not found
if (draw_order_index == -1)
draw_order_index = *keys_count;
//size limit determined in initialization
if (draw_order_index >= 199) return;
(*keys_count)++;
container_keys[draw_order_index] = renderable->draw_order;
container_index[draw_order_index] = 0;
//how many items in the array
int container_size = container_index[draw_order_index];
//size limit determined in initialization
if (container_size >= 9999) return;
//insert new items
container[draw_order_index][container_size] = this;
//increase count
container_index[draw_order_index]++;
for (int i = 0; i < childs_size; i++)
childs[i]->Render(container, container_keys, container_index, keys_count);
this is the initialization :
when isRunning
set to false, the program terminate
int draw_orders = 200;
int array_size = 10000;
keys_count = 0;
container = new(std::nothrow) GameObject**[draw_orders];
if (container == nullptr) isRunning = false; running_error = 3; return;
container_keys = new(std::nothrow) int[draw_orders];
if (container_keys == nullptr) isRunning = false; running_error = 4; return;
container_index = new(std::nothrow) int[draw_orders];
if (container_index == nullptr) isRunning = false; running_error = 5; return;
for (int i = 0; i < draw_orders; ++i)
container[i] = new(std::nothrow) GameObject*[array_size];
if (container[i] == nullptr) isRunning = false; running_error = 6; return;
this is the call to the root object :
when render_dirty
is true the size indexes are set to zero and the data get repopulated and new draw orders get sorted, new draw order priority get sorted once in the lifetime of the program
if (render_dirty == true)
for (int i = 0; i < keys_count; i++)
container_index[i] = 0;
RootGameObject->Render(container, container_keys, container_index, &keys_count);
bool sort = true;
while (sort)
sort = false;
for (int i = keys_count - 1; i >= 1; i--)
if (container_keys[i] < container_keys[i - 1])
sort = true;
int high_draw_order = container_keys[i - 1];
container_keys[i - 1] = container_keys[i];
container_keys[i] = high_draw_order;
int high_index_size = container_index[i - 1];
container_index[i - 1] = container_index[i];
container_index[i] = high_index_size;
GameObject** high_containter = container[i - 1];
container[i - 1] = container[i];
container[i] = high_containter;
android c++ android-ndk
android c++ android-ndk
asked Mar 8 at 8:13
dvrerdvrer
154111
154111
Include the crash dump with the back trace.
– Dan Albert
Mar 9 at 0:16
add a comment |
Include the crash dump with the back trace.
– Dan Albert
Mar 9 at 0:16
Include the crash dump with the back trace.
– Dan Albert
Mar 9 at 0:16
Include the crash dump with the back trace.
– Dan Albert
Mar 9 at 0:16
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55059114%2fandroid-crash-signal-11-sigsegv-code-1-segv-maperr%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55059114%2fandroid-crash-signal-11-sigsegv-code-1-segv-maperr%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Include the crash dump with the back trace.
– Dan Albert
Mar 9 at 0:16