Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
hackberry7779
Posts: 2
Registered: ‎10-15-2013
My Device: Z10
My Carrier: ATT

Segv at app startup after including an external library

I get the following Segv at app startup after including an external library (.so) that I built (c/c++)

 

Process 412516578 (bktestapp1) terminated SIGSEGV code=1 fltno=11 ip=79237d2e(/base/lib/libstdc++.so.6.0.16@_ZSt9has_facetISt5ctypeIcEEbRKSt6locale+0x19) mapaddr=00067d2e. ref=00000012

 

It appears to be a problem with loading the app/external dynamic lib as it looks like its dying before it executes any of the code I inserted into one of the very simple example apps I found in the blackberry startup doc

 

New to blackberry dev..Does anyone know what is causing this segv and/or how I can debug or work around it?

 

Thanks!

Please use plain text.
Developer
BBSJdev
Posts: 5,986
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: Segv at app startup after including an external library

You should be able to use normal debug techniques. i.e. breakpoints on lines before the first call to the library and within the library, console output etc..

 


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
New Contributor
hackberry7779
Posts: 2
Registered: ‎10-15-2013
My Device: Z10
My Carrier: ATT

Re: Segv at app startup after including an external library

Yeah, its dying before it gets to the 1st line/breakpoint in main - I assume as its loading this external shared library

Please use plain text.
Developer
BBSJdev
Posts: 5,986
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: Segv at app startup after including an external library

You could write a simple app that just pulls in the library and see if it exhibits the same behaviour.

Also whittle down the library to see whats causing the problem.


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
Developer
BBSJdev
Posts: 5,986
Registered: ‎07-05-2012
My Device: Playbook, Z10 LE, Dev Alpha C
My Carrier: Orange

Re: Segv at app startup after including an external library

Welcome to the forums by the way (I always forget that).


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Please use plain text.
BlackBerry Development Advisor (Retired)
mwoolley
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: Segv at app startup after including an external library

Hi

 

I think I hit exactly the same issue porting id3lib. I documented this and my solution here:

 

http://supportforums.blackberry.com/t5/Native-Development/Porting-Libraries-id3/td-p/2651731

 

See P5 under Possible Problems. 

 

Let me know if this helps

 

Martin

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
Please use plain text.