Netbeans debugging issue

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Netbeans debugging issue

Nico Stuurman-2
Answering some issues raised by  Lukas Hille in private email conversation:

> I have a question for "debugging" MM(java) itself. I set up Netbeans as described at
> "https://urldefense.proofpoint.com/v2/url?u=https-3A__micro-2Dmanager.org_wiki_Using-5FNetbeans&d=DwIGaQ&c=iORugZls2LlYyCAZRB3XLg&r=UwP8SWqih8VHO1LwZpgcx83I4o21yLj6V6QD-25Dt4I&m=ob4jMQ9LMcDHHl4zXEExTnSRvsU2HLRNgXpkMTenPts&s=_iSpUBve6vqSCyePoSJ4RfQ8HF3PIWJcYn3i6sAihGU&e= 
> "  
> but i am missing something.
> To be able to run the Project (Debug) i have to add the  MMJ_.jar file.
That should not be needed, and will clash with the classes inserted by
the debugger.
> Without this jar i get an NullPointerException and the plugins don't load.

Do you add the flag "|-Dforce.annotation.index=true" under
project>properties>Run>VM Options:"? You will get errors without that flag.|

> Clean and Build works fine with and without MMJ_.jar.
> But i am not sure if something else is wrong, because I added
> System.out.println() lines to be able to trace stuff, but this messages
> never show up in the debugging window.

Probably because it is running the classes from MMJ_.jar rather than
your source code.



Best,


Nico



_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Netbeans debugging issue [solved]

Lukas Hille
Hi Nico,

i managed to solve this.
Sorry, I should have investigated more on the first place.

There where Source Package Folder missing.

I had $SRCDIR/mmstudio/src/main/java
But $SRCDIR/mmstudio/src/main/resources and
$SRCDIR/mmstudio/src/main/scripts was missing.

Therefore the icon path was not found:
introImage.setIcon(new
ImageIcon(getClass().getResource("/org/micromanager/icons/splash.gif")));

--> getClass().getResource("/org/micromanager/icons/splash.gif") --> null

everything works now. :-D

My debug message was:

2019-11-13T11:27:21.257525 tid9772 [IFO,App] User: Lukas
2019-11-13T11:27:21.257525 tid9772 [IFO,App] Host: DESKTOP-AC4I1IE
2019-11-13T11:27:21.257525 tid9772 [IFO,App] MM Studio version: 2.0.x dev
2019-11-13T11:27:21.257525 tid9772 [IFO,App] MMCore version 10.0.0
2019-11-13T11:27:21.257525 tid9772 [IFO,App] Device API version 69,
Module API version 10
2019-11-13T11:27:21.257525 tid9772 [IFO,App] Operating System: Windows
10 (amd64) 10.0
2019-11-13T11:27:21.257525 tid9772 [IFO,App] JVM: Java HotSpot(TM)
64-Bit Server VM, version 1.8.0_202, 64-bit
2019-11-13T11:27:21.279073 tid8136 [IFO,App] Searching for plugins in
C:\Program Files\Micro-Manager-2.0gammaNov/mmplugins
2019-11-13T11:27:21.849378 tid8136 [IFO,App] Found plugin
org.micromanager.acquiremultipleregions.AcquireMultipleRegions@46d614c0
2019-11-13T11:27:21.854657 tid8136 [IFO,App] Found plugin
org.micromanager.asidispim.ASIdiSPIM@223ea358
2019-11-13T11:27:21.855765 tid8136 [IFO,App] Found plugin
org.micromanager.assembledata.AssembleData@2a9c848d
2019-11-13T11:27:21.855765 tid8136 [IFO,App] Found plugin
ch.epfl.leb.autolase.AutoLasePlugin@d9c40c
2019-11-13T11:27:21.855765 tid8136 [IFO,App] Found plugin
org.micromanager.CRISP.CRISP@42afb107
2019-11-13T11:27:21.857156 tid8136 [IFO,App] Found plugin
com.asiimaging.CRISPv2.ASI_CRISP_V2@159dee6e
2019-11-13T11:27:21.857156 tid8136 [IFO,App] Found plugin
org.micromanager.duplicator.DuplicatorPlugin@2a854253
2019-11-13T11:27:21.858443 tid8136 [IFO,App] Found plugin
org.micromanager.plugins.framecombiner.FrameCombinerPlugin@58585edc
2019-11-13T11:27:21.858443 tid8136 [IFO,App] Found plugin
GaussianTrack_@56b91ad4
2019-11-13T11:27:21.858443 tid8136 [IFO,App] Found plugin
org.micromanager.hcs.HCSPlugin@2c3a38ef
2019-11-13T11:27:21.859439 tid8136 [IFO,App] Found plugin
org.wallerlab.illuminate.IlluminatePlugin@360e3d0a
2019-11-13T11:27:21.859439 tid8136 [IFO,App] Found plugin
org.micromanager.imageflipper.FlipperPlugin@28ffeea5
2019-11-13T11:27:21.859439 tid8136 [IFO,App] Found plugin
org.micromanager.intelligentacquisition.IntelligentAcquisition@6f92a9b1
2019-11-13T11:27:22.117096 tid8136 [IFO,App] Found plugin
org.micromanager.magellan.main.Magellan@70726680
2019-11-13T11:27:22.118094 tid8136 [IFO,App] Found plugin
edu.ucsf.valelab.mmclearvolumeplugin.CVPlugin@6ace0375
2019-11-13T11:27:22.119091 tid8136 [IFO,App] Found plugin
edu.ucsf.valelab.mmclearvolumeplugin.CVInspectorPanelPlugin@f18d92f
2019-11-13T11:27:22.119091 tid8136 [IFO,App] Found plugin
com.imaging100x.tracker.TrackerPlugin@60737c8
2019-11-13T11:27:22.119091 tid8136 [IFO,App] Found plugin
org.micromanager.multicamera.MultiCamera@65a207ee
2019-11-13T11:27:22.119508 tid8136 [IFO,App] Found plugin
org.micromanager.multichannelshading.MultiChannelShading@7f6d7584
2019-11-13T11:27:22.120505 tid8136 [IFO,App] Found plugin
edu.umassmed.pgfocus.pgFocus@7c1b3921
2019-11-13T11:27:22.120505 tid8136 [IFO,App] Found plugin
org.micromanager.pipelinesaver.SaverPlugin@68ceb273
2019-11-13T11:27:22.120505 tid8136 [IFO,App] Found plugin
org.micromanager.pointandshootanalysis.PointAndShootAnalysis@76f23fbf
2019-11-13T11:27:22.121503 tid8136 [IFO,App] Found plugin
org.micromanager.projector.ProjectorPlugin@61022415
2019-11-13T11:27:22.121503 tid8136 [IFO,App] Found plugin
org.micromanager.ptctools.PtcTools@44f5cb25
2019-11-13T11:27:22.121503 tid8136 [IFO,App] Found plugin
org.micromanager.randomizer.RandomizePositionNamesPlugin@5935b4e2
2019-11-13T11:27:22.121503 tid8136 [IFO,App] Found plugin
org.micromanager.ratioimaging.RatioImaging@3edd67bc
2019-11-13T11:27:22.123499 tid8136 [IFO,App] Found plugin
org.micromanager.recall.RecallPlugin@4e8fcefe
2019-11-13T11:27:22.123499 tid8136 [IFO,App] Found plugin
org.micromanager.plugins.sequencebuffermonitor.SequenceBufferMonitor@24c988e9
2019-11-13T11:27:22.123499 tid8136 [IFO,App] Found plugin
org.micromanager.slideexplorer.SlideExplorerPlugin@502faa36
2019-11-13T11:27:22.124536 tid8136 [IFO,App] Found plugin
org.micromanager.plugins.snaponmove.SnapOnMovePlugin@51ad708
2019-11-13T11:27:22.124536 tid8136 [IFO,App] Found plugin
org.micromanager.splitview.SplitView@35d2116b
2019-11-13T11:27:22.124536 tid8136 [IFO,App] Found plugin
PMQI.AutoWB@5db459f8
2019-11-13T11:27:22.124536 tid8136 [IFO,App] Found plugin
org.micromanager.zprojector.ZProjectorPlugin@70672662
2019-11-13T11:27:22.124536 tid8136 [IFO,App] Searching for plugins in
C:\Program Files\Micro-Manager-2.0gammaNov/mmautofocus
2019-11-13T11:27:22.154131 tid8136 [IFO,App] Found plugin
org.micromanager.autofocus.HardwareFocusExtender@3455c5f5
2019-11-13T11:27:22.157846 tid8136 [IFO,App] Found plugin
org.micromanager.autofocus.Autofocus@399f017b
2019-11-13T11:27:22.158846 tid8136 [IFO,App] Found plugin
org.micromanager.autofocus.AutofocusDuo@1b0b6991
2019-11-13T11:27:22.159931 tid8136 [IFO,App] Found plugin
org.micromanager.autofocus.AutofocusTB@7a46d536
2019-11-13T11:27:22.163174 tid8136 [IFO,App] Found plugin
org.micromanager.autofocus.OughtaFocus@2eeb2429
2019-11-13T11:27:22.164172 tid8136 [IFO,App] Searching for plugins in
class loader
2019-11-13T11:27:22.476809 tid8136 [IFO,App] Found plugin
org.micromanager.display.inspector.internal.panels.intensity.IntensityInspectorPanelPlugin@75c9c8fc
2019-11-13T11:27:22.476809 tid8136 [IFO,App] Found plugin
org.micromanager.display.inspector.internal.panels.metadata.SummaryMetadataInspectorPanelPlugin@3b9257c8
2019-11-13T11:27:22.477807 tid8136 [IFO,App] Found plugin
org.micromanager.display.inspector.internal.panels.metadata.PlaneMetadataInspectorPanelPlugin@5ec25f6b
2019-11-13T11:27:22.477807 tid8136 [IFO,App] Found plugin
org.micromanager.display.inspector.internal.panels.comments.CommentsInspectorPanelPlugin@4db4f0f9
2019-11-13T11:27:22.478941 tid8136 [IFO,App] Found plugin
org.micromanager.display.overlay.internal.overlays.PatternOverlayPlugin@5bc47739
2019-11-13T11:27:22.478941 tid8136 [IFO,App] Found plugin
org.micromanager.display.inspector.internal.panels.overlays.OverlaysInspectorPanelPlugin@5b7baa43
2019-11-13T11:27:22.478941 tid8136 [IFO,App] Found plugin
org.micromanager.display.overlay.internal.overlays.ScaleBarPlugin@3e8f440b
2019-11-13T11:27:22.478941 tid8136 [IFO,App] Found plugin
org.micromanager.display.overlay.internal.overlays.TimestampPlugin@1c9bd3dc
2019-11-13T11:27:22.478941 tid8136 [IFO,App] Found plugin
org.micromanager.acquisition.internal.DefaultMDAPlugin@4a9af4a4
2019-11-13T11:27:22.478941 tid8136 [IFO,App] Found plugin
org.micromanager.display.internal.gearmenu.ExportImagesItem@308a2939
2019-11-13T11:27:22.478941 tid8136 [IFO,App] Found plugin
org.micromanager.display.internal.gearmenu.LineProfileItem@29ee3e02
2019-11-13T11:27:22.482330 tid8136 [IFO,App] Found plugin
org.micromanager.quickaccess.internal.controls.AutofocusButtons@521737f7
2019-11-13T11:27:22.483382 tid8136 [IFO,App] Found plugin
org.micromanager.quickaccess.internal.controls.CloseAllButton@5850d57b
2019-11-13T11:27:22.484744 tid8136 [IFO,App] Found plugin
org.micromanager.quickaccess.internal.controls.ExposureTime@28279567
2019-11-13T11:27:22.485742 tid8136 [IFO,App] Found plugin
org.micromanager.quickaccess.internal.controls.LiveButton@41890478
2019-11-13T11:27:22.486739 tid8136 [IFO,App] Found plugin
org.micromanager.quickaccess.internal.controls.MDAButtons@33c03c29
2019-11-13T11:27:22.487737 tid8136 [IFO,App] Found plugin
org.micromanager.quickaccess.internal.controls.PresetButton@4238d7dc
2019-11-13T11:27:22.487737 tid8136 [IFO,App] Found plugin
org.micromanager.quickaccess.internal.controls.RefreshButton@175c573e
2019-11-13T11:27:22.488883 tid8136 [IFO,App] Found plugin
org.micromanager.quickaccess.internal.controls.SavedMDAButton@55347af
2019-11-13T11:27:22.490105 tid8136 [IFO,App] Found plugin
org.micromanager.quickaccess.internal.controls.ScriptButton@2de7a11e
2019-11-13T11:27:22.490105 tid8136 [IFO,App] Found plugin
org.micromanager.quickaccess.internal.controls.ShutterControl@3c7a05bb
2019-11-13T11:27:22.491102 tid8136 [IFO,App] Found plugin
org.micromanager.quickaccess.internal.controls.SnapButton@4bd1b437
2019-11-13T11:27:22.491102 tid8136 [IFO,App] Found plugin
org.micromanager.quickaccess.internal.controls.TextLabel@5e1a38b5
2019-11-13T11:27:22.491102 tid8136 [IFO,App] Plugin loading took 1212ms
2019-11-13T11:27:22.491102 tid9772 [IFO,App] Finished waiting for
plugins to load
2019-11-13T11:27:22.562898 tid9772 [IFO,App]
                                    [       ]
java.lang.NullPointerException in Thread[AWT-EventQueue-0,6,main]
                                    [       ]   at
javax.swing.ImageIcon.<init>(ImageIcon.java:217)
                                    [       ]   at
org.micromanager.internal.dialogs.IntroDlg.<init>(IntroDlg.java:118)
                                    [       ]   at
org.micromanager.internal.MMStudio.<init>(MMStudio.java:290)
                                    [       ]   at
MMStudioPlugin$1.run(MMStudioPlugin.java:79)
                                    [       ]   at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
                                    [       ]   at
java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
                                    [       ]   at
java.awt.EventQueue.access$500(EventQueue.java:97)
                                    [       ]   at
java.awt.EventQueue$3.run(EventQueue.java:709)
                                    [       ]   at
java.awt.EventQueue$3.run(EventQueue.java:703)
                                    [       ]   at
java.security.AccessController.doPrivileged(Native Method)
                                    [       ]   at
java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
                                    [       ]   at
java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
                                    [       ]   at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
                                    [       ]   at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
                                    [       ]   at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
                                    [       ]   at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
                                    [       ]   at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
                                    [       ]   at
java.awt.EventDispatchThread.run(EventDispatchThread.java:82)


cheers

Lukas

Am 2019-11-12 um 22:55 schrieb Stuurman, Nico:

> Answering some issues raised by  Lukas Hille in private email conversation:
>
>> I have a question for "debugging" MM(java) itself. I set up Netbeans as described at
>> "https://urldefense.proofpoint.com/v2/url?u=https-3A__micro-2Dmanager.org_wiki_Using-5FNetbeans&d=DwIGaQ&c=iORugZls2LlYyCAZRB3XLg&r=UwP8SWqih8VHO1LwZpgcx83I4o21yLj6V6QD-25Dt4I&m=ob4jMQ9LMcDHHl4zXEExTnSRvsU2HLRNgXpkMTenPts&s=_iSpUBve6vqSCyePoSJ4RfQ8HF3PIWJcYn3i6sAihGU&e=
>> "
>> but i am missing something.
>> To be able to run the Project (Debug) i have to add the  MMJ_.jar file.
> That should not be needed, and will clash with the classes inserted by
> the debugger.
>> Without this jar i get an NullPointerException and the plugins don't load.
> Do you add the flag "|-Dforce.annotation.index=true" under
> project>properties>Run>VM Options:"? You will get errors without that flag.|
>
>> Clean and Build works fine with and without MMJ_.jar.
>> But i am not sure if something else is wrong, because I added
>> System.out.println() lines to be able to trace stuff, but this messages
>> never show up in the debugging window.
> Probably because it is running the classes from MMJ_.jar rather than
> your source code.
>
>
>
> Best,
>
>
> Nico
>
>
--
____________________________________________
Lukas Hille, M.Sc.
microscopy engineer
[hidden email]
M +43 660 349 169 3

Department of Neurobiology, University of Vienna
Campus-Vienna-Biocenter 1
1030 Vienna
AUSTRIA

https://neuro.univie.ac.at/
https://www.imp.ac.at/groups/manuel-zimmer/
____________________________________________


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|

Re: Netbeans debugging issue [solved]

Nico Stuurman-2
Hi Lukas,
> There where Source Package Folder missing.
>
> I had $SRCDIR/mmstudio/src/main/java
> But $SRCDIR/mmstudio/src/main/resources and
> $SRCDIR/mmstudio/src/main/scripts was missing.

Perfect!  I updated the website
(https://micro-manager.org/wiki/Using_Netbeans) to match the current
directory layout.  B.t.w., I don't think that you will need the scripts
directory.

Best,

Nico

>
> Therefore the icon path was not found:
> introImage.setIcon(new
> ImageIcon(getClass().getResource("/org/micromanager/icons/splash.gif")));
>
> --> getClass().getResource("/org/micromanager/icons/splash.gif") --> null
>
> everything works now. :-D
>
>


_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general