Hi Matt,

okay, that is strange. Could you please delete your $HOME/.ExtApp/ dir 
again and run the ExtApp like

./ExtApp --BlueBerry.consoleLog

and send me the output (in private). Usually this problem occurs when 
the framework fails to start a certain plugin.

Thanks a lot for the troubleshooting.

Sascha

On 06/07/2011 07:17 PM, Matt Clarkson wrote:
> Hi Sascha,
>
> I removed $HOME/.ExtApp, and that resolved the problem of picking up 2 
> different sets of plugins.
> However, the seg-fault is still happening.
>
> This problem is seen just running the standard MITK ExtApp program from a 
> completely clean build of MITK, on both my Centos and Mac machines.
>
> As far as I can work out on my Centos machine, it's the "result = 
> iter->second.Cast<I>();" in berryTweaklets.h Get method that is failing. When 
> the WorkbenchTweaklet is first created, it is entered into the map, which is 
> a map of smart pointers to objects.  When it is used from the map, the Cast 
> operation performs a dynamic cast, and this fails. Swapping to a static_cast 
> instead of a dynamic cast appears to get past this issue, but there are other 
> problems further along the line, where the IPreferencesService appears to not 
> be present.
>
> Thats as far as I have got for now.
>
> Matt
>
> ----- "Sascha Zelzer"<[email protected]>  wrote:
>
>> Hi Matt,
>>
>> thanks for the feedback. A clean build (meaning deleting the build
>> directory) should not create a directory like
>>
>> /scratch0/NOT_BACKED_UP/clarkson/build/MITK-build/MITK-build/bin/ExtBundles/org.mitk.gui.qt.extapplication/
>>
>> However, the first thing you could try is to remove your $HOME/.ExtApp
>>
>> directory. If you have tried to run a CTK-based ExtApp app before,
>> there
>> might be some misleading data in this directory (the CTK plugin
>> framework remember the installed plugins). Hence it is also important
>> to
>> use unique strings in
>>
>> myApp.setApplicationName("MyApp");
>> myApp.setOrganizationName("My Organization");
>>
>> in your custom project, because they are used to create the directory
>>
>> name (like .ExtApp) for storing app specific data. That could also be
>>
>> the problem in your case, if you try to start the ExtApp from two
>> different build trees. Then duplicate libraries (from the two build
>> trees) will get loaded.
>>
>> I hope that helps,
>>
>> Sascha
>>
>> On 06/07/2011 02:37 PM, Matt Clarkson wrote:
>>> Hi Sascha
>>>
>>> Ah, sorry, I should have read the instructions.
>>> However, I tried to follow the instructions:
>> http://www.mitk.org/wiki/Fixing%20external%20projects and my basic
>> application seg faults.
>>> So, I did a git clone of MITK latest, and did a standard build from
>> scratch on both Linux and Mac, and the standard ExtApp seg faults in
>> both cases.
>>> Debugging on Linux, there are 2 strange issues (see attached log).
>> First, when ExtApp starts, it appears to pick up two sets of the same
>> plugins.
>>> One set comes from my project (UCLToolkit-SuperBuild), and the other
>> from the brand new stand alone MITK-build. I've grepped through config
>> files, and can't find why.
>>> The second thing appears to be a seg fault at:
>>> berryWorkbench.cpp:line 1445, or
>>>
>>>          WorkbenchWindow::Pointer Workbench::NewWorkbenchWindow()
>>>          {
>>>            WorkbenchWindow::Pointer wbw =
>>> here->
>> Tweaklets::Get(WorkbenchTweaklet::KEY)->CreateWorkbenchWindow(this->GetNewWindowNumber());
>>>            //wbw->Init();
>>>            return wbw;
>>>          }
>>>
>>> so presumably WorkbenchTweaklet::KEY is blank/NULL/wrong.
>>>
>>> and interestingly, I just spotted:
>>>
>>> #0.590# [BlueBerry] ERROR: Exception: File not found: Could not load
>> META-INF/MANIFEST.MF from
>> /scratch0/NOT_BACKED_UP/clarkson/build/MITK-build/MITK-build/bin/ExtBundles/org.mitk.gui.qt.extapplication/
>>> !0.590! [BlueBerry] WARNING: Bundle state invalid: The bundle must
>> be in state INSTALLED in order to be loaded.
>>> resolve: "org.blueberry.osgi" [ 18 ]
>>>
>>>
>>> in the output. This makes it look like one of the plugins is looking
>> for an old MANIFEST.MF.
>>> Does this help?
>>>
>>> Thanks
>>>
>>> Matt
>>>
>>> ----- "Sascha Zelzer"<[email protected]>   wrote:
>>>
>>>> Hi Matt,
>>>>
>>>> yes, that is related.
>>>>
>>>> Please have a look at
>>>> http://www.mitk.org/wiki/Fixing%20external%20projects for
>> instructions
>>>> how to fix external projects.
>>>>
>>>> Best,
>>>> Sascha
>>>>
>>>> On 06/06/2011 03:25 PM, Matt Clarkson wrote:
>>>>> Hi Sascha,
>>>>>
>>>>> after the change to make MITK use the CTK plugin framework, I set
>> my
>>>> project to rebuild CTK and then MITK to get nice fresh up to date
>>>> code. My "main" program is at this stage a simple thing, to load
>>>> default MITK plugins. i.e. I haven't got round to creating my own
>>>> plugins yet.
>>>>> #include<org.blueberry.osgi/src/application/berryStarter.h>
>>>>>
>>>>> int main(int argc, char** argv)
>>>>> {
>>>>>      return berry::Starter::Run(argc, argv);
>>>>> }
>>>>>
>>>>> However, when it comes to compile I get:
>>>>>
>>>>> In file included from
>>>> /Users/mattclarkson/build/UCLToolkit/Code/Gui/MITK/MITK.cpp:25:
>>>>
>> /Users/mattclarkson/build/UCLToolkit-SuperBuild/CMakeExternals/Source/MITK/BlueBerry/Bundles/org.blueberry.osgi/src/application/berryStarter.h:21:39:
>>>> error: org_blueberry_osgi_Export.h: No such file or directory
>>>>> In file included from
>> /Users/mattclarkson/build/UCLToolkit-SuperBuild/CMakeExternals/Source/MITK/BlueBerry/Bundles/org.blueberry.osgi/src/application/../event/../berryWeakPointer.h:25,
>>>>>                     from
>> /Users/mattclarkson/build/UCLToolkit-SuperBuild/CMakeExternals/Source/MITK/BlueBerry/Bundles/org.blueberry.osgi/src/application/../event/../berryMacros.h:21,
>>>>>                     from
>> /Users/mattclarkson/build/UCLToolkit-SuperBuild/CMakeExternals/Source/MITK/BlueBerry/Bundles/org.blueberry.osgi/src/application/../event/../berryIBundle.h:24,
>>>>>                     from
>> /Users/mattclarkson/build/UCLToolkit-SuperBuild/CMakeExternals/Source/MITK/BlueBerry/Bundles/org.blueberry.osgi/src/application/../event/berryPlatformEvent.h:23,
>>>>>                     from
>> /Users/mattclarkson/build/UCLToolkit-SuperBuild/CMakeExternals/Source/MITK/BlueBerry/Bundles/org.blueberry.osgi/src/application/../event/berryPlatformEvents.h:25,
>>>>>                     from
>> /Users/mattclarkson/build/UCLToolkit-SuperBuild/CMakeExternals/Source/MITK/BlueBerry/Bundles/org.blueberry.osgi/src/application/../berryPlatform.h:162,
>>>>>                     from
>> /Users/mattclarkson/build/UCLToolkit-SuperBuild/CMakeExternals/Source/MITK/BlueBerry/Bundles/org.blueberry.osgi/src/application/berryStarter.h:23,
>>>>>                     from
>>>> /Users/mattclarkson/build/UCLToolkit/Code/Gui/MITK/MITK.cpp:25:
>>>>> Does this look related to the MITK/CTK plugin changes?
>>>>>
>>>>> Thanks
>>>>>
>>>>> Matt
>>>>>
>>>>>
>> ------------------------------------------------------------------------------
>>>>> Simplify data backup and recovery for your virtual environment
>> with
>>>> vRanger.
>>>>> Installation's a snap, and flexible recovery options mean your
>> data
>>>> is safe,
>>>>> secure and there when you need it. Discover what all the
>> cheering's
>>>> about.
>>>>> Get your free trial download today.
>>>>> http://p.sf.net/sfu/quest-dev2dev2
>>>>> _______________________________________________
>>>>> mitk-users mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/mitk-users


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to