Giter VIP home page Giter VIP logo

Comments (13)

Birch-san avatar Birch-san commented on August 11, 2024

Will sample juicysfplugin's userland stack-trace with this DTrace script:

sudo dtrace -n '
profile-1001 /execname == "juicysfplugin"/ {
  @[ustack(1)] = count();
}
tick-1sec {
  printf("%Y \n", walltimestamp);
  printa(@);
  clear(@);
  trunc(@,0);
}'

from juicysfplugin.

Birch-san avatar Birch-san commented on August 11, 2024

Ah, I cannot leave DTrace running whilst the computer's asleep. I guess that makes sense. I guess instead I would to leave the computer asleep so long that juicysfplugin hangs, giving me enough time to attach a debugger and start tracing it. Haven't managed to make it hang at all yet.

I'm gonna assume that — rather than sleep, per se — what really matters is suspending the process whilst allowing system time to progress. So, it probably suffices to just pause execution using lldb:

lldb -p `pgrep juicysfplugin`
# note: use `process detach` to resume execution

I froze the process like that, and sampled its activity as I detached the debugger. it didn't have any leap in activity.

I'm so far testing the standalone application only. maybe there's something special about FL Studio. will have to try that next.

from juicysfplugin.

Birch-san avatar Birch-san commented on August 11, 2024

Can't attach debugger to FL Studio. Maybe it has hardened runtime enabled? I was able to attach just once (#8), but then never again.

But I can suspend/resume like so:

kill -STOP `pgrep OsxFL`
kill -CONT `pgrep OsxFL`

I did this, and also tried a real sleep for a few minutes.

Neither technique was able to reproduce on macOS the sleep-wake crash that was reported on Windows.

Windows is not my main system, so I don't have such convenient access to run investigations or develop on it (involves a lot of swapping wires around and burrowing under the desk). Moreover there are gaps in my knowledge of Windows debugging, so it'll be a bit harder to diagnose the problem on that side.

Guess I'll look into this next time it's convenient to do some Windows debugging. If OpenDTrace for Windows has matured sufficiently, then that might help.

from juicysfplugin.

KJinx101 avatar KJinx101 commented on August 11, 2024

Silly me! That wasn't the issue at all. Found the actual bug: If you scroll quickly to the bottom of a list of patches, the CPU usage spikes then it crashes. This is also true for the standalone. I think it was just a matter of me using the plug in more thoroughly upon waking my computer up.

from juicysfplugin.

Birch-san avatar Birch-san commented on August 11, 2024

Thanks for narrowing down the repro. that should be far easier to investigate.

I've not been able to reproduce it on macOS standalone. I stress-tested the scrolling in a variety of ways, but I was unable to make the process's CPU usage go any higher than 11% of one core.

will try this out next time I'm on Windows.

from juicysfplugin.

Birch-san avatar Birch-san commented on August 11, 2024

is there anything special about your soundfont? I did the stress-test on FatBoy, which has the full 128 presets.

from juicysfplugin.

KJinx101 avatar KJinx101 commented on August 11, 2024

I've tried some GM ones like the musescore general and Musyng kite and well as smaller ones like famicom. Same results. It probably is just a windows thing. I actually was able to see the spike because running the bridged 64 bit plug in in 32 bit FL disconnects the bridge instead of crashing the whole program.
Juicy SFP FL debug
It only happens when I scroll to the bottom of the patch list and there's the debug ^^

from juicysfplugin.

Birch-san avatar Birch-san commented on August 11, 2024

hm, okay. are those all .sf3 by any chance? that'd account for a couple secs max-CPU on initial load of the soundfont. but admittedly it shouldn't affect scrolling.

thanks for the log output. the Release build of juicysfplugin has all logging disabled, so there's nothing noteworthy there. but that gives us the option of trying the same with a Debug build. simpler to do standalone though, since it sounds like this has nothing to do with FL Studio.

from juicysfplugin.

KJinx101 avatar KJinx101 commented on August 11, 2024

The musescore one might be, but the others are sf2s. I used to rename sf3s to sf2s to use them in fl studio before so I'm not 100% sure. Great that it's something you can do with the standalone

from juicysfplugin.

Birch-san avatar Birch-san commented on August 11, 2024

Managed to reproduce it on my Windows machine. Here's the error that's logged when you scroll to the bottom of the list of presets:

Debug Assertion Failed!

Program: ...isualStudio2017\x64\Debug\Standalone Plugin\juicysfplugin.exe
File: c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\vector
Line: 1733

Expression: vector subscript out of range

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.

(Press Retry to debug the application)

from juicysfplugin.

Birch-san avatar Birch-san commented on August 11, 2024

Clicking "Retry" puts me on this breakpoint:

image

stack looks like this:

>	juicysfplugin.exe!std::vector<TableRow,std::allocator<TableRow> >::operator[](const unsigned __int64 _Pos) Line 1733	C++
 	juicysfplugin.exe!TableComponent::paintCell(juce::Graphics & g, int rowNumber, int columnId, int width, int height, bool __formal) Line 178	C++
 	juicysfplugin.exe!juce::TableListBox::RowComp::paint(juce::Graphics & g) Line 62	C++

from juicysfplugin.

Birch-san avatar Birch-san commented on August 11, 2024

Okay, the fix (#13) was easy enough.

Here's a new release; tell me whether it works on your end.
https://github.com/Birch-san/juicysfplugin/releases/tag/2.3.3

from juicysfplugin.

KJinx101 avatar KJinx101 commented on August 11, 2024

Fixed 👍 Thanks!

from juicysfplugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.