Application when setting App crashes

So, I'm working on this example; https://github.com/thurberdog/BlackBerryCascades/tree/master/pushCollector

I wrote a function and added to app.cpp;

void App::registerToServer(QString apiURL, QUrl params)
{
    QUrl serviceUrl = QUrl(apiURL);
    QByteArray postData;
    postData = params.encodedQuery();

    QNetworkAccessManager *networkManager = new QNetworkAccessManager(this);

    networkManager->post(QNetworkRequest(serviceUrl),postData);

    // Connect to the reply finished signal.
    connect(networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(httpFinished(QNetworkReply*)));
}

void App::httpFinished(QNetworkReply* reply)
{
    qDebug() << "httpFinished called";
   // qDebug() << reply->readAll();
    int code = -1;
    QString description;
    QString returnCode;

    returnCode = reply->readAll();
    qDebug() << "RC: " + returnCode;
    if(returnCode.contains("rc=1001")){
        m_pushDAO.addTokenDB(getDevicePIN());
        showDialog(tr("Device Registration"), tr("Your device has been successfully registered!"));
        changeConnectionText("Connection Status: Connected!");

    } else if (returnCode == "rc=1002"){
        showDialog(tr("Device Registration"), tr("Unable to register your device. Please try again later. E1002"));
        changeConnectionText("Connection Status: Error E1002");
    } else if (returnCode == "rc=1003"){
        showDialog(tr("Device Registration"), tr("Your device has already been registered. Please login to your account online and remove you device. E1003"));
        changeConnectionText("Connection Status: E1003");
    } else if (returnCode == "rc=1004"){
        m_pushDAO.removeTokenDB();
        showDialog(tr("Device Unregistration"), tr("Your device has been unregistered."));
        changeConnectionText("Connection Status: Not Connected");
    } else if (returnCode == "rc=1005"){
        showDialog(tr("Device Unregistration"), tr("Unable to unregister from our servers. E1005"));
        changeConnectionText("Connection Status: Unable to unregister. E1005");
    }

    emit closeActivityDialog();

}

Now in the file Push.cpp, when I try to do;

App m_app;

m_app.registerToServer(etc etc)

My plant app with the following:

terminated SIGSEGV code=1 fltno=11

Any help would be appreciated! I'm pretty new to this, so go easy

Hello

the problem is that you said m_app type App, but it has no value and so when you try to call your function, you get a SIGSEGV. If you know Java, it's like a NullPointerException.

You need to pass a pointer to the object of your App in Push.cpp or allow to get one within the Push.cpp. One possibility is to use the Singleton pattern. See the Statemanager.hpp / Statemanager.cpp class in NfcTool for an example. You can just call YourClass-> getInstance() to get a pointer to the single instance of this class and then can call its functions/methods.

https://github.com/BlackBerry/Cascades-community-samples/BLOB/master/NfcTool/src/StateManager.hpp

Hope this helps

Martin

Tags: BlackBerry Developers

Similar Questions

  • Setting app Crash when I tried to put in place the home screen wallpaper

    The problem happen in previous IOS, occur after the upgrade to IOS 10.

    Restart your device by holding down the home and power button until the Apple logo appears.

    If you still experience the problem connect the device to a computer running iTunes and restore the machine like new. Make sure that you have a backup first.

    If it still fails then a reset of the device DFU.

    If this fails again to bring the tablet in an Apple store and have it checked.

  • I'm under 10.7.5 when I opened after effects CC application manager opens, then crashes... ideas?

    I'm under 10.7.5 when I opened after effects CC application manager opens, then crashes... ideas?

    Follow the procedure below


    N ° 1)

    Click on the Finder and search options listed next to icon located Apple in the upper left of the screen and click on the "Go" menu button and select 'utilities '.

    (Applications > Utiliites)

    Look for a CC Adobe and Adobe Application Manager folder under utility window and trash both folders.

    Step 2)

    Trash Adobe Creative cloud folder from Applications as well.

    Step 3)


    (1) right-click on the icon in the Finder, then select the option "Go-ToFolder .

    (2) you will get a text box, type in the following command and then press the 'return '. (Don't miss ~ symbol)

    ~/Library

    (3) then navigate to Application Support > Adobe.

    Open file Adobe and trash folders named AAMUpdater and OOBE.

    Step 4)

    (1) right-click on the icon in the Finder, then select 'Go - To' folder.

    (2) you will get a text box, type in the following command and then press the 'return '.

    / Library

    (3) then navigate to Application Support > Adobe.

    Open file Adobe and trash folders named AAMUpdater ,Adobe Application Manager and OOBE.

    Step 5)

    Click on the link below and download & run the cleaning of Adobe tool:

    Select the option "Adobe Application Manager for Mac OS X 10.6" and click on ""clean Selected " ."

    http://download.Macromedia.com/SupportTools/cleaner/Mac/AdobeCreativeCloudCleanerTool.dmg

    Step 6)

    Click on the link below and download Adobe Application Manager and install the same:

    http://download.Adobe.com/pub/Adobe/creativesuite/CC/Mac/ApplicationManager9.0_all.dmg

    Once installation is complete, niche is going disappear, and then open the Application folder and locate the icon to launch Adobe Application manager, double-click it and update.

    Once the update is complete. He shud launch Adobe Creative Cloud app.

    Then try to launch applications installed CC.

  • music app crashes on iOS when I press on play the song

    music app crashes on iOS when I press on play

    Hello ach1252,

    Thank you for using communities of Apple Support.

    From your post, I understand that when you press play to listen to a song in the music app, the music app crashes. I love listening to my music too! In a situation like this, I first recommend you restart your iPhone 6s.

    This article is the measures to restart your iPhone:

    Restart your iPhone, iPad or iPod touch

    If the problem persists after restarting your iPhone 6s, does happen with all the songs you are trying to read or it comes up with one of the songs you are trying to play?

    See you soon

  • Why my app crashes when in the dialer?

    I recently had a few crashes at reception or to make a call on my motorcycle g xt1032. I get a pop up saying unfortunately "contacts ceased." I am still able to make the call, but the pop up still until I press OK. Its really annoying that I have to press OK every time before answering a call.

    It's the recent updates of Lollipop for Google + which allows to create the questions and the Contacts app crash when you use the dialer on and outside. Very pretty darn boring and the last update on Google + do not resolve this problem for me yet. The simple but awkward solution is temporarily disable or uninstall the Google app + until they fix this annoying bug. It seems that the issue is not there when phones are updated to the lollipop, but it's still pretty boring for us with slow update schedules.

    TL; DR - disable Google + and the problems disappear!

  • I need help to restore my visual voicemail that has been erased when I got the application called "which app»

    I got the application called "which app ' via the app store two weeks ago and since my visual voicemail has disappeared. In talking with an associate at the apple store, they told me that that app turns your voicemail and sends it to their server, so you cannot retrieve all messages left on your phone.  I reached out to my carrier and despite my deposit, delivery number reset my voicemail and other efforts, I'm still not able to retrieve all messages default.

    Has anyone else had this experience or know a solution?

    http://www.whoapp.co/#/support

  • AIR app crash

    When an AIR application crashes on the device, is there a way to get a dump or track where the app crashed as you do when it crashes as an AIR on a desktop PC application?  On the PC, you get the window of the exception when the application is in debug mode, give you details where the application crashed.  I will have no problem as an AIR application on the desktop but it illregularly hangs on the device.

    I guess you know that you can debug the application on the desktop, or in the Simulator on the device in exactly in the same way? If you are running your application on the device in debug mode you can still see your tracing instructions, set breakpoints, inspect variables, view call stack etc etc. The debugger should stop on all exceptions, allowing you to inspect the exception object.

  • Windows 8.1 RT Skype app crashes after sending a file

    A friend tried to send me a file. I received a notification on the lockscreen. When I open Skype he went to the window of my friend. I tried to click on the file to receive it, but nothing worked. After a few seconds, Skype has minimized at bottom. I went to my Win 7 and got the file machine. Unfortunately, after that I could not discuss with this firend on my Surface. Whenever I received a msg from him and open Skype I could not answer, and the window is reduced after a few seconds. I ran some tests with another user and it turns out he gets not only minimized, it also loses the Internet connection. I uninstalled the app, restarted the Surface and reinstalled. Now my friend is "unlocked", I can discuss with him but when I try to send or receive a file Skype app crashes (reduced, lost connection). Newspapers to look like this:

    The failing application name: wwahost.exe, version: 6.3.9431.0, time stamp: 0x51bcd714
    The failed module name: MSHTML.dll, version: 11.0.9431.166, time stamp: 0x51c9103
    Exception code: 0xc0000005
    Offset: 0 x 00347573
    ID of the process failed: 0x1bc4
    Start time of application vulnerabilities: 0x01ce7a8b9e374ecf
    The failing application path: C:\WINDOWS\system32\wwahost.exe
    The failed module path: C:\WINDOWS\system32\MSHTML.dll
    Report ID: f0047b15-e67e-11e2-9110-9e086a87c5fb
    Failed package name: Microsoft.SkypeApp_1.8.0.110_arm__kzf8qxf38zg5c
    On a package of faults application ID: App

    It seems that, with the new version 8.1, this problem has been fixed on my machine from RT.

    Don't know if anyone has experienced the same thing?

  • Apps crash, black camera after 5.1.1 Android update.

    Yesterday on the 17sept I upgraded my z1 5.0.4 xperia android to android 5.1.1 and now I am facing a lot of questions after that. Some of my apps crashes suddenly. Two of my games does not start. Camera showed the unresponsing black screen twice for which I had to reboot my phone. Everything was fine before the upgrade. Please suggest something.

    He has just shown a splash screen for games and after a while a message: game does not want to close. Applications like mx arrested player when I tried to swipe left to move backwards in a video.
    .
    .
    .
    But after checking all the settings that I discovered that I had accidentally activated my option of developers... after having turned it off now I am able to play my games. Can be as well as the other problems are solved. But how developers option could cause these errors?

  • BlackBerry Z10 BlackBerry World app crashing on Z10 phone

    Hello BlackBerrians,
    I knew the World of BlackBerry app crashes when I try to run it on my Z10. I use a 100-2, with the OS 10.2.1.2102 STL. I get the message: "year error has occurred and BlackBerry World needs to close." Try to wait a few minutes and then reopen BlackBerry World'. This happened about a month now.
    I have to repeatedly open and close the application until it finally works. The updated OS that I applied was a small BlackBerry published approximately one month, there are or not. It is the only link I can associate with this error. Does anyone else know this problem? How can I solve it?
    Concerning

    I realized that when I swith off my WiFi connection and the use of the mobile data connection to connect to the BlackBerry World, it is not closing. I can then turn on the WiFi and continue normally. It's the work that I found about work. I'll use it until BlackBerry releases another update of its software OS10. Thanks for your help.

  • BlackBerry 10 Android apps crashes on BlackBerry Z10

    I had several instances when Android apps like Wechat, QQ and spark pay crashed when I most need. The new management team did a great job to let Android applications to run on BlackBerry. Now please have tech people address issues of crash. Thank you! And let's turnaround the fortunes of the BlackBerry.

    Is a BlackBerry I look at customer feedback and debugging messages? Please post a reply and let us know you guys are listening to your fans and working on issues. Thank you!

    You tried to delete > reboot > resinstall these android apps?

    From what source you install applications?

    Zenway wrote:

    Is a BlackBerry I look at customer feedback and debugging messages? Please post a reply and let us know you guys are listening to your fans and working on issues. Thank you!

    Cannot guarantee that anyone from BlackBerry is reading your post. It is a community of users support forum. We are not employees of BlackBerry, but volunteers who enjoy helping other users. BlackBerry staff rarely comment on queries posted here. You have noticed this in the message when registering and noted at the top of each page of this forum site.

    In addition, it is not specifically a customer feedback and debugging post forum.

  • CC App crash immediately after the launch, the Adobe solution worsens the problem

    Installed OSX El Capitan a few weeks there are applications used as usual until today, when I decided to try Lightroom. Launched application Adobe CC for the first time since before installing El Capitan. CC App crashed immediately, but I managed to close the session after several attempts. Logs back in, and each application stops working, closes unexpectedly with an error: 16.

    Try this solution without help: aunch.html https://helpx.adobe.com/Creative-Cloud/KB/CC-Desktop-application-Close-immediately-after-l

    Reformat the hard drive, reinstalled DVD Cougar, upgrade to El Capitan, to see whether the problem was related to the third party software. No help. Tried the solution tied once more and managed to launch Illustrator on the first run after install in safe mode, but it is broken as soon as I signed it in the CC system, still in safe mode. Does not not since. But: Now Adobe CC App works in mode without failure, but none of the applications, tried Illustrator and Dreamweaver. Nothing works in normal mode.

    Any suggestions?

    I contacted the Support, and I recommend others to a similar issue to do the same. Creating cloud still does not work, but my applications need.

  • Some Applications of 2015 CC Crash at launch on Mac OSX

    Some Applications of 2015 CC Crash at launch on Mac OSX

    This article refers to a problem where some applications CC 2015 crash when it is launched or just after its launch on Mac OSX. You can see the problem from the June 16 release of these applications.

    • After Effects CC 2015
    • Flash Pro CC 2015
    • Illustrator CC 2015
    • InDesign CC 2015
    • InCopy CC 2015
    • Photoshop CC 2015
    • Prelude CC 2015
    • First Pro CC 2015


    Here are the solutions. Solution 1 should be able to solve the problem. In the case where it does not, try the solution 2 and 3.


    Solution 1: Install Dreamweaver CC (2015)

    • On your Mac, open Adobe Creative Cloud Desktop Application and go to applications.
    • Install Dreamweaver CC (2015).


    Solution 2: Install Muse CC 2014.3.2

    • On your Mac, open Adobe Creative Cloud Desktop Application and go to applications.
    • Scroll down to FIND ADDITIONAL APPS, click Previous Version > VIEW PREVIOUS VERSIONS.
    • Click the Install of Muse, select CC 2014.3.2 (2014).


    Solution 3: Install Acrobat Pro DC

    • On your Mac, open Adobe Creative Cloud Desktop Application and go to applications.
    • Install Acrobat Pro DC.
    • You will be asked to uninstall old acrobat before you install Acrobat Pro DC.


    More information

    • When you upgrade an application CC 2014 2015 CC, you can choose to keep the 2014 version.
    • After you upgrade an application for 2015 of CC, you can also reinstall the CC 2014 version. Please refer to the procedure described in solution 2.

    Try disabling hide MenuBar in your system prefs - which seems to be a trigger for crash at startup in El Capitan...

  • Someone else is having their iOS Adobe AIR app crash in the first second of its opening?

    Someone else is having their iOS Adobe AIR app crash in the first second of its opening?

    I use the iPhone 6, iOS 8.1.3, with a development certificate.

    With Adobe AIR SDK 16.0.0.283 and now with 17.0.0.93, after compiling the application (whether release or debug mode), before the getTimer() app can never reach 999 milliseconds the app will crash. Any code that I have, it just hangs before the runtime can never reach the first second.

    Anyone else having this kind of behavior?

    Chris,

    Thanks for your quick response. I found a way to reproduce. It is on the interfaces, and when I try to call a method with an interface of the application hangs. I think it's related to interface with several parameters. I have connected the bug here:

    Bug #3935199 - iOS App crashes when you call a method of objects via interface

  • CC desktop app crash Mid-installation

    Hey,.

    I'm working in a post-production facility and whenever we need to install an update for CC, at least half of our machines experience problems with the application of Office CC - most of the questions have to do with software does not show up as installed (even if they are), and hit "install" again on these machines Removes the user's preferences. The biggest problem is when the desktop application will not launch, or it launches, but then crashes after a few seconds, with either the only way to bring him back.

    Needless to say that these issues are problematic, but given that the internet is flooded of complains I assume that you are already aware of them.

    The biggest problem is this time, one of the machines that took the Desktop App crash, don't launch the application after restarting.

    I tried following the instructions recommended, removed the app with the CC cleaning tool, have changed the name of OOBE OOBE.old folder, rebooted the machine again once and downloaded the latest version of the installer of the CC of the Adobe Web site.

    When you try to reinstall it, Setup reaches the phase 'Installation' and crashes (more like "disappears"), without giving any error massage.

    I would point out that the computer is a mac pro (running OS X 10.9), and, before you run the reinstall, I checked that no processes not related to adobe turned and manually made sure the CC desktop application has been completely removed. I also tried to install different users but get the same results.

    Have you seen this problem before? Is there anything else that I have not tried?

    Or alternatively, somehow download installers for the last update offline? To access installation offline programs would facilitate the way we update process, on us and on our bandwidth (for you connect to different machines and download updated same time and again is not the largest way, particularly when enforcement is so unpredictable and still has major problems).

    Thank you!
    Michael

    For people who might have the same problem - I ended up half - solve this by copying on and replace the entire CC Desktop App folder (under Applications > utilities) from another machine that worked very well.

    The Application is now able to launch, but for some reason, After Effects is stuck at 76% update, which gives an error message which AE should be closed before continuing. Thing is that AE is certainly not running - I took care of that by using the two monitor activity and through the command line and also tried to restart the machine, but still get the same error.

    I only tried to exit the application of CC desktop and launch of AE (which was obviously not updated), that chose "updates" from the inside of the AE. He launched the former adobe application Manager (the machine has also installed CS5) and installed the updates from there, where everything seems to install fine without any problem.

Maybe you are looking for

  • Replace the HARD drive in mid-2012 MBP of SSD?

    Given to replace my HARD drive of 1 TB in MBP mid-2012.  This MBP has already been customized (by Apple) to 2.9 GHz i7 8 GB mem. I'm looking for a solution at least to 1 TB also. How about this: Samsung 850 EVO 1 TB 2.5 inch SATA III internal SSD (MZ

  • Safari, Mail, Web links on iOS 9.3 do not work

    AfterUpdate 9.3 on my iPhone iOS 5 I can no longer click on the Google search links more. I try with Bing.com but do not work The same question in levant e-mail when you try to open the hyperlinks I resolved to see the links as follows: Search the si

  • MacBook pro running slow.

    This wonderful machine started running slowly. : (We are sure that his us not the machine, but we who did wrong somewhere along the line.) We saw type apple assistants resolve you this sort of thing well enough for people in a similar situation.  We

  • When you use a friend's PC, it asks for a password when I want to download Adobe Flash Player content, but my friend forgot her password

    Original title: download flash and movies? Buy computer friend, continues to ask for user password when I want to download adobe flash player or movies? she forgot her password do I do, can I access the data? ahhhhhhhhh

  • BlackBerry Smartphones old BBM

    Hi can anyone pls help, I have a problem with the new BBM, I don't want to, can someone give the link for BBM 6 or 7, this link (http://mobileapps.blackberry.com/devicesoftware/entry.do?code=bbm) says 'no software '.