<br><br><div class="gmail_quote">On 21 May 2010 16:55, Andrei Vishneuski <span dir="ltr"><<a href="mailto:vish@gravitysoft.org">vish@gravitysoft.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



  
  

<div text="#000000" bgcolor="#ffffff"><div><div></div><div class="h5">
On 05/21/2010 02:06 AM, Lex Trotman wrote:
<blockquote type="cite"><br>
  <br>
  <div class="gmail_quote">On 21 May 2010 02:49, Andrei Vishneuski <span dir="ltr"><<a href="mailto:vish@gravitysoft.org" target="_blank">vish@gravitysoft.org</a>></span>
wrote:<br>
  <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div style="word-wrap: break-word;">
    <div>
    <div><br>
    <div>
    <div>On 20 mei 2010, at 12:48, Lex Trotman wrote:</div>
    <br>
    <blockquote type="cite"><br>
      <br>
      <div class="gmail_quote">On 20 May 2010 20:20, Andrei Vishneuski <span dir="ltr"><<a href="mailto:vish@gravitysoft.org" target="_blank">vish@gravitysoft.org</a>></span>
wrote:<br>
      <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
        <div style="word-wrap: break-word;">
        <div>
        <div><br>
        <div>
        <div>On 20 mei 2010, at 11:42, Lex Trotman wrote:</div>
        <br>
        <blockquote type="cite"><br>
          <br>
          <div class="gmail_quote">On 20 May 2010 19:28, Andrei
Vishneuski <span dir="ltr"><<a href="mailto:vish@gravitysoft.org" target="_blank">vish@gravitysoft.org</a>></span>
wrote:<br>
          <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
            <div>
            <div><br>
On 19 mei 2010, at 22:34, Enrico Tröger wrote:<br>
            <br>
> On Tue, 18 May 2010 21:40:03 +0200, Andrei wrote:<br>
><br>
>> On 05/18/2010 01:31 PM, Andrei Vishneuski wrote:<br>
>>><br>
>>><br>
>>> On 18 mei 2010, at 13:22, Lex Trotman wrote:<br>
>>><br>
>>>><br>
>>>><br>
>>>> On 18 May 2010 20:37, Andrei Vishneuski <<a href="mailto:vish@gravitysoft.org" target="_blank">vish@gravitysoft.org</a><br>
>>>> <mailto:<a href="mailto:vish@gravitysoft.org" target="_blank">vish@gravitysoft.org</a>>>
wrote:<br>
>>>><br>
>>>>    I am big fun of Geany and have used it in Windows
and Linux as<br>
>>>> my primary development editor.<br>
>>>>    The problem is usage of Geany under Mac OSx.<br>
>>>>    Basically under Mac osx you have three options:<br>
>>>><br>
>>>>    1) Install port and install geany through the port.
This is the<br>
>>>>    most simple way. Geany looks a little bit ugly but
workable<br>
>>>> and fast. 2) Deploy native Mac OSx GTK (see gtk-osx).
More<br>
>>>> complicated way to use Geany. Geany looks more
integrated with Mac<br>
>>>> OSx, but it is SLOW !<br>
>>>>    3) Use virtual (Linux) machine. Not a graceful way
but better<br>
>>>>    than nothing.<br>
>>>><br>
>>>>    I have tried all three options. And unfortunately
only third<br>
>>>>    option is applicable.<br>
>>>><br>
>>>>    Options 1) and  2) has critical bug. If you try to
build<br>
>>>>    something geany starts consuming 100% CPU time !<br>
>>>>    It seems there is something wrong with process
output reading,<br>
>>>>    geany cannot correctly finalize it and stuck
somewhere in<br>
>>>> reading loop.<br>
>>>><br>
>>>>    Does anybody have the same experience and may be
just by chance<br>
>>>>    has found a workaround ?<br>
>>>><br>
>>>><br>
>>>><br>
>>>> Which versions of Geany and Glib and GTK?<br>
>>>><br>
>>> Geany 0.18.1<br>
>>> 1) Mac OSx port GTK2 2.18.2<br>
>>> 2) native gtk-osx GTK2 don't know exact version they are
supporting<br>
>>> (have to see my home PC to give you more information)<br>
>><br>
>> I little bit more about gtk-osx version: geany 0.18.1 (built
on May<br>
>> 18 2010 with GTK 2.18.2, GLib 2.22.2)<br>
>> Geany and gtk-osx has been compiled as i386 applications since
64bits<br>
>> version of gtk-osx is no stable yet.<br>
>><br>
>> PS: frankly speaking I think it is not GTK related bug, since
I have<br>
><br>
> It doesn't need to be a GTK/GLib bug but maybe we just use it
wrong or<br>
> it behaves differently on MacOSX or MacOSX behaves differently than<br>
> Linux/Unix. I can't say what's wrong and I don't have access to a<br>
> MacOSX system :(.<br>
            <br>
            <br>
            </div>
            </div>
Could you give me a brief use case how the build feature works (several
general steps) and point the file<br>
where I can find code responsible for it. May be I will try to take a
look at the<br>
problem closer (cannot guarantee since I have not used C/C++ for ages
:)). As far as I can see practically everything works:<br>
it executes appropriate tool for compilation, gets output from the
tool,  parses output and makes parsed results visible in compile<br>
window. But after that geany CPU load is 100%.<br>
          </blockquote>
          <div><br>
Oh, the load remains 100% forever after???  Do you get a success
message in the status bar?<br>
          <br>
Can you try the nightly build version but configure the "build" to run
a shell script that just does a delay so you can check if the load
starts before the end of the build or after completion.<br>
          <br>
 <br>
          </div>
          <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
I have tried geany night build and geany 0.17. They have the same
problem.<br>
            <br>
          </blockquote>
          <div><br>
Ok, thanks, 0.17 lets out new build bits I added :-) but we've still
got to fix the problem :-( <br>
          <br>
          </div>
          <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
PS: Buy the way, several days ago VirtualBox 3.2 has been released. One
of the very interested<br>
feature is support for Mac OSx. That means it is possible to install
original Mac OSx from<br>
original oficial DVD. It could be a good way to test geany for this
platform.<br>
          </blockquote>
          <div><br>
If one has a DVD, doesn't a Mac come from a place with golden arches??
Thats how much I know about them I'm afraid.<br>
          </div>
          </div>
        </blockquote>
        </div>
        <br>
        </div>
        </div>
        <div>The problem with Mac OSx is mac hardware uses more modern
PC (EFI instead of BIOS) architecture and of course it is impossible</div>
        <div>just to take official Mac OSx DVD and install it on any PC
even if the hardware has identical CPU/GPU/etc. And reverse: it is </div>
        <div>impossible to install Linux/Windows on mac hardware as is,
without special boot loaders that emulates BIOS existence. </div>
        <div><br>
        </div>
        <div>There are several  unofficial projects that modify (hack)
original DVD (most of them add special boot loader which makes Mac
OSx feels like </div>
        <div>it starts on PC with EFI).  What Virtual Box does it has
started supporting the modern PC architecture and as result you can
take original  Mac OSx </div>
        <div>(as far as I know it possible to buy Snow Leopard legally
in apple store) and install it as virtual machine. Of course, there are
still several</div>
        <div>problems, your hardware  (CPU/GPU/etc) should be
compatible with what Mac OSx can support. </div>
        <div>  </div>
        <div><br>
        </div>
        </div>
      </blockquote>
      <div><br>
AFAIK none of the Geany developers uses Macs so there is no reason for
anyone to spend money do it.  <br>
      <br>
But if you can help we are happy to provide all the guidance we can if
you can contribute by looking at the problem.  <br>
      <br>
If you get a chance to look at when the 100% starts would be good.<br>
      <br>
As I said in a post a couple back to Enrico (I see I didn't clearly
indicate I was talking to him, oops sorry) if the problem can't be
definitely found, another option is to try the way builds are run on
Windows, where they are synchronous and different methods are used to
interface to the subprocess.  So all is not lost yet.<br>
      <br>
To answer your question about where to look, all is in build.c, you
will see that there are #ifdefs that separate the windows and unix
code, look at the section headed "execute commands and handle results"
and the whole process starts at build_spawn_command().  If you can use
a debugger to find what loop its stuck in maybe we can narrow it down. 
I would assume its in the GTK event/monitor loop,  otherwise the
application wouldn't continue to work, possibly the monitor of the
subprocess pipe isn't terminating right and GTK keeps calling it with
no characters??<br>
      <br>
Cheers<br>
Lex<br>
      </div>
      </div>
    </blockquote>
    <br>
    </div>
    <div><br>
    </div>
    </div>
    </div>
    <div>The only thing I can say right now is "build_iofunc()"
executed infinitely, the function always returns TRUE (that is the
reason why it is never terminated, I think).</div>
    <div>Will see why ii is always true ...</div>
    <div><br>
    </div>
    <br>
    </div>
  </blockquote>
  <div>Ok, thats where I thought it would be, I'm not sure why, maybe
its GTK2.18 or OSX pipes but whatever, can you try the attached patch
that tries to pick up more conditions to stop.</div>
  </div>
</blockquote>
<br></div></div>
Debugging indicated that the section below starts getting condition =
G_IO_IN forever, but  "g_io_channel_read_line" can read nothing.<br>
I have tried to use additional reading method like read_char,
read_to_the_end. I have tried to flush pipe. None of it helped.<br>
The result workaround I have used shown below: <br>
<br>
<pre>if (cond & (G_IO_IN | G_IO_PRI))
        {
                gchar *msg;
+               int count = 0;
 
                while (g_io_channel_read_line(ioc, &msg, NULL, NULL, NULL) && msg)
                {
                        gint color = (GPOINTER_TO_INT(data)) ? COLOR_DARK_RED : COLOR_BLACK;
 
                        process_build_output_line(msg, color);
                        g_free(msg);
+                       count++
                }

+               if (count == 0) return FALSE;
        }
</pre>
<br>
It works, but doesn't give an answer why pipe says "there is still
something to read in the pipe".<br>
<br>
<br></div></blockquote><div><br>Hmmmmm....<br><br>Did you have a chance to test the patch that checks the return from g_io_channel_read_line?<br><br>Cheers<br>Lex <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div text="#000000" bgcolor="#ffffff">
<br>
</div>

<br>_______________________________________________<br>
Geany mailing list<br>
<a href="mailto:Geany@uvena.de">Geany@uvena.de</a><br>
<a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany</a><br>
<br></blockquote></div><br>