Thread: Re: [Screem-devel] Testing request
Status: Inactive
Brought to you by:
davek
From: Sven L. <sve...@ho...> - 2000-02-17 13:13:25
|
David Knight wrote : >Can those of you who use CVS versions please checkout the latest code and >try out the select context function available from the edit menu (not the >popup as it doesn't keep the highlight) I tested it very quickly on a very small page. It works most of the time but sometimes it selects nothing or too much : - if cursor is in <html> nothing is selected, works fine with cursor in </html> - if cursor is in <body> the whole page is selected, works fine with cursor in </body> After using the function in the popup (I know I shouldn't do that...) screem froze once. I couldn't reproduce the problem, maybe it's not related to using the popup. I will retest it on a bigger page as soon as I can. Sven ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com |
From: Sven L. <sve...@ho...> - 2000-02-19 05:15:08
|
I wrote : >- if cursor is in <html> nothing is selected, works fine with cursor > in </html> > >- if cursor is in <body> the whole page is selected, works fine with > cursor in </body> Well I think I should have gone through the code before sending this mail... As it stands "Select current context" searches for an opening tag before the cursor position. Thus if the cursor is IN such a tag the search goes ahead it and selects the enclosing context. This is somehow disturbing for me and I would find it better to stop the search immediately if we're already in a opening tag. BTW I had a strange behaviour when single stepping screem_editor_select_context() with gdb : const gchar *mime_type and gchar *text pointed to the same address after the call to screem_editor_get_text() ! Don't really like this.... Sven ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com |
From: David K. <da...@ri...> - 2000-02-19 19:30:44
|
Sven Liessem wrote: > Well I think I should have gone through the code before sending this > mail... As it stands "Select current context" searches for an > opening tag before the cursor position. Thus if the cursor is IN such > a tag the search goes ahead it and selects the enclosing context. > This is somehow disturbing for me and I would find it better to stop > the search immediately if we're already in a opening tag. I've changed the screem_editor_select_context() so that if the cursor is in an opening tag, then its that block that is selected, so: <hea|d> <title>this is a title</title> </head> Where the | is the cursor, would select all of the above as the context. The current_context function is also used in the auto closing tag feature, which is why I made the change in screem_editor_select_context() > BTW I had a strange behaviour when single stepping > screem_editor_select_context() with gdb : const gchar *mime_type and > gchar *text pointed to the same address after the call to > screem_editor_get_text() ! Don't really like this.... That is very strange behaviour, I can't even see how it could happen, as mime_type is set by calling screem_page_get_mime_type(), which returns a const char*, which is set when the page path is set from screem_page_set_pathname() by calling gnome_mime_type(), which itself returns a const char*. Whereas screem_page_get_text() returns a freshly malloced area of memory with the contents of the text widget, via gtk_editable_get_chars(). The problem I'm having with the select context is that it just seems unstable, and crashes on me after use, sometimes printing out a GDK-Error about a bad drawable. Although I think these are Gnome/GDK or even theme related problems rather than screem itself. Then again it could be related to whats happening with what you mention above. David -- Make your site SCREEM - Site Creating & Editing EnvironMent URL: http://www.screem.org/ Mail: da...@sc... |
From: Sven L. <sve...@ho...> - 2000-02-22 05:22:06
|
David Knight wrote: >I've changed the screem_editor_select_context() so that if the cursor is in Works great. Now I found another issue : if you set the cursor behind the final </html> tag and then call screem_editor_select_context(), the application crashes because in this case current_context() returns NULL and check_tag_closed() doesn't expect this. I also had several crashes after selecting a couple of contextes one after the other. Unfortunately no core file is generated and I didn't find out yet what exactly happens. I hope to be able to reproduce it in a gdb session to see where the problem is. I'll keep you informed. > > BTW I had a strange behaviour when single stepping > > screem_editor_select_context() with gdb : const gchar *mime_type and > > gchar *text pointed to the same address after the call to > > screem_editor_get_text() ! Don't really like this.... I still have this. As you mentionned it could be a Gnome issue. >The problem I'm having with the select context is that it just seems >unstable, and crashes on me after use, sometimes printing out a GDK-Error >about a bad drawable. Well I don't have GDK errors, only segmentation faults. It would be nice to have core files after a crash but gnome doesn't seem to generate them. Do you know if this can be forced somewhere ? Sven ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com |
From: David K. <da...@ri...> - 2000-02-22 21:47:11
|
Sven Liessem wrote: > Now I found another issue : if you set the cursor behind the final > </html> tag and then call screem_editor_select_context(), the > application crashes because in this case current_context() returns > NULL and check_tag_closed() doesn't expect this. fixed. > I also had several crashes after selecting a couple of contextes > one after the other. Unfortunately no core file is generated and I thats what I'm seeing. > >The problem I'm having with the select context is that it just seems > >unstable, and crashes on me after use, sometimes printing out a GDK-Error > >about a bad drawable. > > Well I don't have GDK errors, only segmentation faults. It would be > nice to have core files after a crash but gnome doesn't seem to > generate them. Do you know if this can be forced somewhere ? Gdk-ERROR **: BadPixmap (invalid Pixmap parameter) serial 19329 error_code 4 request_code 2 minor_code 0 Is what I get sometimes. I've managed to track this down to attempting to draw the icons in the edit menu, as the segfault seems to occur around 0x402f24eb in XCreateGC () and a couple of gnome_stock_... calls. Now this could be my own fault as I know I'm not pushing/popping colourmaps like I should be, or it could be Gnome/GDK at fault. David -- Make your site SCREEM - Site Creating & Editing EnvironMent URL: http://www.screem.org/ Mail: da...@sc... |