Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt shows error
Qt 6.11 is out! See what's new in the release blog

Qt shows error

Scheduled Pinned Locked Moved Unsolved General and Desktop
error
5 Posts 3 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rameshwar
    wrote on last edited by
    #1

    Run the following code then this error shows :The program has unexpectedly finished.
    void MainWindow::on_Tx_clicked()
    {
    bcm2835_spi_begin();
    bcm2835_spi_setChipSelectPolarity(BCM2835_SPI_CS0,0);
    bcm2835_spi_setChipSelectPolarity(BCM2835_SPI_CS1,0);
    bcm2835_spi_setClockDivider(BCM2835_SPI_CLOCK_DIVIDER_128);
    bcm2835_spi_setDataMode(BCM2835_SPI_MODE3);
    bcm2835_spi_chipSelect(BCM2835_SPI_CS0);

        uint8_t data;
            data = bcm2835_spi_transfer((uint8_t)0x55);
            ui->textBrowser->setText(QString::number(data));
    

    }

    aha_1980A 1 Reply Last reply
    0
    • R Rameshwar

      Run the following code then this error shows :The program has unexpectedly finished.
      void MainWindow::on_Tx_clicked()
      {
      bcm2835_spi_begin();
      bcm2835_spi_setChipSelectPolarity(BCM2835_SPI_CS0,0);
      bcm2835_spi_setChipSelectPolarity(BCM2835_SPI_CS1,0);
      bcm2835_spi_setClockDivider(BCM2835_SPI_CLOCK_DIVIDER_128);
      bcm2835_spi_setDataMode(BCM2835_SPI_MODE3);
      bcm2835_spi_chipSelect(BCM2835_SPI_CS0);

          uint8_t data;
              data = bcm2835_spi_transfer((uint8_t)0x55);
              ui->textBrowser->setText(QString::number(data));
      

      }

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Rameshwar said in Qt shows error:

      The program has unexpectedly finished.

      Use a debugger and find out where it crashes. Most likely you are de-referencing an uninitialized or no longer valid pointer.

      Regards

      Qt has to stay free or it will die.

      R 1 Reply Last reply
      2
      • aha_1980A aha_1980

        @Rameshwar said in Qt shows error:

        The program has unexpectedly finished.

        Use a debugger and find out where it crashes. Most likely you are de-referencing an uninitialized or no longer valid pointer.

        Regards

        R Offline
        R Offline
        Rameshwar
        wrote on last edited by
        #3

        @aha_1980
        Ok, Thank you

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Rameshwar
          wrote on last edited by
          #4

          When run the above code then it displays "process killed by signal". how to solve it, please help me.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Andrew_moton
            wrote on last edited by
            #5

            Check return value from bcm2835_spi_begin() function;
            Maybe 0...

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved