DynamoDS / Dynamo

Open Source Graphical Programming for Design
https://dynamobim.org
Other
1.72k stars 632 forks source link

Test program.exe does not run after fresh build #10635

Closed andredaa closed 4 years ago

andredaa commented 4 years ago

Fresh build on arch linux (manjaro) trying to run the test program from https://github.com/DynamoDS/Dynamo/wiki/Dynamo-on-Linux,-Mac

~/software/Dynamo/bin/AnyCPU/Release
$ mono program.exe

System.IO.FileNotFoundException: Could not find file "/home/andre/software/Dynamo/bin/AnyCPU/Release/debug.config" File name: '/home/andre/software/Dynamo/bin/AnyCPU/Release/debug.config' at Dynamo.Configuration.DebugModes.LoadDebugModesStatusFromConfig (System.String configPath) [0x000ad] in <57da68e23df1403ebefd52ab56cd6c83>:0

Unhandled Exception: System.MissingMethodException: Method not found: System.Diagnostics.TraceSource System.Net.Logging.get_Http() at System.Net.Http.HttpClientHandler..ctor () [0x00000] in :0 at System.Net.Http.HttpClient..ctor () [0x00000] in :0 at CSharpAnalytics.Network.HttpClientRequester..ctor () [0x00006] in :0 at CSharpAnalytics.WinFormAutoMeasurement.SetupRequesterAsync () [0x00000] in :0 at CSharpAnalytics.BaseAutoMeasurement.StartRequesterAsync () [0x00017] in :0 at CSharpAnalytics.BaseAutoMeasurement.Start (CSharpAnalytics.MeasurementConfiguration configuration, System.String launchKind, System.Nullable1[T] uploadInterval) [0x00164] in <fb830dbf4aa04437b4c4a6b5b4387d69>:0 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_1 (System.Object state) [0x00000] in <c4bddbfe864a4b8191bb818d6b204e9d>:0 at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x00007] in <c4bddbfe864a4b8191bb818d6b204e9d>:0 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <c4bddbfe864a4b8191bb818d6b204e9d>:0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <c4bddbfe864a4b8191bb818d6b204e9d>:0 at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00021] in <c4bddbfe864a4b8191bb818d6b204e9d>:0 at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <c4bddbfe864a4b8191bb818d6b204e9d>:0 at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <c4bddbfe864a4b8191bb818d6b204e9d>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.MissingMethodException: Method not found: System.Diagnostics.TraceSource System.Net.Logging.get_Http() at System.Net.Http.HttpClientHandler..ctor () [0x00000] in <f5362b77597b4f37836c1518f24ca56c>:0 at System.Net.Http.HttpClient..ctor () [0x00000] in <f5362b77597b4f37836c1518f24ca56c>:0 at CSharpAnalytics.Network.HttpClientRequester..ctor () [0x00006] in <fb830dbf4aa04437b4c4a6b5b4387d69>:0 at CSharpAnalytics.WinFormAutoMeasurement.SetupRequesterAsync () [0x00000] in <fb830dbf4aa04437b4c4a6b5b4387d69>:0 at CSharpAnalytics.BaseAutoMeasurement.StartRequesterAsync () [0x00017] in <fb830dbf4aa04437b4c4a6b5b4387d69>:0 at CSharpAnalytics.BaseAutoMeasurement.Start (CSharpAnalytics.MeasurementConfiguration configuration, System.String launchKind, System.Nullable1[T] uploadInterval) [0x00164] in :0 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_1 (System.Object state) [0x00000] in :0 at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x00007] in :0 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in :0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in :0 at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00021] in :0 at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in :0 at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in :0

andredaa commented 4 years ago

Does somebody know how to fix this?

mmisol commented 4 years ago

@andredaa This appears to be bug recently introduced. As a workaround you can try creating an empty file named debug.config in the expected location /home/andre/software/Dynamo/bin/AnyCPU/Release/

andredaa commented 4 years ago

@mmisol thank you! this leads to following error:

mono program.exe
System.Xml.XmlException: Root element is missing. at Dynamo.Configuration.DebugModes.LoadDebugModesStatusFromConfig (System.String configPath) [0x000ad] in <57da68e23df1403ebefd52ab56cd6c83>:0

Unhandled Exception: System.MissingMethodException: Method not found: System.Diagnostics.TraceSource System.Net.Logging.get_Http() at System.Net.Http.HttpClientHandler..ctor () [0x00000] in :0 at System.Net.Http.HttpClient..ctor () [0x00000] in :0 at CSharpAnalytics.Network.HttpClientRequester..ctor () [0x00006] in :0 at CSharpAnalytics.WinFormAutoMeasurement.SetupRequesterAsync () [0x00000] in :0 at CSharpAnalytics.BaseAutoMeasurement.StartRequesterAsync () [0x00017] in :0 at CSharpAnalytics.BaseAutoMeasurement.Start (CSharpAnalytics.MeasurementConfiguration configuration, System.String launchKind, System.Nullable1[T] uploadInterval) [0x00164] in <fb830dbf4aa04437b4c4a6b5b4387d69>:0 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_1 (System.Object state) [0x00000] in <c4bddbfe864a4b8191bb818d6b204e9d>:0 at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x00007] in <c4bddbfe864a4b8191bb818d6b204e9d>:0 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <c4bddbfe864a4b8191bb818d6b204e9d>:0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <c4bddbfe864a4b8191bb818d6b204e9d>:0 at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00021] in <c4bddbfe864a4b8191bb818d6b204e9d>:0 at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <c4bddbfe864a4b8191bb818d6b204e9d>:0 at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <c4bddbfe864a4b8191bb818d6b204e9d>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.MissingMethodException: Method not found: System.Diagnostics.TraceSource System.Net.Logging.get_Http() at System.Net.Http.HttpClientHandler..ctor () [0x00000] in <f5362b77597b4f37836c1518f24ca56c>:0 at System.Net.Http.HttpClient..ctor () [0x00000] in <f5362b77597b4f37836c1518f24ca56c>:0 at CSharpAnalytics.Network.HttpClientRequester..ctor () [0x00006] in <fb830dbf4aa04437b4c4a6b5b4387d69>:0 at CSharpAnalytics.WinFormAutoMeasurement.SetupRequesterAsync () [0x00000] in <fb830dbf4aa04437b4c4a6b5b4387d69>:0 at CSharpAnalytics.BaseAutoMeasurement.StartRequesterAsync () [0x00017] in <fb830dbf4aa04437b4c4a6b5b4387d69>:0 at CSharpAnalytics.BaseAutoMeasurement.Start (CSharpAnalytics.MeasurementConfiguration configuration, System.String launchKind, System.Nullable1[T] uploadInterval) [0x00164] in :0 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_1 (System.Object state) [0x00000] in :0 at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (System.Object state) [0x00007] in :0 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in :0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in :0 at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00021] in :0 at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in :0 at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in :0

mmisol commented 4 years ago

@andredaa Ok. I see now there are two things here:

  1. The file does not contain XML in the expected format. Please try using this content for the file:
    <?xml version="1.0" encoding="utf-8"?>
    <DebugModes>
    </DebugModes>
  2. Even if the file did not exist or failed to load, this should not prevent Dynamo from starting. It's like that on .NET Framework, but for mono we are running into an unhandled error System.MissingMethodException: Method not found: System.Diagnostics.TraceSource System.Net.Logging.get_Http(). Doing a quick search, there seem to be some incompatibilities between platforms that we may have missed https://github.com/dotnet/runtime/issues/21777. This will require some investigation on our side. Sorry if this is blocking you.
QilongTang commented 4 years ago

@andredaa This is related to our analytics client initialization, would you search for DynamoSettings.xml in your user data folder and touch it by setting IsAnalyticsReportingApproved to false to work around this? Our team will investigate the actual fix after.

andredaa commented 4 years ago

@mmisol thank you so much for your quick response and for looking into it. Maybe I can tell you what our goal is with setting up Dynamo on a linux machine: We have revit files from architects that deliver continuous updates on a basic design. So far we have been converting those via the Revit/Dynamo GUI using a .dyn script. We are converting to geojson/shape files. We would like to automate this process. So that ideally the architect would upload a revit file and we use Dynamo to automatically parse into a geojson - so that our software can work with it.

Do you think this would be possible with Dynamo core - or is this the wrong track anyway?

andredaa commented 4 years ago

thank you @QilongTang - i tried to follow this up.

IsReportingAnalytics

I updated the file test/settings/DynamoSettings-AnalyticsTurnedOn.xml and set

> -  <IsAnalyticsReportingApproved>true</IsAnalyticsReportingApproved>
> +  <IsAnalyticsReportingApproved>false</IsAnalyticsReportingApproved>

However , I dont find a DynamoSettings.xml at all in any of the folders. :p

Quick google search suggests it should be in the DynamoRevit folder. I dont have that in the dynamo/src folder.

andre@andre-pc ~/software/Dynamo/src

$ ls -la
total 272 drwxr-xr-x 32 andre andre 4096 7. Mai 16:14 . drwxr-xr-x 10 andre andre 4096 7. Mai 16:15 .. drwxr-xr-x 4 andre andre 4096 7. Mai 13:52 AssemblySharedInfoGenerator -rw-r--r-- 1 andre andre 643 7. Mai 11:51 build.xml drwxr-xr-x 2 andre andre 4096 7. Mai 11:51 Config -rw-r--r-- 1 andre andre 1005 7. Mai 11:51 Config.xml drwxr-xr-x 5 andre andre 4096 7. Mai 11:51 DocumentationBrowserViewExtension -rw-r--r-- 1 andre andre 69782 7. Mai 11:51 Dynamo.All.sln -rw-r--r-- 1 andre andre 1276 7. Mai 11:51 Dynamo.All.sln.DotSettings drwxr-xr-x 3 andre andre 4096 7. Mai 11:51 DynamoApplications drwxr-xr-x 3 andre andre 4096 7. Mai 11:51 DynamoCLI drwxr-xr-x 20 andre andre 4096 7. Mai 15:55 DynamoCore drwxr-xr-x 16 andre andre 4096 7. Mai 11:51 DynamoCoreWpf drwxr-xr-x 3 andre andre 4096 7. Mai 11:51 DynamoCrypto drwxr-xr-x 2 andre andre 4096 7. Mai 11:51 DynamoInstall drwxr-xr-x 3 andre andre 4096 7. Mai 11:51 DynamoInstallActions drwxr-xr-x 3 andre andre 4096 7. Mai 11:51 DynamoManipulation -rw-r--r-- 1 andre andre 36964 7. Mai 16:14 Dynamo.Mono.sln drwxr-xr-x 4 andre andre 4096 7. Mai 11:51 DynamoPackages drwxr-xr-x 3 andre andre 4096 7. Mai 11:51 DynamoPackagesWPF drwxr-xr-x 3 andre andre 4096 7. Mai 11:51 DynamoSandbox drwxr-xr-x 3 andre andre 4096 7. Mai 11:51 DynamoUtilities drwxr-xr-x 3 andre andre 4096 7. Mai 11:51 DynamoWPFCLI drwxr-xr-x 7 andre andre 4096 7. Mai 11:51 Engine -rw-r--r-- 1 andre andre 1013 7. Mai 11:51 finalConfig.xml -rw-r--r-- 1 andre andre 173 7. Mai 11:51 htmlreport.xml -rw-r--r-- 1 andre andre 1163 7. Mai 11:51 Install.sln drwxr-xr-x 19 andre andre 4096 7. Mai 11:51 Legacy drwxr-xr-x 23 andre andre 4096 7. Mai 11:51 Libraries drwxr-xr-x 7 andre andre 4096 7. Mai 11:51 LibraryViewExtension drwxr-xr-x 7 andre andre 4096 7. Mai 11:51 LibraryViewExtensionMSWebBrowser drwxr-xr-x 6 andre andre 4096 7. Mai 11:51 Migrations drwxr-xr-x 3 andre andre 4096 7. Mai 11:51 NodeServices drwxr-xr-x 3 andre andre 4096 7. Mai 11:51 Notifications drwxr-xr-x 11 andre andre 4096 7. Mai 15:33 packages drwxr-xr-x 20 andre andre 4096 7. Mai 11:51 Resources drwxr-xr-x 9 andre andre 4096 7. Mai 11:51 Tools -rw-r--r-- 1 andre andre 1530 7. Mai 11:51 transform_all.bat drwxr-xr-x 2 andre andre 4096 7. Mai 15:40 Utilities drwxr-xr-x 3 andre andre 4096 7. Mai 11:51 VisualizationTests drwxr-xr-x 3 andre andre 4096 7. Mai 11:51 WorkspaceDependencyViewExtension -rw-r--r-- 1 andre andre 219 7. Mai 11:51 xmlreport.xml

Really nice to get these immediate responses from you guys!

andredaa commented 4 years ago

also

grep -iRl "IsReportingAnalytics" ./

finds nothing from the source folder (of the git repo)

QilongTang commented 4 years ago

@andredaa Sorry that I could not test on a Linux VM but for windows users it would be placed in %AppData%/Roaming/Dynamo/DynamoCore/2.7(or whatever local version is)/. It usually contains the whole user setting for Dynamo

<?xml version="1.0"?>
<PreferenceSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <IsFirstRun>false</IsFirstRun>
  <IsUsageReportingApproved>false</IsUsageReportingApproved>
  <IsAnalyticsReportingApproved>false</IsAnalyticsReportingApproved>
  <LibraryWidth>200</LibraryWidth>
  <ConsoleHeight>0</ConsoleHeight>
  <ShowPreviewBubbles>true</ShowPreviewBubbles>
  <ShowCodeBlockLineNumber>true</ShowCodeBlockLineNumber>
  <ShowConnector>true</ShowConnector>
  <ConnectorType>BEZIER</ConnectorType>
  <BackgroundPreviews>
    <BackgroundPreviewActiveState>
      <Name>IsBackgroundPreviewActive</Name>
      <IsActive>false</IsActive>
    </BackgroundPreviewActiveState>
  </BackgroundPreviews>
  <IsBackgroundGridVisible>true</IsBackgroundGridVisible>
  <RenderPrecision>128</RenderPrecision>
  <ShowEdges>false</ShowEdges>
  <ShowDetailedLayout>true</ShowDetailedLayout>
  <WindowX>7</WindowX>
  <WindowY>220</WindowY>
  <WindowW>1024</WindowW>
  <WindowH>768</WindowH>
  <UseHardwareAcceleration>true</UseHardwareAcceleration>
  <NumberFormat>f3</NumberFormat>
  <MaxNumRecentFiles>10</MaxNumRecentFiles>
  <RecentFiles>

  </RecentFiles>
  <BackupFiles>

  </BackupFiles>
  <CustomPackageFolders>

  </CustomPackageFolders>
  <PackageDirectoriesToUninstall />
  <PythonTemplateFilePath />
  <BackupInterval>60000</BackupInterval>
  <BackupFilesCount>1</BackupFilesCount>
  <PackageDownloadTouAccepted>true</PackageDownloadTouAccepted>
  <OpenFileInManualExecutionMode>false</OpenFileInManualExecutionMode>
  <NamespacesToExcludeFromLibrary>
    <string>ProtoGeometry.dll:Autodesk.DesignScript.Geometry.TSpline</string>
  </NamespacesToExcludeFromLibrary>
</PreferenceSettings>
mjkkirschner commented 4 years ago

This file won't be created unless Dynamo has actually run I guess.

If you need to use the geometry library on linux, that will not work.

Have you been building and running dynamo on mono for a while or is this a new project? trying to determine if we've changed something recently?

What version of Mono are you using?

andredaa commented 4 years ago

i started this today ;) never worked with dynamo before.

If you need to use the geometry library on linux, that will not work.

is there another way to make it work? would it work on a windows server?

I use the following Mono Version

Mono JIT compiler version 6.4.0 (makepkg/fe64a4765e6 Sat 16 Nov 2019 04:59:42 PM UTC) Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstack Notificati /home/andre/software/Dynamo/src/Dynamo.Mono.sln (default targets) -> (Build target) -> /home/andre/software/Dynamo/src/Libraries/DSIronPython/DSIronPython.csproj (default targets) -> /usr/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) -ons: epoll Architecture: amd64 Disabled: none Misc: softdebug Interpreter: yes LLVM: supported, not enabled. Suspend: hybrid GC: sgen (concurrent by default)

nuget version: $ nuget install Feeds used: /home/andre/.nuget/packages/ https://api.nuget.org/v3/index.json

QilongTang commented 4 years ago

@andredaa OK, let's do the ultimate hack, if you dont mind.. Let's touch source code here https://github.com/DynamoDS/Dynamo/blob/master/src/DynamoCore/Configuration/PreferenceSettings.cs#L330

IsAnalyticsReportingApproved = true;

Change this boolean to false, then you should be able to launch Dynamo with mono. Once that is done, we can touch the DynamoSettings.xml and revert the local change.

mjkkirschner commented 4 years ago

i started this today ;) never worked with dynamo before.

If you need to use the geometry library on linux, that will not work.

is there another way to make it work? would it work on a windows server?

I use the following Mono Version

Mono JIT compiler version 6.4.0 (makepkg/fe64a4765e6 Sat 16 Nov 2019 04:59:42 PM UTC) Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com TLS: __thread SIGSEGV: altstack Notificati /home/andre/software/Dynamo/src/Dynamo.Mono.sln (default targets) -> (Build target) -> /home/andre/software/Dynamo/src/Libraries/DSIronPython/DSIronPython.csproj (default targets) -> /usr/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) -ons: epoll Architecture: amd64 Disabled: none Misc: softdebug Interpreter: yes LLVM: supported, not enabled. Suspend: hybrid GC: sgen (concurrent by default)

nuget version: $ nuget install Feeds used: /home/andre/.nuget/packages/ https://api.nuget.org/v3/index.json

windows server will work - but let me clarify - if you have not worked with Dynamo before. Dynamo has a geometry library built on top of Autodesk software. It will only work on windows if one of these Autodesk software "host products" are installed.

The rest of Dynamo will work just fine without the geometry library.

You talk about Revit and Dynamo... so I'm not sure what you need to do - do you just need to parse some json files? Or do you need to run Revit, access the Revit API, access the Dynamo geometry library etc?

mjkkirschner commented 4 years ago

@mmisol - that is a doozy of a thread... it sounded like the updated mono would take care of it, but I guess not?

mmisol commented 4 years ago

@mjkkirschner Yes, there are several years of comments there :)

It would seem some people had good results by removing System.Net.Http.dll. Might be something we can try.

Also, near the end they recommend to stop using the System.Net.Http NuGet package and use Microsoft.NETCore.App package instead. I wonder if we can do that without going full .NET Core yet.

andredaa commented 4 years ago

windows server will work - but let me clarify - if you have not worked with Dynamo before. Dynamo has a geometry library built on top of Autodesk software. It will only work on windows if one of these Autodesk software "host products" are installed.

The rest of Dynamo will work just fine without the geometry library.

You talk about Revit and Dynamo... so I'm not sure what you need to do - do you just need to parse some json files? Or do you need to run Revit, access the Revit API, access the Dynamo geometry library etc?

We are building a digital urban planning tool with integrated analytical modules, for noise emissions, etc. It is browser based and shall allow the architects to work off their design proposals.

So, our workflow would look like this: The architects would upload a .rvt. file, which we would parse into a geojson. We would need to parse the coordinates of buildings and their basic attributes in terms of landuse. (we already have a Dynamo script for that). --> I guess that would mean we need to access the Revit API in order to interprete the .rvt file?

The geojson is then displayed in mapbox and users and add result layers for the analytical results.

If you had a windows server, you say it would be possible right? We are dreaming of running the workflow completely headless. The server would wait for new uploads and process any incoming file with Dynamo.

Would you recommend using something like: https://radumg.github.io/DynaWeb/ for that?

Thanks for your help! Very much appreaciated, Andre

mjkkirschner commented 4 years ago

Hi @andredaa - curious if you made it further here. we are looking into a recent break of the mono.sln and will be fixing it.

A windows server should work technically fine.

And that should get Dynamo running without the mono.sln, but in regards to your other requests, I am not in a position to comment on the license terms of other ADSK software in regards to deploying it as a headless service...

mjkkirschner commented 4 years ago

@andredaa mono.sln should be fixed now, not sure if the resulting binaries do what you need though, please reopen this if you are still having trouble.

andredaa commented 4 years ago

Hello! Sorry for the late reply and thank you very much for keeping me in the loop! For now we found a (hacky) workaround, where Dynamo exports to a google sheet - and then a python script pull the data from there - so we can have a live data exchange. We are still interested in making this work - but this will not be on the agenda before autumn now. We will let you know, when we start working on it . Thank you so much for your friendly response and communication! Best Andre