Csound Csound-dev Csound-tekno Search About

[Csnd-dev] Debugging qt-csound app on Windows

Date2016-07-04 20:34
FromTarmo Johannes
Subject[Csnd-dev] Debugging qt-csound app on Windows
Hi,

I am writing a cross-platform app using Qt and Csound Api. It build and works fine but when I made an installer and try it on other computers, it sometimes fails.

The program was built on Windows 7 machine with Qt 5.5 (mingw-32bit) and Csoun 6.07beta from December 2015 (since this is the last 32-bit installer for Windows).

The crash happens when I start function that creates Csound object and runs the csd. How to debug it? I am stunned that command propt does not print any output?

Is there any lightweight debugger? I don't want and can't install Visual Studio in that machine.

I troed dependency walker but could not read out anything useful, it stated that some modules like API-MS-WIN-CORE-WINRT-ERROR-L1-0.DLL and files with similar name were missing. But the same was on the building computer, so I am not sure if it is the problem.

Very thankful for any advise!

tarmo

Date2016-07-04 23:00
FromTarmo Johannes
SubjectRe: [Csnd-dev] Debugging qt-csound app on Windows
Hi,

a bit more of the testing results:

The program works:
- on Windows XP (virtual machine, throws "Invlid entry point" errors (or I forgot what it exactly was), but after clicking on all "OK-s" it works as expected.
- on Linux under wine
- on Win 8.1 (virtual machine), when started from command prompt

BUT

fails on 8.1, if started from file manager (double clicking on the program).

I inserted some lines to logging to the file and I think the crash happens on line

cs = new Csound();

Can anyone guess, why? Especially if it works from command line?

greetings,
tarmo


2016-07-04 22:34 GMT+03:00 Tarmo Johannes <trmjhnns@gmail.com>:
Hi,

I am writing a cross-platform app using Qt and Csound Api. It build and works fine but when I made an installer and try it on other computers, it sometimes fails.

The program was built on Windows 7 machine with Qt 5.5 (mingw-32bit) and Csoun 6.07beta from December 2015 (since this is the last 32-bit installer for Windows).

The crash happens when I start function that creates Csound object and runs the csd. How to debug it? I am stunned that command propt does not print any output?

Is there any lightweight debugger? I don't want and can't install Visual Studio in that machine.

I troed dependency walker but could not read out anything useful, it stated that some modules like API-MS-WIN-CORE-WINRT-ERROR-L1-0.DLL and files with similar name were missing. But the same was on the building computer, so I am not sure if it is the problem.

Very thankful for any advise!

tarmo


Date2016-07-04 23:20
FromTarmo Johannes
SubjectRe: [Csnd-dev] Debugging qt-csound app on Windows
And one more curious finding:

When I start the program from command prompt from the folder where the .exe file is, it does not work. If I start from another directory (command prompt), it does.

The mysteries of windows...

But once again - is there a good way to debug it somehow? Any trick to get the program output (qDebug() messages to stdout)?

thanks,
tarmo

2016-07-05 1:00 GMT+03:00 Tarmo Johannes <trmjhnns@gmail.com>:
Hi,

a bit more of the testing results:

The program works:
- on Windows XP (virtual machine, throws "Invlid entry point" errors (or I forgot what it exactly was), but after clicking on all "OK-s" it works as expected.
- on Linux under wine
- on Win 8.1 (virtual machine), when started from command prompt

BUT

fails on 8.1, if started from file manager (double clicking on the program).

I inserted some lines to logging to the file and I think the crash happens on line

cs = new Csound();

Can anyone guess, why? Especially if it works from command line?

greetings,
tarmo


2016-07-04 22:34 GMT+03:00 Tarmo Johannes <trmjhnns@gmail.com>:
Hi,

I am writing a cross-platform app using Qt and Csound Api. It build and works fine but when I made an installer and try it on other computers, it sometimes fails.

The program was built on Windows 7 machine with Qt 5.5 (mingw-32bit) and Csoun 6.07beta from December 2015 (since this is the last 32-bit installer for Windows).

The crash happens when I start function that creates Csound object and runs the csd. How to debug it? I am stunned that command propt does not print any output?

Is there any lightweight debugger? I don't want and can't install Visual Studio in that machine.

I troed dependency walker but could not read out anything useful, it stated that some modules like API-MS-WIN-CORE-WINRT-ERROR-L1-0.DLL and files with similar name were missing. But the same was on the building computer, so I am not sure if it is the problem.

Very thankful for any advise!

tarmo



Date2016-07-05 00:26
FromRory Walsh
SubjectRe: [Csnd-dev] Debugging qt-csound app on Windows
Can you debug with gdb? It usually comes installed with mingw/msys, otherwise you can get binaries here:
You can simple place the gdb binary into the same folder as your .exe and run from there. No need to even install it. It will run just as it does on Linux. Don't forget to compile with debug info. 

On 4 July 2016 at 23:20, Tarmo Johannes <trmjhnns@gmail.com> wrote:
And one more curious finding:

When I start the program from command prompt from the folder where the .exe file is, it does not work. If I start from another directory (command prompt), it does.

The mysteries of windows...

But once again - is there a good way to debug it somehow? Any trick to get the program output (qDebug() messages to stdout)?

thanks,
tarmo

2016-07-05 1:00 GMT+03:00 Tarmo Johannes <trmjhnns@gmail.com>:
Hi,

a bit more of the testing results:

The program works:
- on Windows XP (virtual machine, throws "Invlid entry point" errors (or I forgot what it exactly was), but after clicking on all "OK-s" it works as expected.
- on Linux under wine
- on Win 8.1 (virtual machine), when started from command prompt

BUT

fails on 8.1, if started from file manager (double clicking on the program).

I inserted some lines to logging to the file and I think the crash happens on line

cs = new Csound();

Can anyone guess, why? Especially if it works from command line?

greetings,
tarmo


2016-07-04 22:34 GMT+03:00 Tarmo Johannes <trmjhnns@gmail.com>:
Hi,

I am writing a cross-platform app using Qt and Csound Api. It build and works fine but when I made an installer and try it on other computers, it sometimes fails.

The program was built on Windows 7 machine with Qt 5.5 (mingw-32bit) and Csoun 6.07beta from December 2015 (since this is the last 32-bit installer for Windows).

The crash happens when I start function that creates Csound object and runs the csd. How to debug it? I am stunned that command propt does not print any output?

Is there any lightweight debugger? I don't want and can't install Visual Studio in that machine.

I troed dependency walker but could not read out anything useful, it stated that some modules like API-MS-WIN-CORE-WINRT-ERROR-L1-0.DLL and files with similar name were missing. But the same was on the building computer, so I am not sure if it is the problem.

Very thankful for any advise!

tarmo




Date2016-07-05 08:08
FromTarmo Johannes
SubjectRe: [Csnd-dev] Debugging qt-csound app on Windows

Oh, that was a good hint about gdb.exe - so much better than installing 2.5 Gb of dependencies for MS WindDbg.
Thanks,
Tarmo

05.07.2016 2:27 kirjutas kuupäeval "Rory Walsh" <rorywalsh@ear.ie>:
Can you debug with gdb? It usually comes installed with mingw/msys, otherwise you can get binaries here:
You can simple place the gdb binary into the same folder as your .exe and run from there. No need to even install it. It will run just as it does on Linux. Don't forget to compile with debug info. 

On 4 July 2016 at 23:20, Tarmo Johannes <trmjhnns@gmail.com> wrote:
And one more curious finding:

When I start the program from command prompt from the folder where the .exe file is, it does not work. If I start from another directory (command prompt), it does.

The mysteries of windows...

But once again - is there a good way to debug it somehow? Any trick to get the program output (qDebug() messages to stdout)?

thanks,
tarmo

2016-07-05 1:00 GMT+03:00 Tarmo Johannes <trmjhnns@gmail.com>:
Hi,

a bit more of the testing results:

The program works:
- on Windows XP (virtual machine, throws "Invlid entry point" errors (or I forgot what it exactly was), but after clicking on all "OK-s" it works as expected.
- on Linux under wine
- on Win 8.1 (virtual machine), when started from command prompt

BUT

fails on 8.1, if started from file manager (double clicking on the program).

I inserted some lines to logging to the file and I think the crash happens on line

cs = new Csound();

Can anyone guess, why? Especially if it works from command line?

greetings,
tarmo


2016-07-04 22:34 GMT+03:00 Tarmo Johannes <trmjhnns@gmail.com>:
Hi,

I am writing a cross-platform app using Qt and Csound Api. It build and works fine but when I made an installer and try it on other computers, it sometimes fails.

The program was built on Windows 7 machine with Qt 5.5 (mingw-32bit) and Csoun 6.07beta from December 2015 (since this is the last 32-bit installer for Windows).

The crash happens when I start function that creates Csound object and runs the csd. How to debug it? I am stunned that command propt does not print any output?

Is there any lightweight debugger? I don't want and can't install Visual Studio in that machine.

I troed dependency walker but could not read out anything useful, it stated that some modules like API-MS-WIN-CORE-WINRT-ERROR-L1-0.DLL and files with similar name were missing. But the same was on the building computer, so I am not sure if it is the problem.

Very thankful for any advise!

tarmo




Date2016-07-05 23:02
FromAndres Cabrera
SubjectRe: [Csnd-dev] Debugging qt-csound app on Windows
You should also be able to debug within Qt Creator. If you are not building with Qt creator you can still start an external application in the Qt creator debugger frontend.

Cheers,
Andrés

On Tue, Jul 5, 2016 at 2:08 AM, Tarmo Johannes <trmjhnns@gmail.com> wrote:

Oh, that was a good hint about gdb.exe - so much better than installing 2.5 Gb of dependencies for MS WindDbg.
Thanks,
Tarmo

05.07.2016 2:27 kirjutas kuupäeval "Rory Walsh" <rorywalsh@ear.ie>:
Can you debug with gdb? It usually comes installed with mingw/msys, otherwise you can get binaries here:
You can simple place the gdb binary into the same folder as your .exe and run from there. No need to even install it. It will run just as it does on Linux. Don't forget to compile with debug info. 

On 4 July 2016 at 23:20, Tarmo Johannes <trmjhnns@gmail.com> wrote:
And one more curious finding:

When I start the program from command prompt from the folder where the .exe file is, it does not work. If I start from another directory (command prompt), it does.

The mysteries of windows...

But once again - is there a good way to debug it somehow? Any trick to get the program output (qDebug() messages to stdout)?

thanks,
tarmo

2016-07-05 1:00 GMT+03:00 Tarmo Johannes <trmjhnns@gmail.com>:
Hi,

a bit more of the testing results:

The program works:
- on Windows XP (virtual machine, throws "Invlid entry point" errors (or I forgot what it exactly was), but after clicking on all "OK-s" it works as expected.
- on Linux under wine
- on Win 8.1 (virtual machine), when started from command prompt

BUT

fails on 8.1, if started from file manager (double clicking on the program).

I inserted some lines to logging to the file and I think the crash happens on line

cs = new Csound();

Can anyone guess, why? Especially if it works from command line?

greetings,
tarmo


2016-07-04 22:34 GMT+03:00 Tarmo Johannes <trmjhnns@gmail.com>:
Hi,

I am writing a cross-platform app using Qt and Csound Api. It build and works fine but when I made an installer and try it on other computers, it sometimes fails.

The program was built on Windows 7 machine with Qt 5.5 (mingw-32bit) and Csoun 6.07beta from December 2015 (since this is the last 32-bit installer for Windows).

The crash happens when I start function that creates Csound object and runs the csd. How to debug it? I am stunned that command propt does not print any output?

Is there any lightweight debugger? I don't want and can't install Visual Studio in that machine.

I troed dependency walker but could not read out anything useful, it stated that some modules like API-MS-WIN-CORE-WINRT-ERROR-L1-0.DLL and files with similar name were missing. But the same was on the building computer, so I am not sure if it is the problem.

Very thankful for any advise!

tarmo