Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

Exception in Release mode (Access Violation )

$
0
0
Hello everybody! I’m working with qt since a few months and wrote a medium-size program (a painting application with layers and several functions and tools). I worked in Debug mode and did not compile the program in release mode during the last weeks. Now, if I try to run it in release mode, I get an access violation (reading location 0.ffffffff…). I tried to figure out where the error is triggered by commenting out the code step by step. It turned out that the exception is only thrown, when I add the QListWidget (which I use to show the Layers in the LayersWindow) to the main-layout of this LayersWindow. LayersWindow.h  QVBoxLayout* mLayersLayout;  QListWidget* mLayerList; LayersWindow.cpp (in constructor)  mLayerList = new QListWidget();  mLayersLayout = new QVBoxLayout(this);  mLayersLayout->addWidget(mLayerList); <----  setLayout(mLayersLayout); If I remove the marked line, there is no exception. I wanted to make a small project so that anyone in this forum would be able to reproduce the error. But when I removed everything but this Lines from the whole project, the exception also did not show up. So I tried to remove the rest of the project bit by bit, but there seemed to be several statements that trigger the exception together… Does anyone have an idea how I could debug this error? I am programming C++ in Visual Studio 2010 on Windows 8. I make a 64-bit program, but I am pretty sure that the problem pre-existed before I changed to 64-bit. The exception is only triggered in Release-Mode, in Debug-Mode everything is working fine… I know that in Release-Mode, the variables are not initialized with default values like in Debug mode, but this did not help me to find the problem. I would be very happy if someone could help me with this! Greetings! eve

Viewing all articles
Browse latest Browse all 18427

Trending Articles