« Return to Thread: problem with back-buffered widget

Re: problem with back-buffered widget

by jasonheb - Skype™ :: Rate this Message:

Reply to Author | View in Thread

On Tue, 2009-06-23 at 20:11 -0400, Michael Surette wrote:
> Thanks for the reply and the suggestion.  I do have one problem with
> your suggestion though, way too much work and not enough information
> back.  So what I did was put cout announcing the entry and exit of
> each method in the sudokuWindow class.  The results were quite
> interesting.  As you can see, my code wasn't active when the errors
> came out.  This really makes it tough to troubleshoot.  I'll keep
> sluging away at it until I find the answer.  Of course if you have any
> more suggestions, they're quite welcome.
>

Instead of writing cout to a file, you really could capture the Fox
traces. The quote below is from 'Re: En:Welcome to the "Foxgui-announce"
mailing list':

"FOX may have tracing enabled when you've compiled it in debug mode.
Passing -tracelevel XX on the command line of any FOX application will
cause lots of logging info to be written, the higher the level XX, the
more you will see [all FOX library trace info is at level 100 or higher
so as to allow this tracing mechanism to be used in your own programs as
well]."


>
> Thanks again.
>
>
> Mike
>
>




> log of ./fxSudoku >log 2>&1
>
>
>
> entering constructor
> leaving constructor
> entering create
> enter layoutBuffer
> leaving layoutBuffer
> leaving create
> entering onUpdBeep
> leaving onUpdBeep
> entering onUpdallhints
> leaving onUpdallhints
> entering onUpdcurshints
> leaving onUpdcurshints
> X Error: code 9 major 152 minor 4: BadDrawable (invalid Pixmap or
> Window parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> Picture parameter).
> X Error: code 170 major 152 minor 7: RenderBadPicture (invalid Picture
> parameter).
> entering onPaint
> enter layoutBuffer
> leaving layoutBuffer
> leaving onPaint
> entering onUpdBeep
> leaving onUpdBeep
> entering onUpdallhints
> leaving onUpdallhints
> entering onUpdcurshints
> leaving onUpdcurshints
>
>
>
>
> > ----- Original Message -----
> >
> > From: Jason Heblack
> >
> > Sent: 06/23/09 10:19 am
> >
> > To: Michael Surette
> >
> > Subject: Re: [Foxgui-users] problem with back-buffered widget
> >
> >  
> >
> >
> > Hi Mike,
> >
> > Put cout in every other line in the game to show where the problem
> > is.
> > Then redirect cout to a file and turn off buffering of cout.
> >
> > std::ofstream m_file;
> > std::streambuf* m_sbuf;
> >
> > #include
> > #include
> >
> > cout.setf(ios_base::unitbuf); //unbuffer cout
> > m_file.open ("test.txt");
> > m_sbuf = cout.rdbuf();
> > cout.rdbuf(m_file.rdbuf());
> > cout << "game line 1: This is sent to file" << endl;
> >
> > Jason
> >
> > On Sun, 2009-06-21 at 19:46 -0400, Michael Surette wrote:
> > > In order to learn the fox toolkit I decided to write a sudoku
> > game.
> > > It's not complete yet, but so far does what's expected of it
> > except
> > > for some confusing problems.
> > >
> > >
> > > When first started up it outputs to the console the following
> > errors:
> > >
> > >
> > > X Error: code 9 major 152 minor 4: BadDrawable (invalid Pixmap or
> > > Window parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 23: RenderBadPicture (invalid
> > > Picture parameter).
> > > X Error: code 170 major 152 minor 7: RenderBadPicture (invalid
> > Picture
> > > parameter).
> > >
> > >
> > >
>




------------------------------------------------------------------------------
_______________________________________________
Foxgui-users mailing list
Foxgui-users@...
https://lists.sourceforge.net/lists/listinfo/foxgui-users

 « Return to Thread: problem with back-buffered widget