Re: MainLoop & 100% CPU



There is the point. It was my first hypothesis, then i've tried several version of the library, even friends tested and got the same bug. I think it comes from the fact that the Main Loop dont got anything to do.
To Be continued..

2007/11/22, Donny Viszneki <donny viszneki gmail com>:
Ouanilo,

Do not use sleep operations deal with this bug. Try downloading a
different binary or version of the library and try again. There is
clearly a bug here, but it is not in most binaries of this library.

On Nov 22, 2007 1:35 PM, Ouanilo Jérôme Medegan <ouanilo pro gmail com> wrote:
> Thank you friend. It worked out the problem :).. With a g_usleep(1000) ,
> (under 1000 still eats 100%)..
> Hoping that it won't decrease the execution speed significantly.. Anyway
> really weird bug..
>
> Thank you again..
>
> 2007/11/22, Kuang-Chun Cheng < kcc1967 gmail com>:
>
> > I don't know what happened.   I saw the same problem as you which only
> > happen in glib win32 port.  Maybe a bug ??  But there is an easy fix ...
> just add an idle callback
> > which call g_usleep() regularly ... that fix the CPU issue for me.
> >
> >
> > KC
> >
> >
> >
> > On Nov 22, 2007 9:31 PM, Ouanilo Jérôme Medegan < ouanilo pro gmail com>
> wrote:
> >
> > >
> > > Hi,
> > >
> > > Newbie to GLib, i've began design a little program based on this
> library. The problem is that my proggie always eats 100% of CPU. I've then
> made a tiny prog just to isolate the problem and finally got this code as
> Main Function :
> > >
> > > #include " windows.h"
> > > #include "glib.h"
> > >
> > > int WINAPI    WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
> LPSTR lpCmdLine, int nCmdShow)
> > > {
> > >     GMainLoop    *MainLoop = NULL;
> > >
> > >     MainLoop = g_main_loop_new(NULL, TRUE);
> > >     g_main_loop_run(MainLoop);
> > > }
> > >
> > > Even this minimalist program eats 100% CPU. And i don't have any idea of
> what i'm doing wrong. So if there is something i've forgotten to do, please
> help me to understand :).
> > > For information, i'm under Microsoft Visual Studio 2005 & using glib
> 2.12.9 (win32-dev)..
> > >
> > > Thx for reading..
> > >
> > > _______________________________________________
> > > gtk-list mailing list
> > > gtk-list gnome org
> > > http://mail.gnome.org/mailman/listinfo/gtk-list
> > >
> > >
> >
> >
>
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
>



--
http://www.socsurveys.org/
http://blogger.socsurveys.org/
http://del.icio.us/hdon



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]