Closed elanhickler closed 6 years ago
(1) i think, you can call StateFileManager::loadStateFromXmlFile (it's a baseclass of AudioModule) (4) did you try Desktop::setKioskModeComponent with the scope-display as i suggested somewhere else? https://juce.com/doc/classDesktop#a8fa4033714b5a9cd0714c9b9633b3366
i think, i'll look into the 2 remaining Mushroom Generator needs next and then into the other things.
btw. i crossed the 1000€ mark again, so may i send a new invoice soon?
can't figure out where to call juce::Desktop::setKioskModeComponent
, says it must be a non-static member, no idea what class derives Desktop
or what member in what class is a Desktop
aahh - i see - you need to acquire an actual object of class Desktop, because it's a non-static member function. i guess, you should use that:
https://juce.com/doc/classDesktop#a15ebe474aab368cff35578b8f7bec6c1
i suppose, the class follows the singleton design pattern:
https://sourcemaking.com/design_patterns/singleton
as said, just guessing - i never used the class myself so far. but it seems a pretty obvious case for singleton
Are you somehow overriding this stuff with your library? I wanted native title bar, it's set to true. No cigar. Also, when using kiosk mode, the standalone options/title bar is still visible. Also, I think I need to resize and set position of window to make it ACTUALLY full screen.
wait maybe the standalone is just useing a different main.cpp
ok, plugin doesn't do full screen either. wtf............
i don't think, i'm overriding any of these. but isn't your scope-display class derived from juce::Component anyway? or is it a subclass of some class in my library? ...also - what is a cigar in this context? :-O
what are you talking about cigar?
also, it's called OpenGLCanvas, not scopedisplayOpenGL, I renamed classes and did significant code cleanup.
OpenGLCanvas is a MainContentComponent -> OpenGLAppComponent -> Component
error, needs to be on desktop. (this is the plugin version)
Edit: Well what do you know, same error for standalone version. Gonna try making it a native style window on standalone. Maybe that's the issue.
Edit: Not the issue, maybe because the component I'm using is not the top level component?
you said:
I wanted native title bar, it's set to true. No cigar.
and i was like: wtf? :-D
hmm...maybe you need to call this before on the canvas: https://juce.com/doc/classComponent#ad717da76012d971197fd8cf943f3e721 and if you want to leave fullscreen, you probably need to add it back as child-component to the editor object. but as said, i'm also just guessing myself.
..yeah - i'm not up to date with the code changes you made meanwhile. ...but you know what i mean. i think, this "MainContentComponent" is a class that jim wrote in the very beginning to figure out juce-opengl stuff and should probably renamed into something more meaningful as well (i think the name comes from the default juce-names when creating a new application project)
no cigar means "it didn't work" or "i didn't get something I was trying to get" or "failed!"
aaah...ok! haha. i didn't know this
god damnit, i have a opengl error when trying to do fullscreen, may have to get lorcan involved to make this work.
yeah - opengl stuff is his domain of expertise
big fucking water damage in the house - again. i was carrying the water bucket-wise out of my kitchen. living room is also affected. :-( sooo, i was not able to do any work today and probably tomorrow as well
dam. you have a bad roof?
also why are you cursing in american? don't you like german curses?
don't you like german curses?
of course i do! so eine scheiße! it's not the roof - it comes from the water conduits. some connection got broken in the 3rd floor (i'm in the 1st, i live in an 11-floor block - refurbished gdr style, boring and ugly). now some neighbours and also the facility caretaker and the plumbing company guys (who were here an hour ago) told me, that actually all the armored tubes in the house need to be replaced. they are rusty or something (and a connection to such a tube was exactly what got broken in this case). ...and because i'm the flat owner, i have to pay for such a replacement myself (700€) ...sometime next year maybe. i don't have to do it, but if the same things happens in my flat, i guess, i'll be held responsible for any damage to other flats (or my liability insurance at least), so i guess, i'd better let it be done. fortunately, all the painter work that needs to be done now (soon, sometime) here will be covered by some other insurance (either of the house and/or the guy in the 3rd floor)
just got a call from building management. yes - painter work is covered by building insurance. any damage to my laminate or furniture would have to be covered by my own household insurance - but fortunately, i don't have any such damage - as it seems. the laminate got wet, but i think i could mop it away on time and it still looks good today
good to hear!.
hey, need help with this:
see where it says "what do I put here"
I think I figured it out, but now I'm getting crash because smoothingManager is nullptr, wtf?
This doesn't happen on spiral generator.
ok now I added a check for smoothingmanager being nullptr;
now the dropdown menu isn't calling this function, the breakpoint is never hit WHY WTF WHY IS EVERYTHING SO DIFFICULT. edit: it is hit at startup, but not when using the dropdown widget.
why is this false
I don't think any of this has to do with your latest changes as I am going back to the old commit, same behaviors. Nothing is fucking working!!!!!!!!! wasting my time...... I don't have time for this. I guess it's my fault, but why is it so easy to mess this up?
Edit: Ok, I switched that statement to always be true. Now there's another problem. It crashes at setStateFromXml
after you select a preset for the 2nd time. Works fine for the first time, and for initial/startup.
we have this function here:
void AudioPlugin::setAudioModuleToWrap(AudioModule* moduleToWrap)
{
jassert(moduleToWrap != nullptr); // you must pass a valid object here
wrappedAudioModule = moduleToWrap;
wrappedAudioModule->setSmoothingManager(&smoothingManager);
wrappedAudioModule->setMetaParameterManager(&metaParaManager);
}
which should actually get called some time early in the startup process. after that, the smoothingManager should not be a nullptr anymore. does your function somehow get called before the smoothingManager is set up? is your MRefDesignerModule the top-level module, i.e. the one that is directly wrapped into a plugin?
the smoothingManager and metaManager are objects that exist once on the plugin level and are shared between all AudioModules and their child-modules that make up the plugin (via the same pointer). the AudioModule class holds only a pointer which is set up as soon as it is wrapped into an AudioPlugin. child-modules should actually also receive the pointer whenever they are added. hmm...hard to say off the cuff, what's wrong here - but a nullptr for smoothingManager should actually not happen, i think (unless the smoothingManager gets invoked too early in the startup process)
yeah it's the top level ~editor~ module
the project in question is Soundemote\M-Ref\Mref User in case you were planning on trying to build.
edit: just committed changes, oops
ok - i can build it and load the dummy preset from Installer/Presets ...nothing seems to happen (i don't see the preset name file appear in the box). no crash either. edit: i'm building the 64-bit debug version, if that matters
btw - i get a memory leak alert on shutdown related to juce::DrawableImage
What do you mean you can load the dummy preset? Are you using the dropdown? This is what the whole thing is about, using a dropdown to load presets. There should be no dummy prests. Use the dropdown to select a preset. That's what I've been going on about: using a callback to select presets.
see: https://github.com/RobinSchmidt/RS-MET/issues/135#issuecomment-351253690
Of course your load/save preset thing works, it has always worked.
Edit: Remember, it only crashes after you try to load presets using the dropdown a few times over.
No idea about memory leaks.
what dropdown? i see only a preset loader widget.
No idea about memory leaks.
you probably create an object somewhere via new
and have forgotten the corresponding delete
. if you test/debug with juce host, you'll trigger an "jassert" on shutdown. that's the leak detection mechanism i mentioned when we were talking about pros and cons of smart-pointers
I don't know why or how to deal with memory leaks, I'm not doing anything special. I don't use "new" except for your stuff.
oh what the f*** I never committed the changes.
Edit: You have to rebuild/recreate the VS projects with the jucer!
btw, i added the missing processStereoFrame to MultiCompAudioModule - so you can use that instead of unprotecting the core object
ok, check in your updates. i guess i can fix that memory leak easily for you
......ok..... well, I'll definitely see how you fixed it so I know what not to do.
it's basically, for every "new" you have somewhere in the code, you need a corresponding "delete" somewhere else. if you forget the delete, the dynamically allocated memory never gets freed and you have what is called a memory leak. smart-pointers automate that deletion
I understand it that much, but I don't remember using a new anywhere.
I do need to learn to use smart pointers.
ok, tell me when the repo is ready for me to grab
now edit: commit message is "added dropdown for mref user"
hmmm...actually, it seems you are already using smart-pointers, like in ScopedPointer<Drawable> drawable;
in RImage. my initialy suspicion was that you forgot the delete for a raw pointer. i also get memory leaks for XmlElements now. could it be somehow related to how the binary data resources are used? ...not as easy as i thought
however, i don't get any crashes when switching the presets via the dropdown.
i changed your code to use compressorModule->processStereoFrame now, so the core object needs not to be unprotected.
hmm - don't know what to do
also, do you even know if the callback is being called? Put a breakpoint to make sure!
i just added a deletion of an XmlElement - but i still get the xml-leak warning. however, that delete i just added should certainly be there, i think
Remember the other problem I was having is that for some reason, callbacks are not being called because some variable is set to false. see: https://github.com/RobinSchmidt/RS-MET/issues/135#issuecomment-351253690
warning without my added delete:
Leaked objects detected: 30 instance(s) of class XmlElement
warning with my added delete:
Leaked objects detected: 15 instance(s) of class XmlElement
..soo, i have catched only half of them
...ok - fixed the other xml leak
xml.parse and xml.getDocumentElement return pointers to XmlElement that the caller must delete
so what about the crashes?... does fixing the memory leak fix crashes or something?
i don't have any crashes here, but i just fixed the remaining leak related to Drawable. no leaks anymore
tried now also in reaper - still no crash. switching through Preset 1-3, again and again back and forth. nothing crashy happens
aahh - i know now why the smoothingManager is initially a nullptr. we would have to change the constructor
MRefDesignerModule(juce::CriticalSection *lockToUse, jura::MetaParameterManager* metaManagerToUse);
`
to take a SmoothingManager pointer as additional argument to change that.
...hmm...but i guess it's better to leave it as is - it would trigger a cascade of required changes in all our AudioModules
edit: or well, not necessarily. only if i give the AudioModule baseclass also a 3rd parameter for the smoothingManager
edit2: or...actually i would have to, i think. but it might be worthwhile. it would allow to load xml presets from the constructor - which currently seems to be a bad idea due to the uninitialized smoothingManager.
have you verified that the preset is actually being changed, i.e. is the callback being called?