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
Highlighted
New Contributor
Posts: 3
Registered: ‎07-20-2013
My Device: z10
My Carrier: tata docomo
Accepted Solution

Getting SIGSEGV segmentation fault when i download the images from server

I am gettting segmenation fault error when i tried to download images. I followed the following link to download the images from the server http://blackberry.github.io/Cascades-Samples/imageloader.html . when i tried to download more images(for sample 200 images) from the server i got the message as (/base/usr/lib/qt4/lib/libQtCore.so.4.8.4@_ZN27QEventDispatcherUNIXPrivate8doSelectE6QFlagsIN10QEventLoop17ProcessEventsFlagEEP7timeval+0x11f) mapaddr=001313c8. ref=00000011 bdslot=1 error. using the above sample code i am getting the same problem. Please suggest me the best approach to resolve this issue. I found that the problem with QnetworkaccessManager.

Developer
Posts: 1,008
Registered: ‎12-12-2010
My Device: Passport (Red Limited Edition)
My Carrier: Mobile Vikings

Re: Getting SIGSEGV segmentation fault when i download the images from server

Can you show your code?

-------------------------------------------
BlackBerry Certified Builder for Native Application Development -- Proud member of the Belgian BlackBerry Developer group
Samples: Park in Ghent
Feeling generous? Nominate me for BB Elite member!
Developer
Posts: 16,992
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Getting SIGSEGV segmentation fault when i download the images from server

welcome to the support forum.

i would suggest that you debug your application. the debugger shows the exact occurrence of the segfault and its stacktrace (unless it is in qml...), allowing you to see what exactly is null when it should not.

sigsegv means that either a pointer is null or it points to an invalid memory address, for example when it is not initialized or cleaned up properly.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Contributor
Posts: 3
Registered: ‎07-20-2013
My Device: z10
My Carrier: tata docomo

Re: Getting SIGSEGV segmentation fault when i download the images from server

It is very difficult to debug the application since the code is executed from the qml. besides,  QnetworkManager base network communication is asynchronous. the problem is mainly because of reply signal of network manager. when i try to execute at some point of time i am getting improper signal handling by network manager thus leading to segmentation (this is happening in asynchronous image downloading ). now I changed to sychronized image downloading approach it resloved my issue but with little performance considerations.

Thank you for the response. 

Kranthi talluri