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()?













-1















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;













share|improve this question






















  • Include the crash dump with the back trace.

    – Dan Albert
    Mar 9 at 0:16















-1















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;













share|improve this question






















  • Include the crash dump with the back trace.

    – Dan Albert
    Mar 9 at 0:16













-1












-1








-1








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;













share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 8 at 8:13









dvrerdvrer

154111




154111












  • 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





Include the crash dump with the back trace.

– Dan Albert
Mar 9 at 0:16












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
);



);













draft saved

draft discarded


















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















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

Understanding generators in Python2019 Community Moderator ElectionGenerator function not working pythonFor loop not executing two timesGenerators - Printing generated valuesWhy can a python generator only be used once?What exactly do generators do?What does the “yield” keyword do?What does “list comprehension” mean? How does it work and how can I use it?sklearn Kfold acces single fold instead of for loopIs a generator the callable? Which is the generator?Apply Border To Range Of Cells Using OpenpyxlCalling an external command in PythonWhat are metaclasses in Python?What is the difference between @staticmethod and @classmethod?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?Understanding slice notationUnderstanding Python super() with __init__() methodsDoes Python have a string 'contains' substring method?

How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page