Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presets with peak controller crash LMMS after previewing #3897

Closed
LostPr3acherEDM opened this issue Oct 21, 2017 · 30 comments
Closed

Presets with peak controller crash LMMS after previewing #3897

LostPr3acherEDM opened this issue Oct 21, 2017 · 30 comments
Assignees
Milestone

Comments

@LostPr3acherEDM
Copy link

No description provided.

@LostPr3acherEDM LostPr3acherEDM changed the title Triple Oscillator Presets (user defined) crash program upon being dragged into a Beat & Bassline Editor User-defined 3xOscillator presets crash LMMS upon being dragged into a Beat & Bassline Editor Oct 21, 2017
@LostPr3acherEDM
Copy link
Author

Some specifics:
Version: 1.2.0-rc4 (beta) and ALL PREVIOUS NON-BETA ("STABLE") VERSIONS AS WELL.
This problem has never failed to faithfully occur for me, and I've used both 32 bit & 64 bit
versions (on the correct systems, don't worry).


I'm not a coder, though in auld lang syne I have made hewo.c successfully lol. My issue is that I'm
unsure as to whether I'm unaware of a patch or fix that perhaps already exists, or that I'm unaware that I'm doing something wrong to begin with in the program. However, seeing as this is a simple matter of dragging a 3xOscillator preset I'd saved prior into an editor, this seems pretty straightforward to me, and I don't think I've done it wrong. It simply crashes the program, and I've no clue as to how.
Please let me know if I need to quit looking for a fix (because it hasn't been reached yet on the list of things to fix) or whether I've simply been looking in all the wrong places.

Thank you for your support of this program that has enabled me to change my life.
I'm an artist, and creative people must create to be happy and sane. In my current life situation, I would not be able to do that to the tune of hundreds of dollars for Ableton/FL/Logic/etc.
I am aware that a free product falls under the "beggars can't be choosers" category, and I'm well aware that I should expect some issues.

This particular issue, though, is one which drives me nuts.

Thanks y'all.

M. Rodgers

@PhysSong
Copy link
Member

@LostPr3acherEDM What Is your OS and which directory did you save your preset in?

@LostPr3acherEDM
Copy link
Author

Sys Info:
Win 10 Pro
Version: 1511
OS Build 10586.420
Processor: AMD FX(tm)-6100 Six-Core Processor 3.30 GHz
Installed RAM: 16.0 GB
System Type: 64 bit for both OS and processor.

Steps to reproduce:
Drag a 3xOscillator from instrument plugins. Set all signals to white noise.
Go to FX and drag in a peak controller. Save preset.
I saved to the default folder that LMMS provided upon clicking save:
"C:\Users(my user name)\lmms\presets\TripleOscillator"
Save project. Exit LMMS.
Start LMMS again, open up the default BBE and attempt to drag your preset you save previously into it and IMMEDIATELY upon attempting to save the project again, sometimes before, it crashes. I'm clueless.

@PhysSong
Copy link
Member

Does your username contain non-ASCII characters?

@LostPr3acherEDM
Copy link
Author

My username consists of one word in English followed by a space and then around eight numbers. Do numerals count within ASCII? I used to make ASCII art lol, but I don't recall the specifics of what is or is not ASCII.

@PhysSong
Copy link
Member

Then howabout preset file name? And what happens if you drop a preset or project file into song editor?

@LostPr3acherEDM
Copy link
Author

filename

@LostPr3acherEDM
Copy link
Author

savethencrash

@LostPr3acherEDM
Copy link
Author

When I drag native presets onto the screen, I can save my work and nothing wrong occurs. However, if I dare attempt to drag one of my OWN presets and then save the program, it crashes every single time without fail.

@PhysSong
Copy link
Member

Can you open loaded instrument before saving? If so, does it sound as expected?

@LostPr3acherEDM
Copy link
Author

I just tried. I made the preset, saved it, refreshed the presets menu and dragged it back into the editor and as soon as I tried hitting play, it crashed.

@gi0e5b06
Copy link

Confirmed. On Linux too.

Thread 1 "lmms" received signal SIGSEGV, Segmentation fault.
ControllerView::paintEvent (this=0x555556f4f160) at lmms/src/gui/widgets/ControllerView.cpp:210
210             p.drawText( 5, 54, model()->displayName() );

(no no-ascii character was used)

@gi0e5b06
Copy link

gi0e5b06 commented Oct 21, 2017

model() is null.
controller() is null.

@PhysSong
Copy link
Member

@LostPr3acherEDM If you load default TripleOscillator and save it to preset, does LMMS crash? If so, what if you save your own preset to the built-in preset directory?

@musikBear
Copy link

not able to reproduce on rc4 win32
@LostPr3acherEDM try this

  • shut down lmms
  • shut down pc completely -not sleep
    Wait a mins
  • start pc & lmms
  • open myPresets | trippleOSC
  • right-click on the preset that cause the crash
  • select 'open in song-editor' from context menu

what happen?

Now try to drag it in
what happen?

@tresf
Copy link
Member

tresf commented Oct 21, 2017

@gi0e5b06 since you can reproduce this, can you please help document the steps that get this to happen each time and help provide a proper backtrace? I too cannot reproduce this bug, we need some help. :)

... and @LostPr3acherEDM thanks for the kind words and well described bug report. If @gi0e5b06 can trace the crash, we should be able to fix this in time for stable-1.2.

@tresf tresf added bug and removed support request labels Oct 21, 2017
@tresf tresf added this to the 1.2.0 milestone Oct 21, 2017
@gi0e5b06
Copy link

@tresf I just followed the given instructions.
The backtrace of the segfault doesn't help because it's in paintEvent().
However, the backtrace of the constructor is:

stack trace:

  lmms/lmms : ControllerRackView::onControllerAdded(Controller*)+0x47
  /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 : QMetaObject::activate(QObject*, int, int, void**)+0x639
  lmms/lmms : Song::controllerAdded(Controller*)+0x42
  lmms/lmms : Song::addController(Controller*)+0xfe
  lmms/plugins/libpeakcontrollereffect.so : PeakControllerEffect::PeakControllerEffect(Model*, Plugin::Descriptor::SubPluginFeatures::Key const*)+0xa8
  lmms/plugins/libpeakcontrollereffect.so : lmms_plugin_main()+0x31
  lmms/lmms : Plugin::instantiate(QString const&, Model*, void*)+0xb5
  lmms/lmms : Effect::instantiate(QString const&, Model*, Plugin::Descriptor::SubPluginFeatures::Key*)+0xc
  lmms/lmms : EffectChain::loadSettings(QDomElement const&)+0x48a
  lmms/lmms : SerializingObject::restoreState(QDomElement const&)+0x12

The model is not set after that.
Related part of the preset:

      <fxchain enabled="1" numofeffects="1">
        <effect gate="0" autoquit_syncmode="0" autoquit_numerator="4" name="peakcontrollereffect" wet="1" autoquit="1" autoquit_denominator="
4" on="1">
          <peakcontrollereffectcontrols mute="0" abs="1" effectId="346664770" base="0.5" amountmult="1" treshold="0" decay="0" amount="1" att
ack="0"/>
          <key/>
        </effect>
      </fxchain>

@eagles051387
Copy link

eagles051387 commented Oct 21, 2017 via email

@PhysSong
Copy link
Member

@gi0e5b06 Did you put a peak controller in your preset?

@gi0e5b06
Copy link

@eagles051387 The issue occurs on Linux too. It's related to Lmms, not to the OS.

@PhysSong Yes, I followed the instructions given by @LostPr3acherEDM to confirm the bug.

It looks like the peak controller is restored in an invalid state.

@PhysSong
Copy link
Member

Maybe related: #193

@PhysSong
Copy link
Member

Wait, ControllerView::paintEvent() isn't in our code. It is added by @gi0e5b06 in gi0e5b06/lmms@a0bb009.
@gi0e5b06 Can you reproduce this with clean stable-1.2 build?

@PhysSong
Copy link
Member

Tested. add by context menu works properly. After you preview a preset, however, the peak controller created by previewing doesn't get deleted.

@PhysSong PhysSong added the core label Oct 22, 2017
@PhysSong
Copy link
Member

And there's one more issue: assume that issue is fixed. However, the peak controller from preview track will be saved if you save during previewing, the controller will be saved. The saved file won't be open correctly because of corrupted peak controller.

@BaraMGB
Copy link
Contributor

BaraMGB commented Oct 22, 2017

Does it make sense to save a peak controller with a preset?

@PhysSong
Copy link
Member

Yes. For example, user might save that as a sidechain signal.

@PhysSong PhysSong changed the title User-defined 3xOscillator presets crash LMMS upon being dragged into a Beat & Bassline Editor Presets with peak controller crash LMMS after previewing Oct 23, 2017
@PhysSong
Copy link
Member

The simplest way is not to instantiate peak controller when previewing. It seems already implemented, but broken now. I'm going to fix that.

@musikBear
Copy link

@PhysSong this 'preview' is also happening with VSTs effects. The VST UI will open is you prehear a preset, where a VST effect is placed on the FX-tab.
This will result in an orphan remoteVST, that only can be closed down in TM, so its a genuine mem.leak
Half of the issue was #300 (VSTinstruments), but the effect-part var not solved in #1587 (300 was solved in 1587).

@gi0e5b06
Copy link

gi0e5b06 commented Oct 23, 2017

Fixed. Also a few other bugs in the file browser.
gi0e5b06@52eed29
My new git assistant @Umcaruje will make a nice PR from that (or not). He volunteered on Discord. :)

@PhysSong For saving, nothing is done. However, I added a m_savingProject bool that works like m_loadingProject.

@PhysSong
Copy link
Member

but the effect-part var not solved in #1587 (300 was solved in 1587).

@musikBear If it can be reproduced, I'll re-open that. It may be added into 1.2.0 milestone if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants