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

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

Posts: 813
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Process 1780056901 (Zain) terminated SIGSEGV code=1 fltno=11 ip=00000000 image upload

void ApplicationUI::getPicture()
FilePicker* filePicker = new FilePicker();
filePicker->setTitle("Select Picture");
        SIGNAL(fileSelected(const QStringList&)),
        SLOT(onFileSelected(const QStringList&)));

      void ApplicationUI::onFileSelected(const QStringList& list) {
    QFile file (list[0]);
    ImageView* ay = root->findChild<ImageView*>("imageName");
    if(ay != NULL)
    QString body = "" ;
    QSettings settings("Netvariant", "Zain");
    QString locale_string = settings.value("lang").toString();
    if(locale_string == "ar")
        locale_string == "ar";
        locale_string = "en";
    const QUrl url("myurl");
     QHttpPart imagePart;
     imagePart.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("image/jpeg"));
     imagePart.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"imageFile\""));
     imagePart.setRawHeader("Content-ID", "my@content.id"); // add any headers you like via setRawHeader()
     QHttpMultiPart *multiPart = new QHttpMultiPart(QHttpMultiPart::FormDataType);
     file.setParent(multiPart); // we cannot delete the file now, so delete it with the multiPart
      QNetworkRequest request(url);

      QNetworkAccessManager* netManager = new QNetworkAccessManager(this);
      QNetworkReply *reply = netManager->post(request, multiPart);




please help me in uploading an image.

Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Process 1780056901 (Zain) terminated SIGSEGV code=1 fltno=11 ip=00000000 image upload

In my experience, the error you see is a result of an incorrect pointer, that you think is pointing at some object or storage you can use and is not. 


To track this down is usually pretty straight forward.  You run the code in the debugger, and when it breaks, the debugger stops on the statement that failed.  At that time you have access to the variables, and so you can check what is valid and what is not.


In my experience, these problems are always a result of some error in my code, for example, not checking that a pointer is valid, not initialising a pointer or freeing some object or storage that the pointer is referencing.  I strongly suspect you will find something wrong in your code.


But from the informaiton we have, we would just be guessing so we can't help you further.  Next time you report an error like this, I recommend you give us as much informaiton as you can, for example, the line that this exception is happening on, and the contents of the variables involved.  But as noted, in these sorts of errors, you will typically find the error very quickly yourself using the debugger.


Good luck.

Posts: 813
Registered: ‎05-29-2012
My Device: see later
My Carrier: see later

Re: Process 1780056901 (Zain) terminated SIGSEGV code=1 fltno=11 ip=00000000 image upload

My big question I have, how can i translate this fos.write(bos.toByteArray());
entity.addPart("imageFile", new FileBody(tempFile)); i have done in bb6 and android... multipartentity..
into bb10 ...in my post http call