I keep getting segfaults using Plugin_Assistant_Eric-snapshot (both 20080712
20080726). It has only happened when saving certain files. Some files don't
segfault when saving, but others do. Once it segfault while saving a certain
file, it will continue to do so for that file.
I'm attaching a patch that stops the segfault from occurring, but it has to
disable the API autocompletion to do so. Since I really like the way this
plugin does in-document word completion, that's not a huge loss to me. If
the standard word completion worked the same way I'd use it instead.
I'm suspecting one of the binary libraries, because I'd expect anything
written in python to throw an exception that Eric would catch. Here's what
I'm using:
sqlite-3.5.9
pysqlite-2.3.5
qscintilla-2.2
PyQt4-4.3.3
qt-4.3.4
Hopefully this is a known error, but if not I can try to track it down by
building debug versions of the above libs. My prime suspects are sqlite and
pysqlite, because the segfault is happening during the autocompletion db
update, which looks like it's handled by sqlite. If anyone has a better
idea, please let me know.
Thanks.
-Dan
--- /home/users/dan/Plugin_Assistant_Eric-snapshot-20080726/AssistantEric/Assistant.py 2008-07-06 09:20:31.000000000 -0500
+++ /home/users/dan/.eric4/eric4plugins/AssistantEric/Assistant.py 2008-07-27 15:49:29.000000000 -0500
@@ -41,7 +41,7 @@
self.__viewmanager = e4App().getObject("ViewManager")
self.__pluginManager = e4App().getObject("PluginManager")
- self.__apisManager = APIsManager(self)
+# self.__apisManager = APIsManager(self)
self.__editors = []
self.__completingContext = False
@@ -63,7 +63,7 @@
self.__editorClosed)
# preload the project APIs object
- self.__apisManager.getAPIs(ApisNameProject)
+# self.__apisManager.getAPIs(ApisNameProject)
for editor in self.__viewmanager.getOpenEditors():
self.__editorOpened(editor)
@@ -92,7 +92,7 @@
for editor in self.__editors[:]:
self.__editorClosed(editor)
- self.__apisManager.deactivate()
+# self.__apisManager.deactivate()
def setEnabled(self, key, enabled):
"""
@@ -117,15 +117,15 @@
self.__setAutoCompletionHook(editor)
if self.__plugin.getPreferences("CalltipsEnabled"):
self.__setCalltipsHook(editor)
- self.connect(editor, SIGNAL("editorSaved"),
- self.__apisManager.getAPIs(ApisNameProject).editorSaved)
+# self.connect(editor, SIGNAL("editorSaved"),
+# self.__apisManager.getAPIs(ApisNameProject).editorSaved)
self.__editors.append(editor)
# preload the api to give the manager a chance to prepare the database
language = editor.getLanguage()
if language == "":
return
- self.__apisManager.getAPIs(language)
+# self.__apisManager.getAPIs(language)
def __editorClosed(self, editor):
"""
@@ -134,8 +134,8 @@
@param editor reference to the editor (QScintilla.Editor)
"""
if editor in self.__editors:
- self.disconnect(editor, SIGNAL("editorSaved"),
- self.__apisManager.getAPIs(ApisNameProject).editorSaved)
+# self.disconnect(editor, SIGNAL("editorSaved"),
+# self.__apisManager.getAPIs(ApisNameProject).editorSaved)
self.__editors.remove(editor)
if editor.autoCompletionHook() == self.autocomplete:
self.__unsetAutoCompletionHook(editor)
@@ -146,8 +146,8 @@
"""
Private method to handle a change of the global configuration.
"""
- self.__apisManager.reloadAPIs()
-
+# self.__apisManager.reloadAPIs()
+ pass
def __getCharacter(self, pos, editor):
"""
Private method to get the character to the left of the current position
@@ -278,13 +278,13 @@
else:
self.__lastContext = None
- if self.__plugin.getPreferences("AutoCompletionSource") & AcsAPIs:
- api = self.__apisManager.getAPIs(language)
- apiCompletionsList = self.__getApiCompletions(api, word, context)
-
- if self.__plugin.getPreferences("AutoCompletionSource") & AcsProject:
- api = self.__apisManager.getAPIs(ApisNameProject)
- projectCompletionList = self.__getApiCompletions(api, word, context)
+# if self.__plugin.getPreferences("AutoCompletionSource") & AcsAPIs:
+# api = self.__apisManager.getAPIs(language)
+# apiCompletionsList = self.__getApiCompletions(api, word, context)
+
+# if self.__plugin.getPreferences("AutoCompletionSource") & AcsProject:
+# api = self.__apisManager.getAPIs(ApisNameProject)
+# projectCompletionList = self.__getApiCompletions(api, word, context)
if self.__plugin.getPreferences("AutoCompletionSource") & AcsDocument:
docCompletionsList = \
@@ -404,13 +404,13 @@
apiCalltips = []
projectCalltips = []
- if self.__plugin.getPreferences("AutoCompletionSource") & AcsAPIs:
- api = self.__apisManager.getAPIs(language)
- apiCalltips = api.getCalltips(word, commas, self.__lastContext)
-
- if self.__plugin.getPreferences("AutoCompletionSource") & AcsProject:
- api = self.__apisManager.getAPIs(ApisNameProject)
- apiCalltips = api.getCalltips(word, commas, self.__lastContext)
+# if self.__plugin.getPreferences("AutoCompletionSource") & AcsAPIs:
+# api = self.__apisManager.getAPIs(language)
+# apiCalltips = api.getCalltips(word, commas, self.__lastContext)
+#
+# if self.__plugin.getPreferences("AutoCompletionSource") & AcsProject:
+# api = self.__apisManager.getAPIs(ApisNameProject)
+# apiCalltips = api.getCalltips(word, commas, self.__lastContext)
return list(set(apiCalltips)
.union(set(projectCalltips))
_______________________________________________
Eric mailing list
[email protected]
http://www.riverbankcomputing.com/mailman/listinfo/eric