Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5934649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:08:35+00:00 2026-05-22T15:08:35+00:00

I have a strange bug that appears to happen only when the program isn’t

  • 0

I have a strange bug that appears to happen only when the program isn’t executed from the terminal. Here is my project:
https://github.com/elliotpotts/Troll/
https://github.com/elliotpotts/Troll/issues/2

Look at the Troll::State::keyPressed() function. For some reason when I run the program from the terminal, everything is fine and the application exist but when I run it as a GUI program, the appliction doesn’t exit. I can’t think why. Thanks in advance, ell.

EDIT: Apologies for not adding Ogre tag and not posting the keyPressed function, here it is:

void Troll::State::keyPressed(const OIS::KeyEvent& event){
    if(event.key == OIS::KC_Q) {
        mCreator->stop();
    };
};

I have also tried adding file output to test it:

void Troll::State::keyPressed(const OIS::KeyEvent& event){
    std::cout << "Q was pressed" << std::endl;
    std::fstream file("log");
    file << "Q was pressed";
    file.close();
    if(event.key == OIS::KC_Q) {
        mCreator->stop();
    };
};

When run from the terminal, this works, otherwise, it does not. An added note, I do not have a functioning debugger at the moment which I am also trying to fix. Ell.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T15:08:36+00:00Added an answer on May 22, 2026 at 3:08 pm

    It turns out it was the IDE causing the problem, thanks for your help anyways, ell 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strange problem with mod_rewrite, the rules that are relevant here are:
I have a very strange bug in a shipping iPad/iPhone app that I can't
I have a really strange enum bug in Java. for(Answer ans : assessmentResult.getAnswersAsList()) {
I have a strange, sporadic issue. I have stored procedure that returns back 5
I have this strange bug with my popup menu. It happens rarely and seemingly
I have another strange bug which I cannot figure out. I try to create
I have datagrid and noticed strange bug: I set HeadersVisibility=All. And when move mouse
I have a Django site where a strange bug is occurring. On the site
I have strange problem with sharepoint and ajax functionality. We have an UpdatePanel placed
I have this strange call stack and I am stumped to understand why. It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.