Re: [Mingw-w64-public] Debugging with gdb/QtCreator

2012-05-15 Thread Earnie Boyd
On Mon, May 14, 2012 at 6:56 PM, Antony Riakiotakis  wrote:
> Ah, looks like the reason for the strange behaviour was my using
> release with debug info build type for cmake. Optimizations play funky
> with the debugger it seems. Now all is in order...phew.
>

If you're debugging code you should start by building without
optimization then move to adding the individual items of optimization
so you know which one is breaking the code.

> So, summarizing again for reference:
>
> * Make sure python 2.7 is installed
> * Make sure you don't enable any optimization in debug builds

But you need to consider that optimization may cause a bug.

-- 
Earnie
-- https://sites.google.com/site/earnieboyd

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Debugging with gdb/QtCreator

2012-05-14 Thread Antony Riakiotakis
Ah, looks like the reason for the strange behaviour was my using
release with debug info build type for cmake. Optimizations play funky
with the debugger it seems. Now all is in order...phew.

So, summarizing again for reference:

* Make sure python 2.7 is installed
* Make sure you don't enable any optimization in debug builds

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Debugging with gdb/QtCreator

2012-05-14 Thread Ruben Van Boxem
2012/5/14 K. Frank 

> Hi Ruben!
>
> On Mon, May 14, 2012 at 2:27 PM, Ruben Van Boxem
>  wrote:
> > 2012/5/14 Antony Riakiotakis 
> >>
> >> Hi,
> >>
> >> First, good news:
> >> MinGW-w64 support for blender is getting more complete by the day, ...
> > ...
> > I decided to build blender from source, which worked using the
> instructions
> > on the wiki. I built with WITH_OPENMP=ON, WITH_MINGW64=ON, and
> > CMAKE_BUILD_TYPE=Release, and default options for the rest.
> >
> > The blender executable I built (using my personal GCC 4.7.0 releas build)
> > crashes on exit (making every test fail), but otherwise it seems to work
> > fine.
> >
> > This is the output I get:
> > found bundled python: M:\Development\x64\blender\bin\2.63\python
> >
> > Blender quit
> > Assertion failed!
> >
> > Program: M:\Development\x64\blender\bin\blender.exe
> > File: ../../ilmbase-1.0.1/IlmThread/IlmThreadPosix.cpp, Line 84
> >
> > Expression: error == 0
> >
> > This application has requested the Runtime to terminate it in an unusual
> > way.
>
> Did you remember to compile with "-static"?
>
> (I'm only half joking.  I just burnt up a couple of hours tracking down
> an on-exit crash due to me using threads without "-static".)
>

Unrelated.

You really should grab one of my newer builds from the "old" directory.
This -static silliness was fixed more than a month ago.

Ruben


> > ...
> > I suppose this is either harmless, or a genuine bug. Note I haven't tried
> > anything other than starting blender and closing it again. I wanted to
> run
> > the tests first, but this is kind of show-stopping :)
> > ...
>
> Anyway, very cool about blender!
>
> Best.
>
>
> K. Frank
>
>
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Debugging with gdb/QtCreator

2012-05-14 Thread K. Frank
Hi Ruben!

On Mon, May 14, 2012 at 2:27 PM, Ruben Van Boxem
 wrote:
> 2012/5/14 Antony Riakiotakis 
>>
>> Hi,
>>
>> First, good news:
>> MinGW-w64 support for blender is getting more complete by the day, ...
> ...
> I decided to build blender from source, which worked using the instructions
> on the wiki. I built with WITH_OPENMP=ON, WITH_MINGW64=ON, and
> CMAKE_BUILD_TYPE=Release, and default options for the rest.
>
> The blender executable I built (using my personal GCC 4.7.0 releas build)
> crashes on exit (making every test fail), but otherwise it seems to work
> fine.
>
> This is the output I get:
> found bundled python: M:\Development\x64\blender\bin\2.63\python
>
> Blender quit
> Assertion failed!
>
> Program: M:\Development\x64\blender\bin\blender.exe
> File: ../../ilmbase-1.0.1/IlmThread/IlmThreadPosix.cpp, Line 84
>
> Expression: error == 0
>
> This application has requested the Runtime to terminate it in an unusual
> way.

Did you remember to compile with "-static"?

(I'm only half joking.  I just burnt up a couple of hours tracking down
an on-exit crash due to me using threads without "-static".)

> ...
> I suppose this is either harmless, or a genuine bug. Note I haven't tried
> anything other than starting blender and closing it again. I wanted to run
> the tests first, but this is kind of show-stopping :)
> ...

Anyway, very cool about blender!

Best.


K. Frank

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Debugging with gdb/QtCreator

2012-05-14 Thread Antony Riakiotakis
Hmmm...I really can't say.. unfortunately, openmp destabilizes the
build (crash when rendering subdivision modified objects) so it may be
causing the error with threading on your build. Also we bundle the
pthread library that came from a different MinGW64 build, which may
cause the issues with threading. This is most likely the reason. You
can try substituting the pthread.dll in the blender bin folder with
the one you have in your local MinGW64 build
It may also be possible to build openexr(The library that causes the
issue) without pthread support, I may have to look into that.

Anyway, since there is no "official" MinGW-w64 build currently, I had
to choose one of the builds that worked for library and blender
compilation, so we expect that users use only the specific build...It
would be a nightmare to support each and every one of them, especially
considering the various configuration options that MinGW64 builders
may use. I tried one of the builds from the MinGW64 build project that
was posted a few weeks ago on this list but it didn't work when
configuring some of the libraries(I think it was openexr interestingly
enough). Or maybe I wasn't insistent enough.

By the way, the debugger is still hopping around randomly (well,
within +-1 stack frame) whenever I try to debug anything through
QtCreator or Eclipse. I would really welcome some advice on that.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Debugging with gdb/QtCreator

2012-05-14 Thread Ruben Van Boxem
2012/5/14 Antony Riakiotakis 

> Hi,
>
> First, good news:
> MinGW-w64 support for blender is getting more complete by the day, to
> the point where users download and test (and may even prefer, due to
> the speed increase ;) ) mingw-w64 builds. There have been a few
> compiler-related issues but more like gcc-related than MinGW-64
> related I think (We had bugs creeping in due to aggressive
> optimization by -O3 and openmp by -fopenmp).
>

Great to hear! I noticed the post about the dramatic performance difference
yesterday.

I decided to build blender from source, which worked using the instructions
on the wiki. I built with WITH_OPENMP=ON, WITH_MINGW64=ON, and
CMAKE_BUILD_TYPE=Release, and default options for the rest.

The blender executable I built (using my personal GCC 4.7.0 releas build)
crashes on exit (making every test fail), but otherwise it seems to work
fine.

This is the output I get:
found bundled python: M:\Development\x64\blender\bin\2.63\python

Blender quit
Assertion failed!

Program: M:\Development\x64\blender\bin\blender.exe
File: ../../ilmbase-1.0.1/IlmThread/IlmThreadPosix.cpp, Line 84

Expression: error == 0

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.

I suppose this is either harmless, or a genuine bug. Note I haven't tried
anything other than starting blender and closing it again. I wanted to run
the tests first, but this is kind of show-stopping :)


>
> So! Next step is setting a development environment. I was an eclipse
> user before I discovered QtCreator but, unfortunately, while I have
> managed to make eclipse sort-of work(official gdb works but jumps
> around a lot in the source), I still haven't managed to get the
> QtCreator one work. I have downloaded python 2.7 and I am now using
> raylinn's gdb build (Since we also use his builds for blender). I have
> tweaked the options to point to the MinGW-w64 debugger instead of the
> QtCreator installed one. Looks like the debugger does fire up but I am
> getting some "Can't find xx.h" messages and then the debugger
> terminates. Also Eclipse crashes whenever it hits a breakpoint. Any
> headers to get a more or less working dev environment would be highly
> appreciated!
>
>
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> ___
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] Debugging with gdb/QtCreator

2012-05-14 Thread Antony Riakiotakis
Looks like I managed to make it work with QT too, sorry for the fuss.
Still when tracing with gdb the cursor seems to hop randomly in the
source...I don't know why that may be unfortunately :/

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public