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

Some samples crashing program #7032

Closed
SalutanisOrkonus opened this issue Dec 26, 2023 · 10 comments · Fixed by #7040
Closed

Some samples crashing program #7032

SalutanisOrkonus opened this issue Dec 26, 2023 · 10 comments · Fixed by #7040
Labels

Comments

@SalutanisOrkonus
Copy link

Bug Summary

When trying to select some specific samples (Example in my case is a bunch of FL Studio's factory samples (Not all though apparently)), the program will freeze a moment then crash

Steps to reproduce

This probably applies to more, but I just have FL's for reference, so have those, try selecting some (Some seem to work others don't, I know some SFX and Drum stuff doesn't work), and then watch your program crash

Expected behavior

The sound selects properly, and lets me use it

Actual behavior

Say bye to your current instance

Affected LMMS versions

1.3.0-alpha.1.489+g4e63f6065

@Rossmaxx
Copy link
Contributor

I thought @sakertooth fixed it before #6610 got merged. That regression comes from that pr. I remember seeing that discussion.

@musikBear
Copy link

bunch of FL Studio's factory samples

Highly likely they are protected.

@SalutanisOrkonus
Copy link
Author

They were working fine before and didn't crash the program

@sakertooth
Copy link
Contributor

Could you upload the files that crashed so I can debug this issue?

@SalutanisOrkonus
Copy link
Author

fl l.zip
here's two of them

@M4rotte
Copy link

M4rotte commented Dec 31, 2023

Could it be the same problem than for #7036 ?

@M4rotte
Copy link

M4rotte commented Dec 31, 2023

fl l.zip here's two of them

Crashes for me too:


Thread 1 "lmms" received signal SIGSEGV, Segmentation fault.
0x00005555558a8b7c in lmms::(anonymous namespace)::decodeSampleOggVorbis (audioFile=...) at /usr/local/src/lmms/src/core/SampleDecoder.cpp:149
149			else if (numChannels > 1) { result[i] = {buffer[i * numChannels], buffer[i * numChannels + 1]}; }

(gdb) bt full

#0  0x00005555558a8b7c in lmms::(anonymous namespace)::decodeSampleOggVorbis(QString const&) (audioFile=...) at /usr/local/src/lmms/src/core/SampleDecoder.cpp:149
        i = 104664
        vorbisFile = {datasource = 0x0, seekable = 0, offset = 0, end = 0, oy = {data = 0x0, storage = 0, fill = 0, returned = 0, unsynced = 0, headerbytes = 0, bodybytes = 0}, links = 0, offsets = 0x0, dataoffsets = 0x0, serialnos = 0x0, pcmlengths = 0x0, vi = 0x0, vc = 0x0, pcm_offset = 0, ready_state = 0, current_serialno = 0, current_link = 0, bittrack = 0, samptrack = 0, os = {body_data = 0x0, body_storage = 0, body_fill = 0, body_returned = 0, lacing_vals = 0x0, granule_vals = 0x0, lacing_storage = 0, lacing_fill = 0, lacing_packet = 0, lacing_returned = 0, header = '\000' <repeats 281 times>, header_fill = 0, e_o_s = 0, b_o_s = 0, serialno = 0, pageno = 0, packetno = 0, granulepos = 0}, vd = {analysisp = 0, vi = 0x0, pcm = 0x0, pcmret = 0x0, pcm_storage = 0, pcm_current = 0, pcm_returned = 0, preextrapolate = 0, eofflag = 0, lW = 0, W = 0, nW = 0, centerW = 0, granulepos = 0, sequence = 0, glue_bits = 0, time_bits = 0, floor_bits = 0, res_bits = 0, backend_state = 0x0}, vb = {pcm = 0x0, opb = {endbyte = 0, endbit = 0, buffer = 0x0, ptr = 0x0, storage = 0}, lW = 0, W = 0, nW = 0, pcmend = 0, mode = 0, eofflag = 0, granulepos = 0, sequence = 0, vd = 0x0, localstore = 0x0, localtop = 0, localalloc = 0, totaluse = 0, reap = 0x0, glue_bits = 0, time_bits = 0, floor_bits = 0, res_bits = 0, internal = 0x0}, callbacks = {read_func = 0x0, seek_func = 0x0, close_func = 0x0, tell_func = 0x0}}
        openError = 0
        vorbisInfo = 0x55555cf62b00
        numChannels = 2
        sampleRate = 44100
        numSamples = 176400
        buffer = std::vector of length 176400, capacity 176400 = {-0.0200910848, -0.0299022775, 0.0154374614, 0.102257147, 0.0706212744, 0.0302155111, -0.0753207579, -0.229615882, -0.0781612024, 0.0290697385, -0.0670265779, -0.0406271964, -0.0294292234, -0.051224079, -0.0558607392, -0.0516116135, 0.0162338428, -0.00058866461, -0.0534853786, -0.0148155382, -0.0039453879, -0.0651425049, -0.0652098358, -0.0304093473, -0.0645151436, -0.0496941432, -0.0350021459, -0.0701222122, -0.0537011102, -0.0511431694, 0.000886080787, 0.0515042543, 0.0347541831, 0.0980932862, 0.0727366135, -0.0412171483, -0.035815917, -0.0144640096, -0.0396034345, -0.0766880289, -0.0536658764, 0.0228938647, 0.0219102204, -0.00318344682, 0.0341696627, 0.0759637654, 0.0464778468, 0.0393892527, 0.127669275, 0.113584243, 0.0443641841, 0.0628457814, 0.0538395941, 0.0810766071, 0.0454430766, -0.0890355557, 0.0134140551, 0.0967808217, 0.0147010982, 0.0900093243, 0.147426233, 0.164810956, 0.171360224, 0.0431038402, 0.0367901102, 0.0261224583, -0.0820302367, -0.0271996893, 0.0210029967, 0.029471226, 0.0858230591, 0.0674538016, 0.0047156848, -0.0127516072, 0.00691756606, -0.0428885631, -0.0445414409, 0.0163797513, -0.0591275059, -0.0377945825, 0.0252787825, -0.00704245083, 0.059158016, -0.0429215766, -0.105318815, 0.0775783062, -0.025713101, -0.0660291314, 0.129401878, 0.0344689563, -0.0385970473, 0.0524803475, 0.0450637229, 0.0232599191, -0.00492386706, 0.0210374314, 0.0810106024, 0.0616280958, 0.0552726239, 0.0200150311, -0.0434389971, -0.00472604344, 0.0366048813, -0.0206448175, -0.0370038599, 0.0134587958, -0.0309505332, -0.0336442851, 0.0701915994, 0.0367798395, 0.00946567953, 0.0383531712, -0.0964118019, -0.125357315, -0.0350874886, -0.12166135, -0.0976663977, 0.0569475889, -0.00910733733, -0.107920274, -0.0392707177, 0.0388825722, -0.00367058907, -0.060088221, -0.00891172048, 0.0510868393, 0.118150599, 0.08830861, -0.0212473106, 0.107484676, 0.154443651, 0.0274142958, 0.126775607, 0.196103498, 0.154632747, 0.107357487, 0.0057108961, 0.00234980881, -0.0280274395, -0.0327433757, 0.0356812291, -0.0207347386, 0.00262005441, 0.0463729128, 0.0551205911, 0.113778621, -0.0033892463, -0.0779178813, -0.0261135548, -0.0335529819, -0.00772050209, -0.0368544012, -0.0131798349, 0.0747615471, 0.0289632045, 0.0486744419, 0.0361944214, -0.127836287, -0.176946715, -0.112729505, -0.026944723, 0.0171339773, -0.0253727902, -0.0571599342, -0.0818779618, -0.118969262, -0.142397285, -0.164014071, -0.108965859, -0.0174118578, -0.0403310694, -0.0838573948, -0.10105063, -0.145243838, -0.133260876, -0.145649374, -0.168764174, -0.0714743808, 0.0413751677, 0.114233889, 0.0785750002, 0.0154365562, 0.0374806933, -0.0105431955, 0.00240402482, 0.0393572561, -0.0116353855, 0.0838768631, 0.131266668, 0.0950630456, 0.139213458, 0.106225185, 0.0716547817, 0.0502788648, 0.0696027726, 0.139524862, 0.108190313, 0.108121999, 0.0632253215, 0.00815856084...}
        output = 0x55555d389ce0
        totalSamplesRead = 176400
        result = std::vector of length 88200, capacity 88200 = {{_M_elems = {-0.0200910848, -0.0299022775}}, {_M_elems = {0.0154374614, 0.102257147}}, {_M_elems = {0.0706212744, 0.0302155111}}, {_M_elems = {-0.0753207579, -0.229615882}}, {_M_elems = {-0.0781612024, 0.0290697385}}, {_M_elems = {-0.0670265779, -0.0406271964}}, {_M_elems = {-0.0294292234, -0.051224079}}, {_M_elems = {-0.0558607392, -0.0516116135}}, {_M_elems = {0.0162338428, -0.00058866461}}, {_M_elems = {-0.0534853786, -0.0148155382}}, {_M_elems = {-0.0039453879, -0.0651425049}}, {_M_elems = {-0.0652098358, -0.0304093473}}, {_M_elems = {-0.0645151436, -0.0496941432}}, {_M_elems = {-0.0350021459, -0.0701222122}}, {_M_elems = {-0.0537011102, -0.0511431694}}, {_M_elems = {0.000886080787, 0.0515042543}}, {_M_elems = {0.0347541831, 0.0980932862}}, {_M_elems = {0.0727366135, -0.0412171483}}, {_M_elems = {-0.035815917, -0.0144640096}}, {_M_elems = {-0.0396034345, -0.0766880289}}, {_M_elems = {-0.0536658764, 0.0228938647}}, {_M_elems = {0.0219102204, -0.00318344682}}, {_M_elems = {0.0341696627, 0.0759637654}}, {_M_elems = {0.0464778468, 0.0393892527}}, {_M_elems = {0.127669275, 0.113584243}}, {_M_elems = {0.0443641841, 0.0628457814}}, {_M_elems = {0.0538395941, 0.0810766071}}, {_M_elems = {0.0454430766, -0.0890355557}}, {_M_elems = {0.0134140551, 0.0967808217}}, {_M_elems = {0.0147010982, 0.0900093243}}, {_M_elems = {0.147426233, 0.164810956}}, {_M_elems = {0.171360224, 0.0431038402}}, {_M_elems = {0.0367901102, 0.0261224583}}, {_M_elems = {-0.0820302367, -0.0271996893}}, {_M_elems = {0.0210029967, 0.029471226}}, {_M_elems = {0.0858230591, 0.0674538016}}, {_M_elems = {0.0047156848, -0.0127516072}}, {_M_elems = {0.00691756606, -0.0428885631}}, {_M_elems = {-0.0445414409, 0.0163797513}}, {_M_elems = {-0.0591275059, -0.0377945825}}, {_M_elems = {0.0252787825, -0.00704245083}}, {_M_elems = {0.059158016, -0.0429215766}}, {_M_elems = {-0.105318815, 0.0775783062}}, {_M_elems = {-0.025713101, -0.0660291314}}, {_M_elems = {0.129401878, 0.0344689563}}, {_M_elems = {-0.0385970473, 0.0524803475}}, {_M_elems = {0.0450637229, 0.0232599191}}, {_M_elems = {-0.00492386706, 0.0210374314}}, {_M_elems = {0.0810106024, 0.0616280958}}, {_M_elems = {0.0552726239, 0.0200150311}}, {_M_elems = {-0.0434389971, -0.00472604344}}, {_M_elems = {0.0366048813, -0.0206448175}}, {_M_elems = {-0.0370038599, 0.0134587958}}, {_M_elems = {-0.0309505332, -0.--Type <RET> for more, q to quit, c to continue without paging--

0336442851}}, {_M_elems = {0.0701915994, 0.0367798395}}, {_M_elems = {0.00946567953, 0.0383531712}}, {_M_elems = {-0.0964118019, -0.125357315}}, {_M_elems = {-0.0350874886, -0.12166135}}, {_M_elems = {-0.0976663977, 0.0569475889}}, {_M_elems = {-0.00910733733, -0.107920274}}, {_M_elems = {-0.0392707177, 0.0388825722}}, {_M_elems = {-0.00367058907, -0.060088221}}, {_M_elems = {-0.00891172048, 0.0510868393}}, {_M_elems = {0.118150599, 0.08830861}}, {_M_elems = {-0.0212473106, 0.107484676}}, {_M_elems = {0.154443651, 0.0274142958}}, {_M_elems = {0.126775607, 0.196103498}}, {_M_elems = {0.154632747, 0.107357487}}, {_M_elems = {0.0057108961, 0.00234980881}}, {_M_elems = {-0.0280274395, -0.0327433757}}, {_M_elems = {0.0356812291, -0.0207347386}}, {_M_elems = {0.00262005441, 0.0463729128}}, {_M_elems = {0.0551205911, 0.113778621}}, {_M_elems = {-0.0033892463, -0.0779178813}}, {_M_elems = {-0.0261135548, -0.0335529819}}, {_M_elems = {-0.00772050209, -0.0368544012}}, {_M_elems = {-0.0131798349, 0.0747615471}}, {_M_elems = {0.0289632045, 0.0486744419}}, {_M_elems = {0.0361944214, -0.127836287}}, {_M_elems = {-0.176946715, -0.112729505}}, {_M_elems = {-0.026944723, 0.0171339773}}, {_M_elems = {-0.0253727902, -0.0571599342}}, {_M_elems = {-0.0818779618, -0.118969262}}, {_M_elems = {-0.142397285, -0.164014071}}, {_M_elems = {-0.108965859, -0.0174118578}}, {_M_elems = {-0.0403310694, -0.0838573948}}, {_M_elems = {-0.10105063, -0.145243838}}, {_M_elems = {-0.133260876, -0.145649374}}, {_M_elems = {-0.168764174, -0.0714743808}}, {_M_elems = {0.0413751677, 0.114233889}}, {_M_elems = {0.0785750002, 0.0154365562}}, {_M_elems = {0.0374806933, -0.0105431955}}, {_M_elems = {0.00240402482, 0.0393572561}}, {_M_elems = {-0.0116353855, 0.0838768631}}, {_M_elems = {0.131266668, 0.0950630456}}, {_M_elems = {0.139213458, 0.106225185}}, {_M_elems = {0.0716547817, 0.0502788648}}, {_M_elems = {0.0696027726, 0.139524862}}, {_M_elems = {0.108190313, 0.108121999}}, {_M_elems = {0.0632253215, 0.00815856084}}, {_M_elems = {0.06833601, 0.0188944936}}, {_M_elems = {0.00836397335, -0.0143079264}}, {_M_elems = {-0.0836714059, 0.103116877}}, {_M_elems = {0.149763152, 0.0251810253}}, {_M_elems = {0.0912922844, 0.0298899729}}, {_M_elems = {-0.16141732, -0.170230687}}, {_M_elems = {-0.10149546, -0.0946341828}}, {_M_elems = {-0.0801534131, -0.0862438083}}, {_M_elems = {-0.132157296, -0.106896162}}, {_M_elems = {-0.189427495, -0.246245638}}, {_M_elems = {-0.0297673643, -0.0709811822}}, {_M_elems = {-0.269955218, -0.109524772}}, {_M_elems = {-0.0441992469, -0.154417425}}, {_M_elems = {-0.0742565393, -0.0544633791}}, {_M_elems = {-0.103642255, -0.024860302}}, {_M_elems = {-0.0298624113, -0.0323144048}}, {_M_elems = {0.0749115348, 0.016517479}}, {_M_elems = {-0.0930809155, -0.0637330413}}, {_M_elems = {-0.00273725018, -0.00183083862}}, {_M_elems = {-0.0416038744, 0.0471136346}}, {_M_elems = {0.0184575208, -0.168619782}}, {_M_elems = {-0.0275457278, 0.0856390744}}, {_M_elems = {-0.0182699133, 0.0483908765}}, {_M_elems = {0.0038986709, -0.114543289}}, {_M_elems = {0.00695763621, 0.102848068}}, {_M_elems = {0.044598788, -0.00153445452}}, {_M_elems = {0.015251033, 0.0394250527}}, {_M_elems = {0.103927322, 0.0770115554}}, {_M_elems = {-0.0550736859, -0.0348442793}}, {_M_elems = {-0.0705953687, -0.0582278483}}, {_M_elems = {0.129382983, -0.00486400537}}, {_M_elems = {-0.0790670067, 0.100418128}}, {_M_elems = {0.0435442701, 0.0476745553}}, {_M_elems = {0.0883123949, -0.00285294466}}, {_M_elems = {0.0481890701, 0.032075271}}, {_M_elems = {-0.0507582091, -0.0308819562}}, {_M_elems = {-0.0384152196, 0.00203087181}}, {_M_elems = {0.0718482658, 0.0821174085}}, {_M_elems = {0.0518216677, -0.0321166553}}, {_M_elems = {-0.0190475136, 0.0840527639}}, {_M_elems = {0.100672089, 0.109832823}}, {_M_elems = {0.0586737692, -0.0876248106}}, {_M_elems = {-0.0392893106, 0.0549018458}}, {_M_elems = {-0.0061960537, 0.0302154273}}, {_M_elems = {0.0347521901, -0.104689009}}, {_M_elems = {-0.136181608, -0.0852096379}}, {_M_elems = {-0.0218507703, 0.0233579688}}, {_M_elems = {0.00117330998, -0.0370209329}}, {_M_elems = {-0.0741520673, -0.0634096563}}, {_M_elems = {-0.0177424718, 0.0240732003}}, {_M_elems = {-0.00633000024, -0.131581455}}, {_M_elems = {-0.0937513635, 0.0058907941}}, {_M_elems = {-0.0645240992, -0.0555972382}}, {_M_elems = {-0.0219681356, -0.125032008}}, {_M_elems = {-0.0971776024, 0.0262685083}}, {_M_elems = {-0.0300035197, -0.108541764}}, {_M_elems = {-0.0678999946, -0.0607008785}}, {_M_elems = {-0.0166377313, 0.0215896778}}, {_M_elems = {-0.0404645018, 0.0122569874}}, {_M_elems = {-0.0504521988, -0.229545891}}, {_M_elems = {-0.0659232214, 0.0833514035}}, {_M_elems = {0.00352062285, 0.0198752489}}, {_M_elems = {0.0663815886, 0.0821121335}}, {_M_elems = {0.0697429553, 0.104880929}}, {_M_elems = {0.179108202, 0.0190594941}}, {_M_elems = {-0.0797467902, 0.0707048476}}, {_M_elems = {0.124825932, 0.192642361}}, {_M_elems = {0.207683623, 0.0386411585}}, {_M_elems = {0.112432972, 0.27703467}}, {_M_elems = {0.185182899, 0.103375353}}, {_M_elems = {0.110714979, 0.105353728}}, {_M_elems = {0.0588696226, 0.00797305256}}, {_M_elems = {0.0574330054, 0.00506524369}}, {_M_elems = {-0.113366708, -0.0155941043}}, {_M_elems = {0.0440539271, -0.0214862898}}, {_M_elems = {-0.00531458482, 0.0102445409}}, {_M_elems = {0.00299891457, -0.0441648103}}, {_M_elems = {-0.091140762, 0.000155985355}}, {_M_elems = {0.0104096159, -0.0890384316}}, {_M_elems = {-0.0305123515, -0.0140342042}}, {_M_elems = {-0.141707957, -0.0780586079}}, {_M_elems = {0.0734481812, 0.0545325205}}, {_M_elems = {0.00502337608, -0.0698371157}}, {_M_elems = {-0.124579817, -0.0316304415}}, {_M_elems = {-0.0686942041, -0.162972927}}, {_M_elems = {-0.0353417657, -0.0330503359}}, {_M_elems = {-0.13101317, 0.00244542025}}, {_M_elems = {0.0352030173, -0.058424525}}, {_M_elems = {0.0390400514, 0.0649519563}}, {_M_elems = {-0.0261615366, 0.031719625}}, {_M_elems = {0.053397052, -0.0501359142}}, {_M_elems = {-0.0620466135, 0.0326603651}}, {_M_elems = {0.0774185732, 0.0175285414}}, {_M_elems = {-0.0276434645, -0.00769513845}}, {_M_elems = {0.0243183933, 0.0463531241}}, {_M_elems = {0.0360452607, 0.0104322433}}, {_M_elems = {-0.0209288523, -0.000653939322}}, {_M_elems = {0.0672070235, 0.0624880381}}, {_M_elems = {0.0589526892, 0.0264017954}}, {_M_elems = {-0.0663939789, -0.0233224854}}...}
#1  0x00005555558a91fd in lmms::SampleDecoder::decode(QString const&) (audioFile=...) at /usr/local/src/lmms/src/core/SampleDecoder.cpp:201
        decoder = @0x555555c11d68: 0x5555558a886d <lmms::(anonymous namespace)::decodeSampleOggVorbis(QString const&)>
        __for_range = @0x555555c11d60: {_M_elems = {0x5555558a82ee <lmms::(anonymous namespace)::decodeSampleSF(QString const&)>, 0x5555558a886d <lmms::(anonymous namespace)::decodeSampleOggVorbis(QString const&)>, 0x5555558a8676 <lmms::(anonymous namespace)::decodeSampleDS(QString const&)>}}
        __for_begin = 0x555555c11d68 <lmms::(anonymous namespace)::decoders+8>
        __for_end = 0x555555c11d78 <lmms::UI_CTRL_KEY>
        result = std::optional<lmms::SampleDecoder::Result> [no contained value]
#2  0x00005555558a4ad3 in lmms::SampleBuffer::SampleBuffer(QString const&) (this=0x55555cfa32f0, audioFile=...) at /usr/local/src/lmms/src/core/SampleBuffer.cpp:45
        decodedResult = std::optional<lmms::SampleDecoder::Result> [no contained value]
        absolutePath = {d = 0x55555d38bb20}
#3  0x00005555558a467b in std::_Construct<lmms::SampleBuffer, QString const&>(lmms::SampleBuffer*, QString const&) (__p=0x55555cfa32f0) at /usr/include/c++/12/bits/stl_construct.h:119
--Type <RET> for more, q to quit, c to continue without paging--

#4  0x00005555558a4452 in std::allocator_traits<std::allocator<void> >::construct<lmms::SampleBuffer, QString const&>(std::allocator<void>&, lmms::SampleBuffer*, QString const&)
    (__p=0x55555cfa32f0) at /usr/include/c++/12/bits/alloc_traits.h:635
#5  0x00005555558a4031 in std::_Sp_counted_ptr_inplace<lmms::SampleBuffer, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<QString const&>(std::allocator<void>, QString const&) (this=0x55555cfa32e0, __a=...) at /usr/include/c++/12/bits/shared_ptr_base.h:604
#6  0x00005555558a3a18 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<lmms::SampleBuffer, std::allocator<void>, QString const&>(lmms::SampleBuffer*&, std::_Sp_alloc_shared_tag<std::allocator<void> >, QString const&) (this=0x7fffffffcc18, __p=@0x7fffffffcc10: 0x0, __a=...) at /usr/include/c++/12/bits/shared_ptr_base.h:971
        __guard = {_M_alloc = 0x7fffffffcb0f, _M_ptr = 0x55555cfa32e0}
        __mem = 0x55555cfa32e0
        __a2 = {<std::__new_allocator<std::_Sp_counted_ptr_inplace<lmms::SampleBuffer, std::allocator<void>, (__gnu_cxx::_Lock_policy)2> >> = {<No data fields>}, <No data fields>}
        __pi = 0x4
#7  0x00005555558a3496 in std::__shared_ptr<lmms::SampleBuffer, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<void>, QString const&>(std::_Sp_alloc_shared_tag<std::allocator<void> >, QString const&) (this=0x7fffffffcc10, __tag=...) at /usr/include/c++/12/bits/shared_ptr_base.h:1712
#8  0x00005555558a2da1 in std::shared_ptr<lmms::SampleBuffer>::shared_ptr<std::allocator<void>, QString const&>(std::_Sp_alloc_shared_tag<std::allocator<void> >, QString const&)
    (this=0x7fffffffcc10, __tag=...) at /usr/include/c++/12/bits/shared_ptr.h:464
#9  0x00005555558a27c9 in std::make_shared<lmms::SampleBuffer, QString const&>(QString const&) () at /usr/include/c++/12/bits/shared_ptr.h:1010
        __a = {<No data fields>}
#10 0x000055555596805b in lmms::gui::SampleLoader::createBufferFromFile(QString const&) (filePath=...) at /usr/local/src/lmms/src/gui/SampleLoader.cpp:97
#11 0x0000555555920bc9 in lmms::gui::FileBrowserTreeWidget::previewFileItem(lmms::gui::FileItem*) (this=0x55555ca0f410, file=0x55555cfa3be0)
    at /usr/local/src/lmms/src/gui/FileBrowser.cpp:720
        buffer = std::shared_ptr<const lmms::SampleBuffer> (use count 1448466032, weak count 21844) = {get() = 0x55555ca0f7f8}
        tf = 0x55555d38cf70
        previewLocker = {val = 93825114633305}
        newPPH = 0x0
        fileName = {d = 0x55555d38bb20}
        ext = {d = 0x55555cf9c620}
#12 0x00005555559209f5 in lmms::gui::FileBrowserTreeWidget::mousePressEvent(QMouseEvent*) (this=0x55555ca0f410, me=0x7fffffffd360) at /usr/local/src/lmms/src/gui/FileBrowser.cpp:693
        i = 0x55555cfa3be0
        f = 0x55555cfa3be0
#13 0x00007ffff79a4db8 in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ffff7a5048e in QFrame::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007ffff66b147b in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007ffff7962f9e in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007ffff796b552 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007ffff66b16f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007ffff796965e in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) ()
    at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007ffff79bdbd8 in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007ffff79c0f60 in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007ffff7962fae in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007ffff66b16f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007ffff6b3d3ed in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#25 0x00007ffff6b11cac in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#26 0x00007ffff22fbeca in  () at /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#27 0x00007ffff55d47a9 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#28 0x00007ffff55d4a38 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007ffff55d4acc in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
--Type <RET> for more, q to quit, c to continue without paging--

#30 0x00007ffff6709836 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#31 0x00007ffff66b017b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x00007ffff66b82d6 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#33 0x00005555557c985c in main(int, char**) (argc=1, argv=0x7fffffffe168) at /usr/local/src/lmms/src/core/main.cpp:1018
        coreOnly = false
        fullscreen = true
        exitAfterImport = false
        allowRoot = false
        renderLoop = false
        renderTracks = false
        fileToLoad = {d = 0x7ffff6797b20 <QArrayData::shared_null>}
        fileToImport = {d = 0x7ffff6797b20 <QArrayData::shared_null>}
        renderOut = {d = 0x7ffff6797b20 <QArrayData::shared_null>}
        profilerOutputFile = {d = 0x7ffff6797b20 <QArrayData::shared_null>}
        configFile = {d = 0x7ffff6797b20 <QArrayData::shared_null>}
        app = 0x55555643c580
        qs = {interpolation = lmms::AudioEngine::qualitySettings::Interpolation::SincFastest, oversampling = lmms::AudioEngine::qualitySettings::Oversampling::X2}
        os = {m_sampleRate = 44100, m_bitRateSettings = {m_bitRate = 160, m_isVariableBitRate = false}, m_bitDepth = lmms::OutputSettings::BitDepth::Depth16Bit, m_stereoMode = lmms::OutputSettings::StereoMode::JointStereo, m_compressionLevel = 0.625}
        eff = lmms::ProjectRenderer::ExportFileFormat::Wave
        pos = {d = 0x55555664c6b0}
        sparam = {sched_priority = 50}
        sa = {__sigaction_handler = {sa_handler = 0x1, sa_sigaction = 0x1}, sa_mask = {__val = {0, 0, 0, 0, 0, 18446744073709551608, 1, 140737488347496, 140737488347512, 93825007948368, 4160551332, 47, 93824997856416, 49, 18446744073709551448, 93825007948368}}, sa_flags = 4, sa_restorer = 0x7fffffffdc60}
        destroyEngine = false
        ret = 0

Both.

Are they some nasty carefully crafted files by vil hackers of some sort? ^^

I’ve had never experienced this bug so far (and I use LMMS for nearly twenty years now).

@PhysSong
Copy link
Member

@sakertooth I found several issues with the new decodeSampleOggVorbis function:

  • As this crash indicates, out-of-bound reads can happen on multi-channel files(including stereo):
    auto result = std::vector<sampleFrame>(numSamples / numChannels);
    for (int i = 0; i < buffer.size(); ++i)
    {
    if (numChannels == 1) { result[i] = {buffer[i], buffer[i]}; }
    else if (numChannels > 1) { result[i] = {buffer[i * numChannels], buffer[i * numChannels + 1]}; }
    }
  • The function doesn't check if totalSamplesRead is equal to or different from numSamples
  • The length passed to ov_read_float should be the remaining samples(frames * channel count)
  • ov_fopen has issues with filenames which aren't supported in local narrow character encodings(that's one of the reason we used ov_open_callbacks before)

@sakertooth
Copy link
Contributor

@PhysSong thanks for letting me know. I do have a fix ready for this soon.

@musikBear
Copy link

What do you think..
Is this some odd FLs way to protect their samples, and if so -Are we even allowed to circumference that 'protection' ?
Does anyone know what license they have for their samples?

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

Successfully merging a pull request may close this issue.

6 participants