azonenberg changed the topic of #scopehal to: libscopehal, libscopeprotocols, and glscopeclient development and testing | https://github.com/glscopeclient/scopehal-apps | Logs: https://libera.irclog.whitequark.org/scopehal
<azonenberg> Variable pitch for a handheld probe is an open problem i've tinkered with a bit
<azonenberg> but not yet solved satisfactorily
<d1b2> <louis> Looking at supporting DPI the Right Way
<d1b2> <louis> Our code in glscopeclient reads the DPI via pango and then generates a scale factor such that 96DPI = scale 1
<d1b2> <louis> So e.g. on my machine I have Xft.dpi (which is presumably(?) where pango gets it) = 220, so it would produce scale = 2.29, which is about right
<d1b2> <louis> ImGui::GetWindowDPIScale() appears to bottom out in Platform_GetWindowDpiScale, which seems to be unimplemented on Linux
<d1b2> <louis> (and regardless, my understanding is that that is a OS-pixel to imgui-pixel mapping factor, not a DPI scale in the conventional sense?)
<d1b2> <louis> I think this can be queried via glfw though
<azonenberg> Unimplemented on Linux??
<azonenberg> interesting
<azonenberg> But yes, that is my understanding. more precisely, physical display pixels to imgui units
<d1b2> <louis> glfwGetWindowContentScale appears to do what we want (or at least what I want lol, i.e. it reutnrs 2.29 on my laptop)
<azonenberg> Well,. then use that
<d1b2> <louis> looks like you got part way though doing this dpi support actually cuz there's a call to that in VulkanWindow that dosen't do anything with it's response :p
<azonenberg> Lol
<azonenberg> Well, well, by all means go finish the job
<azonenberg> I'm working on eye pattern rendering in ngscopeclient now, and laid the groundwork for file load/save (all of the dialogs and menus and yaml stack init/cleanup and error handling)
<azonenberg> lain will be writing the actual scopesession serialization code soon
<_whitenotifier> [scopehal-apps] 602p opened pull request #555: Pull content scale factor from glfw and apply to fonts and imgui - https://github.com/glscopeclient/scopehal-apps/pull/555
<azonenberg> After i finish eye rendering, the trigger configuration dialog is probably next on my todo
<azonenberg> as well as some other trigger related gui glue, like displaying a second draggable arrow for window triggers
<d1b2> <louis> I think it is this - https://github.com/glscopeclient/scopehal-apps/pull/555 - simple, but marked as draft until someone tries it on Windows and OS X
<azonenberg> Poke @MP and lain WRT trying on macOS
<azonenberg> bvernoux: can you please test #555 on Windows?
<azonenberg> louis: what's your next focus?
<d1b2> <louis> Immediate term: try to repro and figure out M's notch filter blanking bug
<d1b2> <louis> Also on my to-do is an EMA dokey
<azonenberg> a what?
Degi_ has joined #scopehal
Degi has quit [Ping timeout: 268 seconds]
Degi_ is now known as Degi
<d1b2> <MP> i want arbitrary function moving average
<d1b2> <MP> i think i told louis i wanted ema , but you know , scope creep 😛
<d1b2> <MP> @louis what branch is this on ?
<azonenberg> @MP re testing on macos, that PR against git master i think
<d1b2> <MP> 555 right
<d1b2> <MP> building
<d1b2> <MP> @louis
<d1b2> <MP> @azonenberg @louis
<d1b2> <louis> What does bt at the debugger produce?
<d1b2> <azonenberg> dyld_start? that seems like a link issue
<d1b2> <louis> That is a very suspicion message that makes me think it is a build problem
<d1b2> <azonenberg> Yeah
<d1b2> <louis> Try deleting the build folder, git pull --recurse-submodules, and building again
<d1b2> <MP> @louis i make a new build folder
<d1b2> <MP> and did that
<d1b2> <louis> Huh
<d1b2> <MP> rebuilding just in case
<d1b2> <louis> & you don't get this behavior with master ?
<d1b2> <louis> This looks like a linker issue that seems very unlikely to be related to those changes (but it's possible if)
<d1b2> <louis> What did bt produce?
<d1b2> <azonenberg> yeah that is crashing in the OS loader before even calling main()
<d1b2> <azonenberg> Not enoguh info in the screenshot to say why but it seems the executable is corrupted/invalid somehow
<d1b2> <MP> building d123475 now to see
<d1b2> <MP> could be my environ got borked
<d1b2> <MP> @azonenberg so lldb crashes it hahahaha
<d1b2> <MP> fixed it
<d1b2> <azonenberg> oh? what was it
<d1b2> <MP> setting in lldb
<d1b2> <MP> now investigating the actual bug
<d1b2> <azonenberg> oh so you fixed the debugger crash but not the actual segfault :p
<d1b2> <MP> building the new patch to see whats segfaulting
<d1b2> <MP> and for the billion time - god building this on m1 ultra is SO nice
<d1b2> <azonenberg> Let me know how it goes. I have eye rendering working and am working on the color ramp shader and relevant menu logic
<d1b2> <azonenberg> (some of that glue will be used in spectrograms and waterfalls too)
<d1b2> <MP> looks very eye-ey to me
<d1b2> <MP> @louis @azonenberg theres your problem
<d1b2> <louis> Huh
<d1b2> <louis> That's bizarre... permission problem? I'll have to commandeer your laptop for a bit to look at it
<d1b2> <azonenberg> @louis: it looks like you are calling the function prior to glfwCreateWindow()
<d1b2> <azonenberg> maybe on linux it just makes an xlib call and on macos it has to actually use the window to get the scale?
<d1b2> <azonenberg> fix is probably to make sure the window has been created before you query the DPI
<d1b2> <louis> Huh. Ok, I'll move that around when I'm next at laptop and see if that resolves it
<d1b2> <MP> 👍
<d1b2> <azonenberg> @MP if you want to try on your end, lines 91-93 in VulkanWindow.cpp around GetContentScale() should be moved down a couple lines until they're after the glfwCreateWindow() call completes
<d1b2> <MP> Old Bheavior
<d1b2> <azonenberg> What's odd about that?
<d1b2> <azonenberg> at a quick glance nothing seems wrong
<d1b2> <MP> new behavior
<d1b2> <MP> normal people probably like new behavior
<d1b2> <azonenberg> what's new?
<d1b2> <MP> @azonenberg both screen shots at taken at the same window size - new behavior is larger GUI elements
<d1b2> <MP> which people will probably appreciate
<d1b2> <azonenberg> this is what a new session looks like
<d1b2> <azonenberg> for me on my system
<d1b2> <azonenberg> and oh
<d1b2> <MP> old behavior makes the GUI elements small
<d1b2> <MP> but i like this
<d1b2> <azonenberg> So, louis's fix applies correct DPI scaling
<d1b2> <MP> because as discussed i'm a real estate whore
<d1b2> <azonenberg> you're now seeing stuff the same size as everyone else was
<d1b2> <MP> which is throughly lame 😛
<d1b2> <azonenberg> Under preferences, appearances / toolbar
<d1b2> <MP> but yes 😛
<d1b2> <azonenberg> your icon size can be 24x24 or 48x48
<d1b2> <MP> its the font too 😛
<d1b2> <MP> taking up my precious screen real estate
<d1b2> <MP> you're the one that didnt want to spare me a single pixel row for a channel to channel divider 😛
<d1b2> <azonenberg> yes, all of that can be set under preferences. default is 13 units scaled by DPI (so 13 pixels assuming 96 DPI)
<d1b2> <azonenberg> for font size
<d1b2> <MP> anyway once louis fixes it i confirm its tested on osx
<d1b2> <azonenberg> Ok
<d1b2> <azonenberg> anyway, the point of this fix isnt to change appearance it's to unify appearance across high/low DPI systems
<d1b2> <azonenberg> we can then change defaults and/or add preferences as needed to optimize tradeoffs between density and readability
<d1b2> <azonenberg> but first we need to make it look the same everywhere 🙂
<d1b2> <MP> oh fuck i left the scope at stupidly high memory depth
<d1b2> <MP> it is now trying to download some gigapoints of samples over my DSL straw
<d1b2> <MP> and has throughly locked up
<d1b2> <MP> why do i do these things
<d1b2> <azonenberg> Lol
<d1b2> <azonenberg> i mean, it will eventually complete :p
<d1b2> <azonenberg> (and the ngscopeclient GUI should be not hanging in the meantime for the most part)
<d1b2> <MP> no it wont - it will retrigger
<d1b2> <azonenberg> but if you disconnect ngscopeclient and reconnect it should, in theory, reconnect and work fine
<d1b2> <azonenberg> but this is tek's driver
<d1b2> <azonenberg> assuming you;'re on the mso
<d1b2> <MP> its fully beachballing
<d1b2> <azonenberg> and tek's scpi stack acts strange if you disconnect midway through sending a waveform
<d1b2> <azonenberg> you may get the other half of the waveform when you reconnect :p
<d1b2> <MP> i'mjust going to let it
<d1b2> <MP> but ng does lock up when fetching hte wform
<d1b2> <MP> possibly an issue with tek driver
<d1b2> <azonenberg> yeah i tried hard to keep everything in background threads and not block
<d1b2> <azonenberg> anything that blocks the GUI thread for more than a few tens of ms should be backgrounded and reported as a bug
<d1b2> <azonenberg> and no background task should hold mutexes or otherwise block the GUI thread for extended time periods
<d1b2> <azonenberg> in general, good UX for laggy remote instruments is a priority
<d1b2> <azonenberg> it's not well tested, but it's something i want to support well
<d1b2> <MP> oho ❯ ./ngscopeclient [mvk-error] VK_ERROR_DEVICE_LOST: MTLCommandBuffer "WaveformThread.cmdbuf" execution failed (code 1): Internal Error (0000000e:Internal Error) libc++abi: terminating with uncaught exception of type vk::DeviceLostError: vk::Device::waitForFences: ErrorDeviceLost [1] 38326 abort ./ngscopeclient
<d1b2> <azonenberg> you probably timed out the GPU trying to render said multigigapoint waveform
<d1b2> <azonenberg> Depending on how big it was
<d1b2> <azonenberg> Right now we have a hard cap of i think 1G points due to Vulkan API limits right now
<d1b2> <azonenberg> anything larger is undefined
<d1b2> <azonenberg> (1G points per waveform, you can have as many of those as you want within available memory limits)
<d1b2> <azonenberg> because 4GB allocation max and fp32 waveform data
<d1b2> <azonenberg> sparse waveforms are further limited to 512M points because 4GB max and int64 timestamps
<monochroma> ld: FATAL ERROR: linking is hard, let's go shopping!
<d1b2> <MP> @louis @azonenberg omre funtimes https://pastebin.com/f0s8vneV
<d1b2> <azonenberg> Ok so, the warning about shared_stride is probably unrelated
<d1b2> <azonenberg> then we got a timeout somewhere
<d1b2> <azonenberg> then we got a bad IDN response because the driver tried to resync with the scope
<d1b2> <azonenberg> and probably got more waveform data in response
<d1b2> <azonenberg> then the SHTF because the driver is getting random binary data instead of scpi responses
<d1b2> <MP> yep - forcing a restart of the scope in the tried and true way
<d1b2> <azonenberg> incidentally i cant remember the last time i had to power cycle one of my lecroys due to driver instability :p
<d1b2> <azonenberg> i have crashed maui a few times
<d1b2> <azonenberg> but its not an hourly occurrence like the tek firmware seems to be
<d1b2> <MP> if you too ggresively scroll the x axis it shits itself because
<d1b2> <azonenberg> interesting. have not seen that before
<d1b2> <azonenberg> it's probably some error condition where i don't call end() cleanly on exit. Will investigate
<d1b2> <azonenberg> i did fix such an error very recently
<d1b2> <azonenberg> but i dont remember if i pushed the fix yet
<d1b2> <MP> repro : Get a waveform -> measure frequency -> scroll out aggresively on the x scale
<d1b2> <MP> get this : https://pastebin.com/GxU0RgCN
<_whitenotifier> [scopehal-apps] azonenberg pushed 2 commits to master [+8/-0/±9] https://github.com/glscopeclient/scopehal-apps/compare/d123475d3a52...0389d706357a
<_whitenotifier> [scopehal-apps] azonenberg 874841d - Initial work on eye pattern rendering in ngscopeclient. So far it's just B&W with no color ramp. See #518.
<_whitenotifier> [scopehal-apps] azonenberg 0389d70 - Added gradient texture loading. Not actually used for anything yet. See #518.
<d1b2> <azonenberg> @MP check if 0389d70 fixes it for you
<d1b2> <MP> having to restart the scope
<d1b2> <MP> @azonenberg @ louis there anything we can do if we detect getting garbage from the scope
<d1b2> <MP> @azonenberg affirm on the fix - seems to fix it - what was it?
<d1b2> <azonenberg> Recovery from scopes spewing trash at us is hard. you can attempt to sync, i think louis has some work on that
<d1b2> <azonenberg> but really the proper fix is to not get there in the first place
<d1b2> <azonenberg> that little block in RenderTimeline()
<d1b2> <azonenberg> an edge case i hadn't previously hit returned early without calling EndChild() first
<d1b2> <azonenberg> one thing i want to look into, given the prevalence of this error, is RAII-ifying some of the imgui stateful window management functions
<d1b2> <azonenberg> to ensure if we return we always call the correct End* function
<_whitenotifier> [scopehal] azonenberg pushed 1 commit to master [+0/-0/±2] https://github.com/glscopeclient/scopehal/compare/77a77a0ce49c...faacf2a2b4ae
<_whitenotifier> [scopehal] azonenberg faacf2a - ComputePipeline: add combined image sampler support
<_whitenotifier> [scopehal-apps] azonenberg pushed 2 commits to master [+0/-0/±10] https://github.com/glscopeclient/scopehal-apps/compare/0389d706357a...cfcdf99be4f2
<_whitenotifier> [scopehal-apps] azonenberg 567ce01 - Added contex menu for selecting eye pattern color ramp. See #518.
<_whitenotifier> [scopehal-apps] azonenberg cfcdf99 - Finished initial eye pattern rendering support. Also fixed bug in clear sweep functionality. Fixes #518.
<_whitenotifier> [scopehal-apps] azonenberg closed issue #518: ngscopeclient: eye pattern rendering - https://github.com/glscopeclient/scopehal-apps/issues/518
<_whitenotifier> [scopehal-apps] azonenberg labeled issue #556: ngscopeclient: eye patterns "forget" color ramp when dragged to new split - https://github.com/glscopeclient/scopehal-apps/issues/556
<_whitenotifier> [scopehal-apps] azonenberg labeled issue #556: ngscopeclient: eye patterns "forget" color ramp when dragged to new split - https://github.com/glscopeclient/scopehal-apps/issues/556
<_whitenotifier> [scopehal-apps] azonenberg opened issue #556: ngscopeclient: eye patterns "forget" color ramp when dragged to new split - https://github.com/glscopeclient/scopehal-apps/issues/556
<_whitenotifier> [scopehal] azonenberg pushed 1 commit to master [+0/-0/±1] https://github.com/glscopeclient/scopehal/compare/faacf2a2b4ae...638a0d63a5ac
<_whitenotifier> [scopehal] azonenberg 638a0d6 - scopeexports: changed CSV to use higher precision for timestamps
<_whitenotifier> [scopehal-apps] bvernoux opened issue #557: ngscopeclient import bin with multiple channel shall have their own colors - https://github.com/glscopeclient/scopehal-apps/issues/557
<_whitenotifier> [scopehal-apps] bvernoux edited issue #557: ngscopeclient import bin with multiple channel shall have their own colors - https://github.com/glscopeclient/scopehal-apps/issues/557
<_whitenotifier> [scopehal-apps] bvernoux edited issue #557: ngscopeclient: import bin with multiple channel shall have their own colors - https://github.com/glscopeclient/scopehal-apps/issues/557
bvernoux has quit [Read error: Connection reset by peer]
bvernoux has joined #scopehal
<_whitenotifier> [scopehal-apps] azonenberg commented on issue #557: ngscopeclient: import bin with multiple channel shall have their own colors - https://github.com/glscopeclient/scopehal-apps/issues/557#issuecomment-1328297226
<_whitenotifier> [scopehal-apps] azonenberg edited issue #557: Make color a per-stream property rather than per channel - https://github.com/glscopeclient/scopehal-apps/issues/557
<_whitenotifier> [scopehal] bvernoux opened issue #736: Make color a per-stream property rather than per channel - https://github.com/glscopeclient/scopehal/issues/736
<_whitenotifier> [scopehal] azonenberg edited issue #736: Make color a per-stream property rather than per channel - https://github.com/glscopeclient/scopehal/issues/736
<_whitenotifier> [scopehal] azonenberg commented on issue #736: Make color a per-stream property rather than per channel - https://github.com/glscopeclient/scopehal/issues/736#issuecomment-1328297648
<_whitenotifier> [scopehal-apps] azonenberg opened issue #558: ngscopeclient: statistic support - https://github.com/glscopeclient/scopehal-apps/issues/558
<_whitenotifier> [scopehal-apps] azonenberg labeled issue #558: ngscopeclient: statistic support - https://github.com/glscopeclient/scopehal-apps/issues/558
<_whitenotifier> [scopehal] azonenberg opened issue #737: Refactoring: allow measurement filters to self-report a "current" value - https://github.com/glscopeclient/scopehal/issues/737
<_whitenotifier> [scopehal] azonenberg labeled issue #737: Refactoring: allow measurement filters to self-report a "current" value - https://github.com/glscopeclient/scopehal/issues/737
bvernoux has quit [Ping timeout: 264 seconds]