Nowa-Ammerlaan / natinst

Gentoo repository for VISA, DAQ, NI LabView, PicoScope and oneAPI
8 stars 1 forks source link

picoscope 7 #3

Open mspelta80 opened 1 year ago

mspelta80 commented 1 year ago

there is a new version here https://labs.picotech.com/picoscope7/rpm/ any plan to add it now that is stable?

Nowa-Ammerlaan commented 1 year ago

I generated ebuilds for the new version, but I can't get it to start. It looks like version 7 requires a version of mono that is newer than the one picomono provides. Using the system dev-lang/mono does not work either because it is missing gtk-sharp version 3 or greater.

mzagrabski commented 1 year ago

I have tried with system dev-lang/mono-6.12.0.122 and dev-dotnet/gtk-sharp-3.22.2-r2::fritteli and still no success. There is some version mismatch I believe because, but I have zero experience in mono. Error is following:

$ mono /opt/picoscope/lib/PicoScope.GTK.exe
Marshaling destroy signal

(PicoScope.GTK:13700): Gtk-CRITICAL **: 11:29:59.224: gtk_main_quit: assertion 'main_loops != NULL' failed
[ERROR] FATAL UNHANDLED EXCEPTION: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ObjectDisposedException: Cannot access a disposed object.
  at System.Reactive.Subjects.Subject`1[T].Subscribe (System.IObserver`1[T] observer) [0x0002b] in <12b57655c0ef44739f75821e840a4812>:0
  at System.ObservableExtensions.Subscribe[T] (System.IObservable`1[T] source, System.Action`1[T] onNext) [0x0002d] in <12b57655c0ef44739f75821e840a4812>:0
  at PSV.pu.a () [0x00011] in <647295c77473483fb0e3f33d53cf6c7c>:0
  at PSV.pm..ctor (System.String biq, PSV.qd bir) [0x00024] in <647295c77473483fb0e3f33d53cf6c7c>:0
  at PSV.xf.d () [0x00068] in <647295c77473483fb0e3f33d53cf6c7c>:0
  at PSV.xf.a () [0x0039b] in <647295c77473483fb0e3f33d53cf6c7c>:0
  at PSV.xf..ctor (Gtk.Widget dbd, System.Boolean dbe, System.Boolean dbf, System.Int32 dbg, System.Boolean dbh, System.Boolean dbi, System.Windows.Input.ICommand dbj, System.Windows.Input.ICommand dbk) [0x0005e] in <647295c77473483fb0e3f33d53cf6c7c>:0
  at PSV.wr..ctor (Gtk.Widget cyp, System.Windows.Input.ICommand cyq, System.Windows.Input.ICommand cyr, System.Int32 cys, System.Int32 cyt, System.Boolean cyu, System.Boolean cyv) [0x001d7] in <647295c77473483fb0e3f33d53cf6c7c>:0
  at PSV.dl.a () [0x001a9] in <647295c77473483fb0e3f33d53cf6c7c>:0
  at PSV.dl..ctor (Pico.ViewModels.Toolbars.WaveformBufferToolbarViewModel ro) [0x000b3] in <647295c77473483fb0e3f33d53cf6c7c>:0
  at (wrapper managed-to-native) System.Reflection.RuntimeConstructorInfo.InternalInvoke(System.Reflection.RuntimeConstructorInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x00005] in <a6a5ba8fc13a4797a32a4dc4ae25c772>:0
   --- End of inner exception stack trace ---
  at System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x0001a] in <a6a5ba8fc13a4797a32a4dc4ae25c772>:0
  at System.Reflection.RuntimeConstructorInfo.DoInvoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00086] in <a6a5ba8fc13a4797a32a4dc4ae25c772>:0
  at System.Reflection.RuntimeConstructorInfo.Invoke (System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <a6a5ba8fc13a4797a32a4dc4ae25c772>:0
  at System.RuntimeType.CreateInstanceImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) [0x0022b] in <a6a5ba8fc13a4797a32a4dc4ae25c772>:0
  at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x0009c] in <a6a5ba8fc13a4797a32a4dc4ae25c772>:0
  at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <a6a5ba8fc13a4797a32a4dc4ae25c772>:0
  at Pico.MVVM.ViewLocation.ViewLocator+a.a () [0x00000] in <f9b3b8d56e4f4eb9963d8c850e7aca57>:0
  at Pico.MVVM.ViewLocation.ViewLocator.CreateView (System.Type viewModelType, System.Object[] pObjects) [0x0006a] in <f9b3b8d56e4f4eb9963d8c850e7aca57>:0
  at PSV.di..ctor (Pico.ViewModels.Toolbars.ToolbarTrayViewModel ql) [0x00122] in <647295c77473483fb0e3f33d53cf6c7c>:0
  at (wrapper managed-to-native) System.Reflection.RuntimeConstructorInfo.InternalInvoke(System.Reflection.RuntimeConstructorInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x00005] in <a6a5ba8fc13a4797a32a4dc4ae25c772>:0
   --- End of inner exception stack trace ---
  at System.Reflection.RuntimeConstructorInfo.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x0001a] in <a6a5ba8fc13a4797a32a4dc4ae25c772>:0
  at System.Reflection.RuntimeConstructorInfo.DoInvoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00086] in <a6a5ba8fc13a4797a32a4dc4ae25c772>:0
  at System.Reflection.RuntimeConstructorInfo.Invoke (System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <a6a5ba8fc13a4797a32a4dc4ae25c772>:0
  at System.RuntimeType.CreateInstanceImpl (System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes, System.Threading.StackCrawlMark& stackMark) [0x0022b] in <a6a5ba8fc13a4797a32a4dc4ae25c772>:0
  at System.Activator.CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x0009c] in <a6a5ba8fc13a4797a32a4dc4ae25c772>:0
  at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <a6a5ba8fc13a4797a32a4dc4ae25c772>:0
  at Pico.MVVM.ViewLocation.ViewLocator+a.a () [0x00000] in <f9b3b8d56e4f4eb9963d8c850e7aca57>:0
  at Pico.MVVM.ViewLocation.ViewLocator.CreateView (System.Type viewModelType, System.Object[] pObjects) [0x0006a] in <f9b3b8d56e4f4eb9963d8c850e7aca57>:0
  at Pico.MVVM.GTK.ViewLocation.ViewLocatorExtensions.CreateWidget[TViewModel] (Pico.MVVM.ViewLocation.IViewLocator vl, TViewModel vm) [0x0001d] in <4d3d15b65ff7475c80e50a54ec42467a>:0
  at PSV.oy.j () [0x00060] in <647295c77473483fb0e3f33d53cf6c7c>:0
  at PSV.oy..ctor (Pico.ViewModels.MainWindow.MainWindowViewModel ben) [0x00130] in <647295c77473483fb0e3f33d53cf6c7c>:0
  at PSV.g.f (System.String l) [0x00062] in <647295c77473483fb0e3f33d53cf6c7c>:0
  at PSV.g.b (System.String[] i) [0x000b9] in <647295c77473483fb0e3f33d53cf6c7c>:0
  at PSV.g.Main (System.String[] args) [0x00034] in <647295c77473483fb0e3f33d53cf6c7c>:0

Maybe my gui-libs/gtk-4.10.4 generates issue.

Nowa-Ammerlaan commented 1 year ago

There is some version mismatch I believe

Probably,

I have no experience with mono or gtk-sharp so I'm afraid I can't be of much help here. To really get this working properly we would need a dedicated Gentoo maintainer for gtk-sharp, someone who actually knows how any of this is supposed to work. You could ask the maintainer of the fritteli overlay for assistance, they might know more about this then I do.

In any case to properly use the system mono version you'll have to undo this sed (i.e. ensure the MONO_CMD in /opt/picoscope/bin/picoscope has the value $(which mono 2>/dev/null)):

    sed -i -e \
        's/MONO_CMD=$(which mono 2>\/dev\/null)/MONO_CMD=\/opt\/picomono\/bin\/mono/g' \
        opt/picoscope/bin/picoscope || die

this I have in the ebuild to ensure the bundled picomono is used, which unfortunately only works with picoscope-6.

You can give the above a try, if it works I'll just remove the sed for >=picoscope-7. If it doesn't work I recommend sticking with picoscope-6 which does work last I checked.

mzagrabski commented 1 year ago

My current hint is that arch aur build works on arch: https://aur.archlinux.org/packages/picoscope7beta The only difference they are using picoscope beta (I have checked without success on gentoo). And gtk-sharp 2.99 (I have checked 2.99 from guru overlay, but without success, picoscope complains about gtk-sharp version).

Nowa-Ammerlaan commented 1 year ago

Hmm, I generated some ebuilds for the latest beta, but so far this indeed makes no difference.

Another difference with the AUR build is that we are using the upstream rpm's, while the AUR uses the upstream deb's. The deb's might be built against different versions of the dependencies.

Nowa-Ammerlaan commented 1 year ago

With gtk-sharp-2.99 nothing happens at all for me. At least with version 3.22.2 I get some pop-up, but it is unreadable because the text is white on white.