Hi Jacob,
as suggested already I also think it is an access to an array outside its boundaries. I encountered it 2-3 times and it always came down to this.
If you can run a ply 8 search is the node count exactly the same between debug and release, if not find the node where the difference occurs. In its vicinity the buggy code is triggered.
If up to ply 8 everything is equal, use another position to test or output some debug information at ply 9 to see how far the search still works.
So good luck
Thomas...
Newbie C++ compiling question
Moderators: hgm, Rebel, chrisw
-
- Posts: 686
- Joined: Thu Mar 03, 2011 4:57 pm
- Location: Germany
-
- Posts: 4052
- Joined: Thu May 15, 2008 9:57 pm
- Location: Berlin, Germany
- Full name: Sven Schüle
Re: Newbie C++ compiling question
You can also try to compile the release version with debug info still included, so that you can run your release version within the debugger, hoping that it will stop at the point of crash.
Sven
Sven
-
- Posts: 792
- Joined: Wed Jul 19, 2006 9:58 am
Re: Newbie C++ compiling question
This may be a stupid answer, but do you have any debug only code, such as asserts? It could be that something uninitialized / out of bounds is 'fixed' by debug mode only code. This has happened to me before.
Good luck
Richard
Good luck
Richard
-
- Posts: 80
- Joined: Wed Feb 17, 2010 3:57 pm
Re: Newbie C++ compiling question
Hi, I just want to thank everyone for their help. After a long week with painful debugging it now seems to work
Regards
Jacob
Regards
Jacob
-
- Posts: 4052
- Joined: Thu May 15, 2008 9:57 pm
- Location: Berlin, Germany
- Full name: Sven Schüle
Re: Newbie C++ compiling question
Nice to read that. But you write "it seems". Do you know what exactly had caused the trouble? Otherwise I would not consider it "solved", and it will most probably come back some day.jacobbl wrote:Hi, I just want to thank everyone for their help. After a long week with painful debugging it now seems to work
Regards
Jacob
Sven
-
- Posts: 80
- Joined: Wed Feb 17, 2010 3:57 pm
Re: Newbie C++ compiling question
Yes, I found a bug that made a variable get a wrong value. This variable was used as an index in an array. I've now played 300 games without a single crash. So it looks good
-
- Posts: 1822
- Joined: Thu Mar 09, 2006 11:54 pm
- Location: The Netherlands
Re: Newbie C++ compiling question
thumbs up!jacobbl wrote:Yes, I found a bug that made a variable get a wrong value. This variable was used as an index in an array. I've now played 300 games without a single crash. So it looks good
p.s. now let's hope it doesn't beat tomorrow already rybka 1.0
-
- Posts: 3232
- Joined: Mon May 31, 2010 1:29 pm
- Full name: lucasart
Re: Newbie C++ compiling question
Good newsjacobbl wrote:Yes, I found a bug that made a variable get a wrong value. This variable was used as an index in an array. I've now played 300 games without a single crash. So it looks good
But to prevent this kind of problem in the future, I strongly recommend that you encapsulate as much as possible intpo fuinctions (like accessors) with assert checks at the entry of each function.
I've got assert everywhere in my code, and things that get computed twice in different ways to double check their correctness with an assert statement. It saved my life **so** many times, you can't imagine...