Discussion:
new filebrowser backend code merged
Olivier Sessink
2013-10-13 20:01:05 UTC
Permalink
Hi all,

I committed some massive patches today (in total more than 100k), but
the new filebrowser backend code is now functional. It's not yet fast
because it produces a massive amount of debugging information, I'll tune
that down soon.

Olivier

--
Bluefish website http://bluefish.openoffice.nl/
Blog http://oli4444.wordpress.com/
Andrius
2013-10-14 07:10:27 UTC
Permalink
Tried it and it works OK in general, although there are some small bugs that I will try to rectify later this week.
With old version I had some heavy-duty project that was crashing ~50% of time while opening due some issue in treemodel, with new version this crash seems to be gone. Thats good news!
Andrius




>________________________________
> From: Olivier Sessink <olivier-nC7VSXl9xTvubjhGYR2Sn81g+***@public.gmane.org>
>To: bluefish-dev-QLpEr2logwzILq5++***@public.gmane.org
>Sent: Sunday, October 13, 2013 11:01 PM
>Subject: new filebrowser backend code merged
>
>
>Hi all,
>
>I committed some massive patches today (in total more than 100k), but
>the new filebrowser backend code is now functional. It's not yet fast
>because it produces a massive amount of debugging information, I'll tune
>that down soon.
>
>Olivier
>
>--
>Bluefish website http://bluefish.openoffice.nl/
>Blog http://oli4444.wordpress.com/
>
>--
>To unsubscribe from this list: send the line "unsubscribe bluefish-dev" in
>the body of a message to listar-QLpEr2logwzILq5++***@public.gmane.org or visit the list control panel at http://www.ems.ru/cgi-bin/listargate.cgi
>Bluefish web site: http://bluefish.openoffice.nl/
>
>
>
>
Olivier Sessink
2013-10-14 16:41:14 UTC
Permalink
On 10/14/2013 09:10 AM, Andrius wrote:
> Tried it and it works OK in general, although there are some small bugs
> that I will try to rectify later this week.
> With old version I had some heavy-duty project that was crashing ~50% of
> time while opening due some issue in treemodel, with new version this
> crash seems to be gone. Thats good news!

do you notice any difference in speed or memory usage? (I hope it is
faster with less memory usage)

Olivier

--
Bluefish website http://bluefish.openoffice.nl/
Blog http://oli4444.wordpress.com/
Lindsay Haisley
2013-10-14 22:24:58 UTC
Permalink
On Mon, 2013-10-14 at 18:41 +0200, Olivier Sessink wrote:
> On 10/14/2013 09:10 AM, Andrius wrote:
> > Tried it and it works OK in general, although there are some small bugs
> > that I will try to rectify later this week.
> > With old version I had some heavy-duty project that was crashing ~50% of
> > time while opening due some issue in treemodel, with new version this
> > crash seems to be gone. Thats good news!
>
> do you notice any difference in speed or memory usage? (I hope it is
> faster with less memory usage)

I do notice that when I open a project, although previously open files
in the project are reopened, the filebrowser doesn't highlight the
reopened files, only those that are subsequently opened. This goes in
the category of minor annoyance, and I'm hoping the fix will be a minor
tweak.

--
Lindsay Haisley | "Everything works if you let it"
FMP Computer Services |
512-259-1190 | --- The Roadie
http://www.fmp.com |
Olivier Sessink
2013-10-15 20:37:24 UTC
Permalink
On 10/15/2013 12:24 AM, Lindsay Haisley wrote:
> I do notice that when I open a project, although previously open files
> in the project are reopened, the filebrowser doesn't highlight the
> reopened files, only those that are subsequently opened. This goes in
> the category of minor annoyance, and I'm hoping the fix will be a
> minor tweak.

should be fixed now!

Olivier

--
Bluefish website http://bluefish.openoffice.nl/
Blog http://oli4444.wordpress.com/
Andrius
2013-10-17 06:42:00 UTC
Permalink
This fix introduces some new problems... if file that project is opening is no longer on hard disk. Try this:
1. Delete one project file or move it to another location.
2. Open project.
3. Go to filebrowser-> right click-> chose refresh directory.
4. Then try to delete file from notebook -> close ir from menu that pops up -> this leads to bf crash.
I think we have to add some callback from project setup that would mark opened files as bold ones is they loaded successfully.
Andrius






>________________________________
> From: Olivier Sessink <olivier-nC7VSXl9xTvubjhGYR2Sn81g+***@public.gmane.org>
>To: bluefish-dev-QLpEr2logwzILq5++***@public.gmane.org
>Sent: Tuesday, October 15, 2013 11:37 PM
>Subject: Re: new filebrowser backend code merged
>
>
>On 10/15/2013 12:24 AM, Lindsay Haisley wrote:
>> I do notice that when I open a project, although previously open files
>> in the project are reopened, the filebrowser doesn't highlight the
>> reopened files, only those that are subsequently opened. This goes in
>> the category of minor annoyance, and I'm hoping the fix will be a
>> minor tweak.
>
>should be fixed now!
>
>Olivier
>
>--
>Bluefish website http://bluefish.openoffice.nl/
>Blog http://oli4444.wordpress.com/
>
>
>--
>To unsubscribe from this list: send the line "unsubscribe bluefish-dev" in
>the body of a message to listar-QLpEr2logwzILq5++***@public.gmane.org or visit the list control panel at http://www.ems.ru/cgi-bin/listargate.cgi
>Bluefish web site: http://bluefish.openoffice.nl/
>
>
>
>
Olivier Sessink
2013-10-17 09:41:21 UTC
Permalink
On 10/17/2013 08:42 AM, Andrius wrote:
> This fix introduces some new problems... if file that project is
> opening is no longer on hard disk. Try this:
> 1. Delete one project file or move it to another location.
> 2. Open project.
> 3. Go to filebrowser-> right click-> chose refresh directory.
> 4. Then try to delete file from notebook -> close ir from menu that
> pops up -> this leads to bf crash.
> I think we have to add some callback from project setup that would
> mark opened files as bold ones is they loaded successfully.
> Andrius

hmm I did not check if uri was NULL, I added a few checks, does that help?

Olivier

--
Bluefish website http://bluefish.openoffice.nl/
Blog http://oli4444.wordpress.com/
Andrius
2013-10-17 12:19:33 UTC
Permalink
It still crashes when closing missing file with traceback:
0   bluefish-bin                      0x0000000101b478fb get_treepath_for_record + 27
1   bluefish-bin                      0x0000000101b49a16 gtk_tree_model_record_changed + 54
2   bluefish-bin                      0x0000000101b49c98 filetreemodel_set_weight + 152
3   bluefish-bin                      0x0000000101b4c5d2 fb2_file_is_closed + 66
4   bluefish-bin                      0x0000000101b34d76 doc_set_uri + 102
5   bluefish-bin                      0x0000000101b3aa11 doc_destroy + 1265
6   bluefish-bin                      0x0000000101b5db37 doc_close_single_backend + 583
7   bluefish-bin                      0x0000000101b3cd91 doc_close_from_activate + 33
8   libglib-2.0.0.dylib               0x0000000102d6e73b g_idle_dispatch + 91
9   libglib-2.0.0.dylib               0x0000000102d6b4e0 g_main_dispatch + 496
Andrius




>________________________________
> From: Olivier Sessink <***@bluefish.openoffice.nl>
>To: bluefish-dev-QLpEr2logwzILq5++***@public.gmane.org
>Sent: Thursday, October 17, 2013 12:41 PM
>Subject: Re: new filebrowser backend code merged
>
>
>
>On 10/17/2013 08:42 AM, Andrius wrote:
>
>This fix introduces some new problems... if file that project is opening is no longer on hard disk. Try this:
>>1. Delete one project file or move it to another location.
>>2. Open project.
>>3. Go to filebrowser-> right click-> chose refresh
directory.
>>4. Then try to delete file from notebook -> close ir from
menu that pops up -> this leads to bf crash.
>>I think we have to add some callback from project setup that
would mark opened files as bold ones is they loaded
successfully.
>>Andrius
>>
>hmm I did not check if uri was NULL, I added a few checks, does that
help?
>
>
>Olivier
>
>--
Bluefish website http://bluefish.openoffice.nl/ Blog http://oli4444.wordpress.com/
>
>
Olivier Sessink
2013-10-17 13:40:03 UTC
Permalink
Thanks,

I think I found the real bug: I forgot to remove the record from the
hash table after I removed the record. So the hash table pointed to a
record that did not exist anymore.

Olivier

On 10/17/2013 02:19 PM, Andrius wrote:
> It still crashes when closing missing file with traceback:
> 0 bluefish-bin 0x0000000101b478fb
> get_treepath_for_record + 27
> 1 bluefish-bin 0x0000000101b49a16
> gtk_tree_model_record_changed + 54
> 2 bluefish-bin 0x0000000101b49c98
> filetreemodel_set_weight + 152
> 3 bluefish-bin 0x0000000101b4c5d2
> fb2_file_is_closed + 66
> 4 bluefish-bin 0x0000000101b34d76 doc_set_uri + 102
> 5 bluefish-bin 0x0000000101b3aa11 doc_destroy + 1265
> 6 bluefish-bin 0x0000000101b5db37
> doc_close_single_backend + 583
> 7 bluefish-bin 0x0000000101b3cd91
> doc_close_from_activate + 33
> 8 libglib-2.0.0.dylib 0x0000000102d6e73b g_idle_dispatch
> + 91
> 9 libglib-2.0.0.dylib 0x0000000102d6b4e0 g_main_dispatch
> + 496
> Andrius
>
>
> ------------------------------------------------------------------------
> *From:* Olivier Sessink <olivier-nC7VSXl9xTvubjhGYR2Sn81g+***@public.gmane.org>
> *To:* bluefish-dev-QLpEr2logwzILq5++***@public.gmane.org
> *Sent:* Thursday, October 17, 2013 12:41 PM
> *Subject:* Re: new filebrowser backend code merged
>
> On 10/17/2013 08:42 AM, Andrius wrote:
>> This fix introduces some new problems... if file that project is
>> opening is no longer on hard disk. Try this:
>> 1. Delete one project file or move it to another location.
>> 2. Open project.
>> 3. Go to filebrowser-> right click-> chose refresh directory.
>> 4. Then try to delete file from notebook -> close ir from menu
>> that pops up -> this leads to bf crash.
>> I think we have to add some callback from project setup that would
>> mark opened files as bold ones is they loaded successfully.
>> Andrius
>
> hmm I did not check if uri was NULL, I added a few checks, does that
> help?
>
>
> Olivier
>
> --
> Bluefish website http://bluefish.openoffice.nl/
> Blog http://oli4444.wordpress.com/
>
>
>


--
Bluefish website http://bluefish.openoffice.nl/
Blog http://oli4444.wordpress.com/
Andrius
2013-10-17 16:00:12 UTC
Permalink
Yes, the crash is fixed now.




>________________________________
> From: Olivier Sessink <olivier-nC7VSXl9xTvubjhGYR2Sn81g+***@public.gmane.org>
>To: bluefish-dev-QLpEr2logwzILq5++***@public.gmane.org
>Sent: Thursday, October 17, 2013 4:40 PM
>Subject: Re: new filebrowser backend code merged
>
>
>Thanks,
>
>I think I found the real bug: I forgot to remove the record from the
>hash table after I removed the record. So the hash table pointed to a
>record that did not exist anymore.
>
>Olivier
>
>On 10/17/2013 02:19 PM, Andrius wrote:
>> It still crashes when closing missing file with traceback:
>> 0  bluefish-bin                      0x0000000101b478fb
>> get_treepath_for_record + 27
>> 1  bluefish-bin                      0x0000000101b49a16
>> gtk_tree_model_record_changed + 54
>> 2  bluefish-bin                      0x0000000101b49c98
>> filetreemodel_set_weight + 152
>> 3  bluefish-bin                      0x0000000101b4c5d2
>> fb2_file_is_closed + 66
>> 4  bluefish-bin                      0x0000000101b34d76 doc_set_uri + 102
>> 5  bluefish-bin                      0x0000000101b3aa11 doc_destroy + 1265
>> 6  bluefish-bin                      0x0000000101b5db37
>> doc_close_single_backend + 583
>> 7  bluefish-bin                      0x0000000101b3cd91
>> doc_close_from_activate + 33
>> 8  libglib-2.0.0.dylib              0x0000000102d6e73b g_idle_dispatch
>> + 91
>> 9  libglib-2.0.0.dylib              0x0000000102d6b4e0 g_main_dispatch
>> + 496
>> Andrius
>>
>>
>>    ------------------------------------------------------------------------
>>    *From:* Olivier Sessink <olivier-nC7VSXl9xTvubjhGYR2Sn81g+***@public.gmane.org>
>>    *To:* bluefish-dev-QLpEr2logwzILq5++***@public.gmane.org
>>    *Sent:* Thursday, October 17, 2013 12:41 PM
>>    *Subject:* Re: new filebrowser backend code merged
>>
>>    On 10/17/2013 08:42 AM, Andrius wrote:
>>>    This fix introduces some new problems... if file that project is
>>>    opening is no longer on hard disk. Try this:
>>>    1. Delete one project file or move it to another location.
>>>    2. Open project.
>>>    3. Go to filebrowser-> right click-> chose refresh directory.
>>>    4. Then try to delete file from notebook -> close ir from menu
>>>    that pops up -> this leads to bf crash.
>>>    I think we have to add some callback from project setup that would
>>>    mark opened files as bold ones is they loaded successfully.
>>>    Andrius
>>
>>    hmm I did not check if uri was NULL, I added a few checks, does that
>>    help?
>>
>>
>>    Olivier
>>
>>    --
>>    Bluefish website http://bluefish.openoffice.nl/
>>    Blog http://oli4444.wordpress.com/
>>
>>
>>
>
>
>--
>Bluefish website http://bluefish.openoffice.nl/
>Blog http://oli4444.wordpress.com/
>--
>To unsubscribe from this list: send the line "unsubscribe bluefish-dev" in
>the body of a message to ***@lists.ems.ru or visit the list control panel at http://www.ems.ru/cgi-bin/listargate.cgi
>
>Bluefish web site: http://bluefish.openoffice.nl/
>
>
>
>
Andrius
2013-10-18 06:13:04 UTC
Permalink
Olivier,
When starting bf, in the log file there is message

** (bluefish-bin:11225): CRITICAL **: requested a record (n=0) beyond the end (ftm->num_rows=0)

I can see that it is originating from file_treemodel.c, line 136, but it is hard to say if it is really critical...  Can You look into it?
Andrius




>________________________________
> From: Andrius <andriusr-/***@public.gmane.org>
>To: "bluefish-dev-QLpEr2logwzILq5++***@public.gmane.org" <bluefish-dev-QLpEr2logwzILq5++***@public.gmane.org>
>Sent: Thursday, October 17, 2013 7:00 PM
>Subject: Re: new filebrowser backend code merged
>
>
>
>Yes, the crash is fixed now.
>
>
>
>
>>________________________________
>> From: Olivier Sessink <olivier-nC7VSXl9xTvubjhGYR2Sn81g+***@public.gmane.org>
>>To: bluefish-***@lists.ems.ru
>>Sent: Thursday, October 17, 2013 4:40 PM
>>Subject: Re: new filebrowser backend code merged
>>
>>
>>Thanks,
>>
>>I think I found the real bug: I forgot to remove the record from the
>>hash table after I removed the record. So the hash table pointed to a
>>record that did not exist anymore.
>>
>>Olivier
>>
>>On 10/17/2013 02:19 PM, Andrius wrote:
>>> It still crashes when closing missing file with traceback:
>>> 0  bluefish-bin                      0x0000000101b478fb
>>> get_treepath_for_record + 27
>>> 1  bluefish-bin                      0x0000000101b49a16
>>> gtk_tree_model_record_changed + 54
>>>
2  bluefish-bin                      0x0000000101b49c98
>>> filetreemodel_set_weight + 152
>>> 3  bluefish-bin                      0x0000000101b4c5d2
>>> fb2_file_is_closed + 66
>>> 4  bluefish-bin                      0x0000000101b34d76 doc_set_uri + 102
>>> 5  bluefish-bin                      0x0000000101b3aa11 doc_destroy + 1265
>>> 6  bluefish-bin                      0x0000000101b5db37
>>> doc_close_single_backend + 583
>>> 7  bluefish-bin                   
  0x0000000101b3cd91
>>> doc_close_from_activate + 33
>>> 8  libglib-2.0.0.dylib              0x0000000102d6e73b g_idle_dispatch
>>> + 91
>>> 9  libglib-2.0.0.dylib              0x0000000102d6b4e0 g_main_dispatch
>>> + 496
>>> Andrius
>>>
>>>
>>>    ------------------------------------------------------------------------
>>>    *From:* Olivier Sessink <***@bluefish.openoffice.nl>
>>>    *To:* bluefish-dev-QLpEr2logwzILq5++***@public.gmane.org
>>>    *Sent:* Thursday, October 17, 2013 12:41 PM
>>>    *Subject:* Re: new filebrowser backend code merged
>>>
>>>    On 10/17/2013 08:42 AM, Andrius wrote:
>>>>    This fix introduces some new problems... if file that project is
>>>>    opening is no longer on hard disk. Try this:
>>>>    1. Delete one project file or move it to another location.
>>>>    2. Open project.
>>>>    3. Go to filebrowser-> right click-> chose refresh directory.
>>>>    4. Then try to delete file from notebook -> close ir from menu
>>>>    that pops up -> this leads to bf crash.
>>>>    I think we have to add some
callback from project setup that would
>>>>    mark opened files as bold ones is they loaded successfully.
>>>>    Andrius
>>>
>>>    hmm I did not check if uri was NULL, I added a few checks, does that
>>>    help?
>>>
>>>
>>>    Olivier
>>>
>>>    --
>>>    Bluefish website http://bluefish.openoffice.nl/
>>>    Blog http://oli4444.wordpress.com/
>>>
>>>
>>>
>>
>>
>>--
>>Bluefish website http://bluefish.openoffice.nl/
>>Blog http://oli4444.wordpress.com/
>>--
>>To unsubscribe from this list: send the line "unsubscribe bluefish-dev" in
>>the body of a message to ***@lists.ems.ru or visit the list control panel at http://www.ems.ru/cgi-bin/listargate.cgi
>>
>>Bluefish web site: http://bluefish.openoffice.nl/
>>
>>
>>
>>
>
>
Olivier Sessink
2013-10-18 15:13:32 UTC
Permalink
On 10/18/2013 08:13 AM, Andrius wrote:
> Olivier,
> When starting bf, in the log file there is message
>
> ** (bluefish-bin:11225): CRITICAL **: requested a record (n=0) beyond
> the end (ftm->num_rows=0)
>
> I can see that it is originating from file_treemodel.c, line 136, but
> it is hard to say if it is really critical... Can You look into it?

Should be better now!

Olivier

--
Bluefish website http://bluefish.openoffice.nl/
Blog http://oli4444.wordpress.com/
Andrius
2013-10-20 19:30:46 UTC
Permalink
Below are few other minor issues with project loading.

First one might be caused by r8103, but I am not sure, it might have been there earlier.
After project load, the tooltips that shows file information when cursor is located in the notebook tab has only general data for the files that were in project already. Name, mime type, encoding. While new files that are opened at the later time, has much more detailed information, including size and date modified etc.
Other issue with r8103 and r8104 is that it is hard to make document following when file in the notebook is accessed for the first time. Pre-filled files has all iters in the treemodel, and it is not possible to refresh directory based on whether iter is present or not.

I just commited r8113 which is attempt to fix this issue, but it is not perfect, since it works only for first activated document. If project is complicated with files scattered in several folders, activating document in different folder fails to follow it in filebrowser.
The complete fix for issue would be to move register_delayed_refresh() to change_focus_to_file() and execute scroll_to_iter() in the callback after refresh is finished. But in this case we always will have 200 ms delay with document following, which might look too slow.
Any thoughts?
Andrius



>________________________________
> From: Andrius <andriusr-/***@public.gmane.org>
>To: "bluefish-dev-QLpEr2logwzILq5++***@public.gmane.org" <bluefish-dev-QLpEr2logwzILq5++***@public.gmane.org>
>Sent: Thursday, October 17, 2013 7:00 PM
>Subject: Re: new filebrowser backend code merged
>
>
>
>Yes, the crash is fixed now.
>
>
>
>
>>________________________________
>> From: Olivier Sessink <olivier-***@public.gmane.org.nl>
>>To: bluefish-dev-QLpEr2logwzILq5++***@public.gmane.org
>>Sent: Thursday, October 17, 2013 4:40 PM
>>Subject: Re: new filebrowser backend code merged
>>
>>
>>Thanks,
>>
>>I think I found the real bug: I forgot to remove the record from the
>>hash table after I removed the record. So the hash table pointed to a
>>record that did not exist anymore.
>>
>>Olivier
>>
>>On 10/17/2013 02:19 PM, Andrius wrote:
>>> It still crashes when closing missing file with traceback:
>>> 0  bluefish-bin                      0x0000000101b478fb
>>> get_treepath_for_record + 27
>>> 1  bluefish-bin                      0x0000000101b49a16
>>> gtk_tree_model_record_changed + 54
>>>
2  bluefish-bin                      0x0000000101b49c98
>>> filetreemodel_set_weight + 152
>>> 3  bluefish-bin                      0x0000000101b4c5d2
>>> fb2_file_is_closed + 66
>>> 4  bluefish-bin                      0x0000000101b34d76 doc_set_uri + 102
>>> 5  bluefish-bin                      0x0000000101b3aa11 doc_destroy + 1265
>>> 6  bluefish-bin                      0x0000000101b5db37
>>> doc_close_single_backend + 583
>>> 7  bluefish-bin                   
  0x0000000101b3cd91
>>> doc_close_from_activate + 33
>>> 8  libglib-2.0.0.dylib              0x0000000102d6e73b g_idle_dispatch
>>> + 91
>>> 9  libglib-2.0.0.dylib              0x0000000102d6b4e0 g_main_dispatch
>>> + 496
>>> Andrius
>>>
>>>
>>> 
>
Olivier Sessink
2013-10-21 07:11:51 UTC
Permalink
On 10/20/2013 09:30 PM, Andrius wrote:
> Below are few other minor issues with project loading.
> First one might be caused by r8103, but I am not sure, it might have
> been there earlier.
> After project load, the tooltips that shows file information when cursor
> is located in the notebook tab has only general data for the files that
> were in project already. Name, mime type, encoding. While new files that
> are opened at the later time, has much more detailed information,
> including size and date modified etc.

I have feeling what has caused this issue, I'll have a look at this. But
on my first test I cannot reproduce this...?

> Other issue with r8103 and r8104 is that it is hard to make document
> following when file in the notebook is accessed for the first time.

I don't understand exactly what the issue is. You mean that once the
window is shown, the active document is not 'followed' by the filebrowser?

Olivier

> Pre-filled files has all iters in the treemodel, and it is not possible
> to refresh directory based on whether iter is present or not.
> I just commited r8113 which is attempt to fix this issue, but it is not
> perfect, since it works only for first activated document. If project is
> complicated with files scattered in several folders, activating document
> in different folder fails to follow it in filebrowser.
> The complete fix for issue would be to move register_delayed_refresh()
> to change_focus_to_file() and execute scroll_to_iter() in the callback
> after refresh is finished. But in this case we always will have 200 ms
> delay with document following, which might look too slow.
> Any thoughts?
> Andrius
>
> ------------------------------------------------------------------------
> *From:* Andrius <andriusr-/***@public.gmane.org>
> *To:* "bluefish-dev-QLpEr2logwzILq5++***@public.gmane.org" <bluefish-dev-QLpEr2logwzILq5++***@public.gmane.org>
> *Sent:* Thursday, October 17, 2013 7:00 PM
> *Subject:* Re: new filebrowser backend code merged
>
> Yes, the crash is fixed now.
>
> ------------------------------------------------------------------------
> *From:* Olivier Sessink <olivier-nC7VSXl9xTvubjhGYR2Sn81g+***@public.gmane.org>
> *To:* bluefish-dev-QLpEr2logwzILq5++***@public.gmane.org
> *Sent:* Thursday, October 17, 2013 4:40 PM
> *Subject:* Re: new filebrowser backend code merged
>
> Thanks,
>
> I think I found the real bug: I forgot to remove the record from the
> hash table after I removed the record. So the hash table pointed
> to a
> record that did not exist anymore.
>
> Olivier
>
> On 10/17/2013 02:19 PM, Andrius wrote:
> > It still crashes when closing missing file with traceback:
> > 0 bluefish-bin 0x0000000101b478fb
> > get_treepath_for_record + 27
> > 1 bluefish-bin 0x0000000101b49a16
> > gtk_tree_model_record_changed + 54
> > 2 bluefish-bin 0x0000000101b49c98
> > filetreemodel_set_weight + 152
> > 3 bluefish-bin 0x0000000101b4c5d2
> > fb2_file_is_closed + 66
> > 4 bluefish-bin 0x0000000101b34d76
> doc_set_uri + 102
> > 5 bluefish-bin 0x0000000101b3aa11
> doc_destroy + 1265
> > 6 bluefish-bin 0x0000000101b5db37
> > doc_close_single_backend + 583
> > 7 bluefish-bin 0x0000000101b3cd91
> > doc_close_from_activate + 33
> > 8 libglib-2.0.0.dylib 0x0000000102d6e73b
> g_idle_dispatch
> > + 91
> > 9 libglib-2.0.0.dylib 0x0000000102d6b4e0
> g_main_dispatch
> > + 496
> > Andrius
> >
> >
> >
>
>
Olivier Sessink
2013-10-21 08:49:22 UTC
Permalink
On 10/20/2013 09:30 PM, Andrius wrote:
> Below are few other minor issues with project loading.
> First one might be caused by r8103, but I am not sure, it might have
> been there earlier.
> After project load, the tooltips that shows file information when cursor
> is located in the notebook tab has only general data for the files that
> were in project already. Name, mime type, encoding. While new files that
> are opened at the later time, has much more detailed information,
> including size and date modified etc.

I still haven't seen this issue, how do you reproduce it?

> Other issue with r8103 and r8104 is that it is hard to make document
> following when file in the notebook is accessed for the first time.
> Pre-filled files has all iters in the treemodel, and it is not possible
> to refresh directory based on whether iter is present or not.
> I just commited r8113 which is attempt to fix this issue, but it is not
> perfect, since it works only for first activated document. If project is
> complicated with files scattered in several folders, activating document
> in different folder fails to follow it in filebrowser.
>
> The complete fix for issue would be to move register_delayed_refresh()
> to change_focus_to_file() and execute scroll_to_iter() in the callback
> after refresh is finished. But in this case we always will have 200 ms
> delay with document following, which might look too slow.
> Any thoughts?
> Andrius

a completely different solution would be to keep focus when refreshing a
directory.

What I think that happens: fb2_file_is_opened() is the first function
that is called when a document is opened. It creates the file in the
treestore. After that, fb2_focus_document() is called (and the file does
exist in the treestore, so focus works). But now a refresh is called on
the directory which adds many files, and the file is scrolled out of
focus. Is this analysis correct?

Olivier
Andrius
2013-10-21 15:37:05 UTC
Permalink
Sorry for late reply, see my comments below, inline.




>________________________________
> From: Olivier Sessink <olivier-nC7VSXl9xTvubjhGYR2Sn81g+***@public.gmane.org>
>To: bluefish-dev-QLpEr2logwzILq5++***@public.gmane.org
>Sent: Monday, October 21, 2013 11:49 AM
>Subject: Re: new filebrowser backend code merged
>
>
>On 10/20/2013 09:30 PM, Andrius wrote:
>> Below are few other minor issues with project loading.
>> First one might be caused by r8103, but I am not sure, it might have
>> been there earlier.
>> After project load, the tooltips that shows file information when cursor
>> is located in the notebook tab has only general data for the files that
>> were in project already. Name, mime type, encoding. While new files that
>> are opened at the later time, has much more detailed information,
>> including size and date modified etc.
>
>I still haven't seen this issue, how do you reproduce it?
>
>Open the project, moe the mouse to one of the tabs, there will be tooltip with file information.
>Now open new file from filebrowser, or trough Open... dialog. Move the mouse to newly opened file. Tooltip will show a lot more information in comparison to other files. Thats what I am seeing.
>
>> Other issue with r8103 and r8104 is that it is hard to make document
>> following when file in the notebook is accessed for the first time.
>> Pre-filled files has all iters in the treemodel, and it is not possible
>> to refresh directory based on whether iter is present or not.
>> I just commited r8113 which is attempt to fix this issue, but it is not
>> perfect, since it works only for first activated document. If project is
>> complicated with files scattered in several folders, activating document
>> in different folder fails to follow it in filebrowser.
>>
>> The complete fix for issue would be to move register_delayed_refresh()
>> to change_focus_to_file() and execute scroll_to_iter() in the callback
>> after refresh is finished. But in this case we always will have 200 ms
>> delay with document following, which might look too slow.
>> Any thoughts?
>> Andrius
>
>a completely different solution would be to keep focus when refreshing a
>directory.
>
>What I think that happens: fb2_file_is_opened() is the first function
>that is called when a document is opened. It creates the file in the
>treestore. After that, fb2_focus_document() is called (and the file does
>exist in the treestore, so focus works). But now a refresh is called on
>the directory which adds many files, and the file is scrolled out of
>focus. Is this analysis correct?
>
>Yes, this is exactly what I am talking. Refresh moves file of interest out of the window.
>
>
>
>Olivier
>
>--
>To unsubscribe from this list: send the line "unsubscribe bluefish-dev" in
>the body of a message to listar-QLpEr2logwzILq5++***@public.gmane.org or visit the list control panel at http://www.ems.ru/cgi-bin/listargate.cgi
>Bluefish web site: http://bluefish.openoffice.nl/
>
>
>
>
>
Olivier Sessink
2013-10-21 20:43:06 UTC
Permalink
On 10/21/2013 05:37 PM, Andrius wrote:

> Yes, this is exactly what I am talking. Refresh moves file of
> interest out of the window.

I think I did a nice fix: I added a "directory changed" callback to the
file_treemodel, which is called after the treemodel has finished
updating a directory. I use the callback then to scroll the document
back into the visible position.

Olivier
Andrius
2013-10-22 09:50:02 UTC
Permalink
Now refresh work OK, file is scrolled to the center.
However, when I try to change directory from dirmenu (above filebrowser window), I have crash:

0   bluefish-bin                      0x00000001080badca dir_changed_lcb + 42
1   bluefish-bin                      0x00000001080b28a8 enumerator_close_lcb + 232
2   libgio-2.0.0.dylib                0x0000000108d9147d close_async_callback_wrapper + 157
3   libgio-2.0.0.dylib                0x0000000108de47d3 g_task_return_now + 67
4   libgio-2.0.0.dylib                0x0000000108de4808 complete_in_idle_cb + 24
5   libglib-2.0.0.dylib               0x00000001092dd73b g_idle_dispatch + 91

I could not reproduce it reliably, it happens when there are several projects opened, and I am trying to access directory from dirmenu that is outside basedir.


Andrius



>________________________________
> From: Olivier Sessink <olivier-nC7VSXl9xTvubjhGYR2Sn81g+***@public.gmane.org>
>To: bluefish-dev-QLpEr2logwzILq5++***@public.gmane.org
>Sent: Monday, October 21, 2013 11:43 PM
>Subject: Re: new filebrowser backend code merged
>
>
>On 10/21/2013 05:37 PM, Andrius wrote:
>
>>    Yes, this is exactly what I am talking. Refresh moves file of
>>    interest out of the window.
>
>I think I did a nice fix: I added a "directory changed" callback to the
>file_treemodel, which is called after the treemodel has finished
>updating a directory. I use the callback then to scroll the document
>back into the visible position.
>
>
>Olivier
>
>
>--
>To unsubscribe from this list: send the line "unsubscribe bluefish-dev" in
>the body of a message to ***@lists.ems.ru or visit the list control panel at http://www.ems.ru/cgi-bin/listargate.cgi
>Bluefish web site: http://bluefish.openoffice.nl/
>
>
>
>
Olivier Sessink
2013-10-22 14:12:29 UTC
Permalink
On 10/22/2013 11:50 AM, Andrius wrote:
[..]
> I could not reproduce it reliably, it happens when there are several
> projects opened, and I am trying to access directory from dirmenu that
> is outside basedir.

probably fixed in revision 8117.

Olivier
Andrius
2013-10-22 15:55:34 UTC
Permalink
Unfortunately, it did not fixed crash, however, I found the way to reproduce it reliably.
1. Open a project.
2. Then open the second project. Activate different tabs several times. Then close the project.
3. Then open the third project - > bf crashes with the backtrace as below. Running with gdb did not produced any line number where error happens.
This actually might be related to MacOSX. Can somebody see this on other systems?
Andrius





>________________________________
> From: Olivier Sessink <olivier-nC7VSXl9xTvubjhGYR2Sn81g+***@public.gmane.org>
>To: bluefish-dev-QLpEr2logwzILq5++***@public.gmane.org
>Sent: Tuesday, October 22, 2013 5:12 PM
>Subject: Re: new filebrowser backend code merged
>
>
>On 10/22/2013 11:50 AM, Andrius wrote:
>[..]
>> I could not reproduce it reliably, it happens when there are several
>> projects opened, and I am trying to access directory from dirmenu that
>> is outside basedir.
>
>probably fixed in revision 8117.
>
>
>Olivier
>
>
>--
>To unsubscribe from this list: send the line "unsubscribe bluefish-dev" in
>the body of a message to listar-QLpEr2logwzILq5++***@public.gmane.org or visit the list control panel at http://www.ems.ru/cgi-bin/listargate.cgi
>Bluefish web site: http://bluefish.openoffice.nl/
>
>
>
>
Olivier Sessink
2013-10-22 19:57:32 UTC
Permalink
On 10/22/2013 05:55 PM, Andrius wrote:
> Unfortunately, it did not fixed crash, however, I found the way to
> reproduce it reliably.
> 1. Open a project.
> 2. Then open the second project. Activate different tabs several times.
> Then close the project.
> 3. Then open the third project - > bf crashes with the backtrace as
> below. Running with gdb did not produced any line number where error
> happens.
> This actually might be related to MacOSX. Can somebody see this on other
> systems?
> Andrius

I'll test. You forgot the backtrace, can you send it?

Olivier
Olivier Sessink
2013-10-22 20:28:56 UTC
Permalink
On 10/22/2013 05:55 PM, Andrius wrote:
> Unfortunately, it did not fixed crash, however, I found the way to
> reproduce it reliably.
> 1. Open a project.
> 2. Then open the second project. Activate different tabs several times.
> Then close the project.
> 3. Then open the third project - > bf crashes with the backtrace as
> below. Running with gdb did not produced any line number where error
> happens.
> This actually might be related to MacOSX. Can somebody see this on other
> systems?
> Andrius

never mind the backtrace, this was a stupid bug. The callback was not
removed for a window that was destroyed.

fixed in svn.

Olivier
Andrius
2013-10-23 09:54:41 UTC
Permalink
Now it is working without crashes!
I found one more issue, though.
When I am in Tree or Dual mode and select root directory ("/") to display from dirmenu, the filebrowser window gets blank and stuck. In the log file I see the message
(bluefish-bin:13220): Gtk-CRITICAL **: gtk_tree_model_get_iter: assertion 'path->depth > 0' failed
Actually there is a lot of these messages.
I can restore operation by switching to Flat mode. In flat mode content of root is displayed correctly. So there should be something specific to Tree and Dual views that prevents displaying it.
Andrius



>________________________________
> From: Olivier Sessink <olivier-nC7VSXl9xTvubjhGYR2Sn81g+***@public.gmane.org>
>To: bluefish-dev-QLpEr2logwzILq5++***@public.gmane.org
>Sent: Tuesday, October 22, 2013 11:28 PM
>Subject: Re: new filebrowser backend code merged
>
>
>On 10/22/2013 05:55 PM, Andrius wrote:
>> Unfortunately, it did not fixed crash, however, I found the way to
>> reproduce it reliably.
>> 1. Open a project.
>> 2. Then open the second project. Activate different tabs several times.
>> Then close the project.
>> 3. Then open the third project - > bf crashes with the backtrace as
>> below. Running with gdb did not produced any line number where error
>> happens.
>> This actually might be related to MacOSX. Can somebody see this on other
>> systems?
>> Andrius
>
>never mind the backtrace, this was a stupid bug. The callback was not
>removed for a window that was destroyed.
>
>fixed in svn.
>
>
>Olivier
>
>
>--
>To unsubscribe from this list: send the line "unsubscribe bluefish-dev" in
>the body of a message to listar-QLpEr2logwzILq5++***@public.gmane.org or visit the list control panel at http://www.ems.ru/cgi-bin/listargate.cgi
>Bluefish web site: http://bluefish.openoffice.nl/
>
>
>
>
Olivier Sessink
2013-10-23 12:27:31 UTC
Permalink
On 10/23/2013 11:54 AM, Andrius wrote:
> Now it is working without crashes!
> I found one more issue, though.
> When I am in Tree or Dual mode and select root directory ("/") to
> display from dirmenu, the filebrowser window gets blank and stuck.

this was caused by an old bug.

this:

if (!gtk_tree_path_get_depth(newroot) > 1 || !gtk_tree_path_up(useroot)) {

is not the same as (the correct version):

if (!(gtk_tree_path_get_depth(newroot) > 1) || !gtk_tree_path_up(useroot)) {

funny that it only becomes visible now.

Olivier
Loading...