From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dirk Farin Newsgroups: gmane.emacs.bugs Subject: emacs hangs in c++ font-lock-mode Date: Thu, 14 Apr 2005 12:24:51 +0200 Message-ID: <425E44F3.30108@tue.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080301050907010602060005" X-Trace: sea.gmane.org 1113477738 18661 80.91.229.2 (14 Apr 2005 11:22:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Apr 2005 11:22:18 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 14 13:22:15 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DM2PO-0007l3-Vl for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Apr 2005 13:21:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DM2Sg-0004I2-AS for geb-bug-gnu-emacs@m.gmane.org; Thu, 14 Apr 2005 07:24:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DM1hu-0006mk-1d for bug-gnu-emacs@gnu.org; Thu, 14 Apr 2005 06:36:22 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DM1dS-0005hb-Js for bug-gnu-emacs@gnu.org; Thu, 14 Apr 2005 06:31:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DM1aJ-0003yJ-SX for bug-gnu-emacs@gnu.org; Thu, 14 Apr 2005 06:28:32 -0400 Original-Received: from [131.155.2.7] (helo=pastinakel.tue.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DM1XN-0006KZ-5m for bug-gnu-emacs@gnu.org; Thu, 14 Apr 2005 06:25:29 -0400 Original-Received: by pastinakel.tue.nl (Postfix, from userid 40) id E94FF14BCA8; Thu, 14 Apr 2005 12:24:51 +0200 (CEST) Original-Received: from [131.155.26.4] (MBS-PC067.dti.tue.nl [131.155.26.4]) by pastinakel.tue.nl (Postfix) with ESMTP id 7BDC814BC2E for ; Thu, 14 Apr 2005 12:24:51 +0200 (CEST) User-Agent: Debian Thunderbird 1.0 (X11/20050116) X-Accept-Language: en-us, en Original-To: bug-gnu-emacs@gnu.org X-Spam-DCC: : X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:11157 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:11157 This is a multi-part message in MIME format. --------------080301050907010602060005 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, I have got a C++ source file that causes "GNU Emacs 21.4.1" (current Debian testing) to hang with 100% cpu. To reproduce the bug, load the attached source file and turn font-lock-mode on in C++ mode. If you move the cursor down, at some position, emacs will hang and accept no more keyboard inputs. Regards, Dirk --------------080301050907010602060005 Content-Type: text/x-c++src; name="main.cc" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="main.cc" #include #include #include #include #include #include using namespace videogfx; //using namespace std; Glib::RefPtr refXml; Gnome::UI::App* pApp = 0; // main window struct SourceImage { std::string name; Image img; }; DynArray g_images; void on_menu_item_activated() { std::cout << "add\n"; } void AddImageToList() { Gtk::FileChooserDialog dialog("Please choose an image", Gtk::FILE_CHOOSER_ACTION_OPEN); dialog.set_transient_for(*pApp); //Add response buttons the the dialog: dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); dialog.add_button(Gtk::Stock::OPEN, Gtk::RESPONSE_OK); //Add filters, so that only certain file types can be selected: #if 0 Gtk::FileFilter filter_text; filter_text.set_name("Text files"); filter_text.add_mime_type("text/plain"); dialog.add_filter(filter_text); Gtk::FileFilter filter_cpp; filter_cpp.set_name("C/C++ files"); filter_cpp.add_mime_type("text/x-c"); filter_cpp.add_mime_type("text/x-c++"); filter_cpp.add_mime_type("text/x-c-header"); dialog.add_filter(filter_cpp); #endif #if 0 Gtk::FileFilter filter_any; filter_any.set_name("Any files"); filter_any.add_pattern("*"); dialog.add_filter(filter_any); #endif //Show the dialog and wait for a user response: int result = dialog.run(); //Handle the response: switch(result) { case(Gtk::RESPONSE_OK): { std::cout << "Open clicked." << std::endl; std::string filename = dialog.get_filename(); //Notice that it is a std::string, not a Glib::ustring. std::cout << "File selected: " << filename << std::endl; int last = filename.find_last_of('/'); SourceImage newimage; newimage.name = filename.substr( //std::cout << last << endl; #if 0 struct SourceImage { Glib::ustring name; Image img; }; DynArray g_images; #endif break; } case(Gtk::RESPONSE_CANCEL): { std::cout << "Cancel clicked." << std::endl; break; } default: { std::cout << "Unexpected button clicked." << std::endl; break; } } } void ConnectMenuCallbacks() { Gtk::MenuItem* pMenuItem = 0; refXml->get_widget("add_image1", pMenuItem); if(pMenuItem) pMenuItem->signal_activate().connect( sigc::ptr_fun(&AddImageToList) ); refXml->get_widget("quit1", pMenuItem); if(pMenuItem) pMenuItem->signal_activate().connect( sigc::mem_fun(*pApp,&Gnome::UI::App::hide) ); } int main(int argc, char *argv[]) { Gnome::Main kit("spherepano","0.1", Gnome::UI::module_info_get(), argc,argv); refXml = Gnome::Glade::Xml::create("gui.glade"); refXml->get_widget("mainwindow", pApp); ConnectMenuCallbacks(); Gtk::Main::run(*pApp); return 0; } --------------080301050907010602060005 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bug-gnu-emacs mailing list Bug-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs --------------080301050907010602060005--