Crash silently while rendering some new* .ds files #6624
Replies: 4 comments 3 replies
-
|
Randomizer logic is at here that needs to be improved. |
Beta Was this translation helpful? Give feedback.
-
|
11F1CF6C-6BAA-5E48-58BF-C29079B9E6E6.ds Crashes at the same line: Thread 1 "lmms" received signal SIGFPE, Arithmetic exception.
0x00005555557f9595 in lmms::DrumSynth::GetDSFileSamples (this=0x7fffffffcd2b, dsfile=..., wave=@0x7fffffffcda0: 0x55555e45e960, channels=2, Fs=44100) at /home/zonkmachine/builds/lmms/src/core/DrumSynth.cpp:575
575 if((t % BFStep2) == 0) BdF2 = randmax * (float)rand() - 0.5f;bt fullClick to expandThread 1 "lmms" received signal SIGFPE, Arithmetic exception.
0x00005555557f9595 in lmms::DrumSynth::GetDSFileSamples (this=0x7fffffffcd2b, dsfile=..., wave=@0x7fffffffcda0: 0x55555e458990, channels=2, Fs=44100) at /home/zonkmachine/builds/lmms/src/core/DrumSynth.cpp:575
575 if((t % BFStep2) == 0) BdF2 = randmax * (float)rand() - 0.5f;
(gdb) bt full
#0 0x00005555557f9595 in lmms::DrumSynth::GetDSFileSamples(QString, short*&, int, unsigned int)
(this=0x7fffffffcd2b, dsfile=..., wave=@0x7fffffffcda0: 0x55555e458990, channels=2, Fs=44100) at /home/zonkmachine/builds/lmms/src/core/DrumSynth.cpp:575
sec = "Distortion", '\000'
ver = "DrumSynth\000v2.0", '\000'
comment = "DrumSynth configurations generated randomly.", '\000' , "\377\377\000\000\000\000\000\000p\314\377\377\377\177\000\000 \321D^UU\000\000p\314\377\377\377\177\000\000\235\361wUUU\000\000\000\000\000\000\000\000\000\000 \321D^UU\000\000\220\314\377\377\377\177\000\000\270\353wUUU\000\000\000\000\000\000\000\000\000\000"...
commentLen = 46
Length = 64800
tpos = 0
tplus = 1199
totmp = 1199
t = 0
i = 8
j = 0
x = {0.677721977, 0.259443283, -0.482015073}
MasterTune = 1.68179357
randmax = 4.65661287e-10
randmax2 = 9.31322575e-10
MainFilter = 2
HighPass = 0
NON = 1
NT = 55
TON = 1
DiON = 0
TDroop = 1
DStep = 4
a = 1
b = -1.10000002
c = 0.550000012
d = 0
g = 6889
TT = 0.127226084
TL = 9801
NL = 6889
F1 = 1.52155519
F2 = 0.760777593
TphiStart = 1.01229095
Tphi = 1404.74158
TDroopRate = -0.00117009634
--Type for more, q to quit, c to continue without paging--
ddF = 0.760777593
DAtten = 1
DGain = 63.0957336
BON = 0
BON2 = 1
BFStep = 1
BFStep2 = 0
botmp = 0
BdF = 0
BdF2 = 0
BPhi = 0.785398185
BPhi2 = 0.785398185
BF = 7.4735918
BF2 = 1.48561299
BQ = -3979.85376
BQ2 = 147.480209
BL = 28900
BL2 = 4489
OON = 1
OF1Sync = 1
OF2Sync = 0
OMode = 0
OW1 = 0
OW2 = 4
Ophi1 = 1.01229095
Ophi2 = 1.01229095
OF1 = 0.0244094506
OF2 = 0.0218049642
OL = 12996
Ot = 0
OBal1 = 0.930000007
OBal2 = 0.0700000003
ODrive = 0.00274399994
Ocf1 = 257.407898
Ocf2 = 288.1539
OcF = 0.811847448
OcQ = 1.3107959
OcA = 5.40392828
Oc = {{257.407898, 257.407898}, {263.557098, 263.557098}, {269.706299, 269.706299}, {275.855499, 275.855499}, {282.0047, 282.0047}, {288.1539, 288.1539}}
Oc0 = 0
--Type for more, q to quit, c to continue without paging--
Oc1 = 0
Oc2 = 0
MFfb = 0
MFtmp = 0
MFres = 0.531789422
MFin = 0
MFout = 0
DownAve = 0
DownStart = 0
DownEnd = 0
jj = 0
#1 0x00005555558595b1 in lmms::SampleBuffer::decodeSampleDS(QString, short*&, unsigned char&, unsigned int&)
(this=0x7fff273f00e8, fileName=..., buf=@0x7fffffffcda0: 0x55555e458990, channels=@0x7fffffffcd7d: 2 '\002', samplerate=@0x7fffffffcd80: 44100)
at /home/zonkmachine/builds/lmms/src/core/SampleBuffer.cpp:688
ds = {}
frames = 2
#2 0x0000555555858331 in lmms::SampleBuffer::update(bool) (this=0x7fff273f00e8, keepSettings=false) at /home/zonkmachine/builds/lmms/src/core/SampleBuffer.cpp:321
file = {d = 0x55555e44d120}
buf = 0x55555e458990
channels = 2 '\002'
samplerate = 44100
fileInfo = {d_ptr = {d = 0x55555e4083e0}}
fbuf = 0x0
lock = true
fileSizeMax = 300
sampleLengthMax = 90
fileLoadError = false
#3 0x000055555585bc8b in lmms::SampleBuffer::setAudioFile(QString const&) (this=0x7fff273f00e8, audioFile=...) at /home/zonkmachine/builds/lmms/src/core/SampleBuffer.cpp:1368
#4 0x00007fff8eb61e92 in lmms::AudioFileProcessor::setAudioFile(QString const&, bool) (this=0x7fff273f0080, _audio_file=..., _rename=true)
at /home/zonkmachine/builds/lmms/plugins/AudioFileProcessor/AudioFileProcessor.cpp:335
#5 0x00007fff8eb6484c in lmms::gui::AudioFileProcessorView::openAudioFile() (this=0x55555dfea1c0)
at /home/zonkmachine/builds/lmms/plugins/AudioFileProcessor/AudioFileProcessor.cpp:693
af = {d = 0x55555e4208c0}
#6 0x00007fff8eb6c878 in lmms::gui::AudioFileProcessorView::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)
(_o=0x55555dfea1c0, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x7fffffffd020)
at /home/zonkmachine/builds/lmms/build/plugins/AudioFileProcessor/moc_AudioFileProcessor.cpp:234
_t = 0x55555dfea1c0
#7 0x00007ffff66487c8 in () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#8 0x00007ffff7b3c116 in QAbstractButton::clicked(bool) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9 0x00005555559c7c81 in lmms::gui::AutomatableButton::mouseReleaseEvent(QMouseEvent*) (this=0x55555df900c0, _me=0x7fffffffd540)
--Type for more, q to quit, c to continue without paging--
at /home/zonkmachine/builds/lmms/src/gui/widgets/AutomatableButton.cpp:152
#10 0x00005555559e0931 in lmms::gui::PixmapButton::mouseReleaseEvent(QMouseEvent*) (this=0x55555df900c0, _me=0x7fffffffd540)
at /home/zonkmachine/builds/lmms/src/gui/widgets/PixmapButton.cpp:91
#11 0x00007ffff7a894ee in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007ffff7a46713 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff7a4e364 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ffff6610e3a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007ffff7a4ce47 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool, bool) ()
at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007ffff7aa2d40 in () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007ffff7aa5fd5 in () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007ffff7a46713 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007ffff6610e3a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007ffff69f7307 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#21 0x00007ffff69cca2c in QWindowSystemInterface::sendWindowSystemEvents(QFlags) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#22 0x00007ffff1e2cd6e in () at /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#23 0x00007ffff509ad3b in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007ffff50f0258 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007ffff50983e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007ffff666a0b8 in QEventDispatcherGlib::processEvents(QFlags) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007ffff660f75b in QEventLoop::exec(QFlags) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#28 0x00007ffff6617cf4 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#29 0x000055555577c872 in main(int, char**) (argc=1, argv=0x7fffffffded8) at /home/zonkmachine/builds/lmms/src/core/main.cpp:1018
coreOnly = false
fullscreen = true
exitAfterImport = false
allowRoot = false
renderLoop = falseWANT_DEBUG_FPE
renderTracks = false
fileToLoad = {d = 0x7ffff66fbae0 }
fileToImport = {d = 0x7ffff66fbae0 }
renderOut = {d = 0x7ffff66fbae0 }
profilerOutputFile = {d = 0x7ffff66fbae0 }
configFile = {d = 0x7ffff66fbae0 }
app = 0x5555563cb4e0
qs = {interpolation = lmms::AudioEngine::qualitySettings::Interpolation_SincFastest, oversampling = lmms::AudioEngine::qualitySettings::Oversampling_2x}
30A67BA3-5366-92AF-863F-C3028BC97791.ds Crash at: Thread 1 "lmms" received signal SIGFPE, Arithmetic exception.
0x00005555557f93c9 in lmms::DrumSynth::GetDSFileSamples (this=0x7fffffffcd2b, dsfile=..., wave=@0x7fffffffcda0: 0x55555e458ae0, channels=2, Fs=44100) at /home/zonkmachine/builds/lmms/src/core/DrumSynth.cpp:560
560 if((t % BFStep) == 0) BdF = randmax * (float)rand() - 0.5f;
(gdb)bt fullClick to expandThread 1 "lmms" received signal SIGFPE, Arithmetic exception. 533A4CE0-AAFC-C3C1-22DD-41FD722CDF25.ds Works for me. It's at a low volume though. I'll try and probe them again with WANT_DEBUG_FPE and that may give us some more info. |
Beta Was this translation helpful? Give feedback.
-
|
WANT_DEBUG_FPE didn't give us anything more. I've updated the answer above with full logs. |
Beta Was this translation helpful? Give feedback.
-
Yeah, I can get the files to load with by patching Drumsynth. diff --git a/src/core/DrumSynth.cpp b/src/core/DrumSynth.cpp
index bc5455c96..eef1097ea 100644
--- a/src/core/DrumSynth.cpp
+++ b/src/core/DrumSynth.cpp
@@ -420,7 +420,7 @@ int DrumSynth::GetDSFileSamples(QString dsfile, int16_t *&wave, int channels, sa
BFStep = GetPrivateProfileInt(sec,"dF",50,dsfile);
BQ = (float)BFStep;
BQ = BQ * BQ / (10000.f-6600.f*((float)sqrt(BF)-0.19f));
- BFStep = 1 + (int)((40.f - (BFStep / 2.5f)) / (BQ + 1.f + (1.f * BF)));
+ BFStep = std::max(1, (int)((40.f - (BFStep / 2.5f)) / (BQ + 1.f + (1.f * BF))));
strcpy(sec, "NoiseBand2");
chkOn[4] = GetPrivateProfileInt(sec,"On",0,dsfile); BON2 = chkOn[4];
@@ -432,7 +432,7 @@ int DrumSynth::GetDSFileSamples(QString dsfile, int16_t *&wave, int channels, sa
BFStep2 = GetPrivateProfileInt(sec,"dF",50,dsfile);
BQ2 = (float)BFStep2;
BQ2 = BQ2 * BQ2 / (10000.f-6600.f*((float)sqrt(BF2)-0.19f));
- BFStep2 = 1 + (int)((40 - (BFStep2 / 2.5)) / (BQ2 + 1 + (1 * BF2)));
+ BFStep2 = std::max(1, (int)((40 - (BFStep2 / 2.5)) / (BQ2 + 1 + (1 * BF2))));
//read distortion parameters
strcpy(sec, "Distortion");
@@ -745,4 +745,4 @@ int DrumSynth::GetDSFileSamples(QString dsfile, int16_t *&wave, int channels, sa
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
TLDR: What is wrong with the attached .ds files?
I experimented to create some .ds files newly, because the binary version of .ds editor did not work fully (win11) for me.
So, I thought of randomizing the data that produces a lot of .ds files.
I apologize, if slightly off-topic here.
I created some .ds files. But it crashes LMMS.
Important findings are,
As soon as I click on render preview with the attached bad .ds files, LMMS crashes.
Also there are some good .ds files too.
good.ds.zip - ok to render, new sounds ;-)
bad.ds.zip - They crash LMMS :-(
ds_instruments.sql.txt Table structure for reference and unifying all .ds files here.
What might have gone wrong with my .ds configs?
References and here
Beta Was this translation helpful? Give feedback.
All reactions