0
votes

i created a project in Visual Studio 2013 with Qt. I added Qt to VS2013 with the add-in and started to design a mainwindow in the Qt Creator.

My code looks like this : main.cpp :

#include "test2.h"
#include <QtWidgets/QApplication>
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    test2 w;
    w.show();
    return a.exec();
}

test2.h :

#ifndef TEST2_H
#define TEST2_H

#include <QtWidgets/QMainWindow>
#include "ui_test2.h"

class test2 : public QMainWindow
{
    Q_OBJECT

public:
    test2(QWidget *parent = 0);
    ~test2();

private:
    Ui::test2Class ui;
};

#endif // TEST2_H

test2.cpp :

#include "test2.h"

test2::test2(QWidget *parent)
    : QMainWindow(parent)
{
    ui.setupUi(this);
}

test2::~test2()
{

}

After this I built the solution and moved it to a virtual machine.

Visual Studio : 64 bit Release Version

Qt : Qt 5.3.2 for Windows 64-bit (VS 2013, OpenGL, 573 MB)

Virtual machine : 64 bit.

Installed the Visual C++ Redistributable für Visual Studio 2013 on the virtual machine.

The VmWarePlayer is used for the virtual machine.

On another normal 64bit computer everything works fine.

Problem signature:

Problem Event Name: APPCRASH

Application Name: test2.exe

Application Version: 0.0.0.0

Application Timestamp: 5434e66b

Fault Module Name: MSVCR120.dll

Fault Module Version: 12.0.21005.1

Fault Module Timestamp: 524f83ff

Exception Code: c000001d

Exception Offset: 0000000000095c01

OS Version: 6.1.7600.2.0.0.256.48

Locale ID: 1031

Additional Information 1: 6abf

Additional Information 2: 6abf78853a12e8504a5f26d8c231927b

Additional Information 3: 1f6d

Additional Information 4: 1f6d0c3c3ab43abf0b4e81f905afc8ea

My directory looks like this :

Directory

2
Why won't you run it under the visual studio debugger and see where it crashes? Most likely you're not checking the error code or a return value somewhere and are continuing in spite of errors. - Kuba hasn't forgotten Monica
Because it runs on every other computer with Windows 7 64 bit and even with Windows 8, in both, non virtual machines and virtual machines, i think the problem isnt the code its somewhere else. - orbatschow
That one VM is set up slightly differently than other VMs. So something somewhere fails, and your code (or maybe even Qt) doesn't handle it properly, and thus the crash. That's a likely scenario as well. So yes, the source of the problem is in the VM itself, but it manifests because the code is buggy, only that the bug is masked on systems that "act normally". Seriously, run it under the debugger and see where it crashes. That should be your step one. Always. I'm downvoting "it crashes" questions where the asker didn't even bother using the debugger. They show zero effort. - Kuba hasn't forgotten Monica
I tried it with 3 different vm's on my own computer and also ran the debugger, nothing helped the programm didnt even started, it just did nothing - orbatschow
Well, do you have the sources and do you compile it from the sources? Does it crash in the debug build, release build, or both? If you claim that the debugger can't even start the program under Visual Studio, then there's something very broken about your VM, or about the hardware where you run it. Run memtest86 for a day, then prime95 for another day, ensure there are no errors. - Kuba hasn't forgotten Monica

2 Answers

0
votes

I might have found the answer for my issue, to me it helped to install all updates for the virtual machine, after this my program was running without any problems.

0
votes

Some VMs have incorrect advanced instructions support. For example: native c++ application build in MSVC++ 2012/2013 x64 toolset with Advanced Vector Extensions (/arch:AVX) will CRASHED on VirtualBox with exception C000001d (invalid instruction code).

You should set project property Enable Enhanced Instruction Set to "Not Set". Only such x64 project configuration will work on all VMs.