Hi,

I am going crazy, because I am trying to build my plugin on Mac. First the source of the plugin works fine under Win and Linux! After several approaches I have put my plugin directly in the source tree of Qt Creator where all other plugins are and altered the plugins.pro. The plugin builds and is accessable also in the settings dialog, no problem so far.

BUT if I now wanted to open a file the program crashes:
Qt Code:
  1. 0 libCppEditor.dylib 0x1fe3328f CppEditor::Internal::CppHighlighter::highlightBlock(QString const&) + 911
  2. 1 QtGui 0x0036d518 QSyntaxHighlighterPrivate::reformatBlock(QTextBlock) + 168
  3. 2 QtGui 0x0036d6e5 QSyntaxHighlighterPrivate::_q_reformatBlocks(int, int, int) + 293
  4. 3 QtGui 0x0036dac9 QSyntaxHighlighter::qt_metacall(QMetaObject::Call, int, void**) + 201
  5. 4 QtCore 0x00da122a QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 538
  6. 5 QtGui 0x007a0e6a QTextDocument::contentsChange(int, int, int) + 74
  7. 6 QtGui 0x0032e822 QTextDocumentPrivate::finishEdit() + 498
  8. 7 QtGui 0x0031b4d5 QTextDocument::setPlainText(QString const&) + 101
  9. 8 libTextEditor.dylib 0x1fa03ea3 TextEditor::BaseTextDocument::open(QString const&) + 1651
  10. 9 libTextEditor.dylib 0x1fa06908 TextEditor::BaseTextEditor::open(QString const&) + 40
  11. 10 libCppEditor.dylib 0x1fe1fe6e CppEditor::Internal::CPPEditorEditable::open(QString const&) + 30
  12. 11 libCore.dylib 0x1aae9b1e Core::EditorManager::openEditor(Core::Internal::EditorView*, QString const&, QString const&, QFlags<Core::EditorManager::OpenEditorFlag>) + 254
  13. 12 libCore.dylib 0x1aae9dc6 Core::EditorManager::openEditor(QString const&, QString const&, QFlags<Core::EditorManager::OpenEditorFlag>) + 54
  14. 13 libProjectExplorer.dylib 0x1fb29500 ProjectExplorer::Internal::ProjectTreeWidget::openItem(QModelIndex const&) + 160
To copy to clipboard, switch view to plain text mode 

Funny thing is: If I do not build my plugin, Qt Creator behaves normal, only if my plugin is in the .app then it chrashes. But I do not see any interaction with my plugin when it craches

Any hint is highly appreciated!

Thanks.



Modified plugins.pro:
Qt Code:
  1. # USE .subdir AND .depends !
  2. # OTHERWISE PLUGINS WILL BUILD IN WRONG ORDER (DIRECTORIES ARE COMPILED IN PARALLEL)
  3.  
  4. TEMPLATE = subdirs
  5.  
  6. SUBDIRS = plugin_coreplugin \
  7. [...]
  8. plugin_asp \
  9. debugger/dumper.pro
  10.  
  11. plugin_asp.subdir = asp
  12. plugin_asp.depends += plugin_coreplugin
To copy to clipboard, switch view to plain text mode 
and the plugins pro:
Qt Code:
  1. TEMPLATE = lib
  2. TARGET = ArtisticStylePlugin
  3.  
  4. include(../../qtcreatorplugin.pri)
  5. include(../../plugins/coreplugin/coreplugin.pri)
  6.  
  7. HEADERS = artisticstyleplugin.h \
  8. artisticstyleiterator.h \
  9. artisticstyleoptionpage.h \
  10. artisticstyleoptionpagegui.h \
  11. astyle/astyle.h \
  12. artisticstyleconstants.h
  13. SOURCES = artisticstyleplugin.cpp \
  14. artisticstyleiterator.cpp \
  15. artisticstyleoptionpage.cpp \
  16. artisticstyleoptionpagegui.cpp \
  17. astyle/ASFormatter.cpp \
  18. astyle/ASBeautifier.cpp \
  19. astyle/ASEnhancer.cpp \
  20. astyle/ASResource.cpp
  21. FORMS = artisticstyleoptionpagegui.ui
  22.  
  23. OTHER_FILES = ArtisticStylePlugin.pluginspec
To copy to clipboard, switch view to plain text mode