[bug] Illegal operation, array resizing, but I'm not...
-
I have a simple script that puts notes in an array as they are played and removes them as they are released.
The array is declared in
on init
and reserved with 4 elements.So I hit compile, I play 4 notes, they are added to the array, I release the keys and they are removed from the array, everything is happy. Then I play 4 notes again and I get the illegal operation error, but 3 notes doesn't cause an issue... any ideas?
HiseSnippet 729.3ocsUstaSCCE1tqYhDtHlDO.g+L0JMU0BkAREDi0KnJnaUzwDRHzjmiaqUcribbFTg3ofWTdCfiSxVZWm1kJQ9QTN2+7wemSFpUTVbrRivtGMOhgvOvYzboYZ6oDtD0uCB+HmAjXCS6moZ+4Qj3XV.Bi238VEX2xnzm+718IBhjxJTgPGq3T1G4gbSg1g68AtPziDvNhGtf2M2qOUIaqDpD.Oa3TGEQnyHSXGPrtUxAg2ra.2nziLDCKF7YeUv7QSUeWl4+w7X9oBlUnAZDjnL0n1S4hfgmeViQHb4gEm7MxN4OwY.Ofeg9hNviSM3WDwh8.boqCRMtCPBu.jJmAosbFQ07HSgEKdtuSeIbgLl.s5EgRlunR+F6zVAdHM0BIyX8zfvEQTY2502wGdUskmmlMwWp.b6+F+u9sVdoeWSyhY5yXUZVs03DI0vURek7.v1gxJU89omqPQIBeID0..VvMTsILi0gCRBOkoqXysKerekmlkQ3Z0.cy3Jxp9aucVIqIXxIlo9u1uYUOW2LcQIwSAmZ48KO+KW6wiu0E2Mq5qT7hBoYgJ3HtZorcNsRHrIxVsKY1xXuZK4AVQlhhc7OiHRXW3HbktLOYyaGOglcQtfiJYeI2bXDKWtmRDXu+seuJqBkyDfu9b+NDCwRzx0A9EwzFtEN3NryfI0LZmqSGV7LiJBlUWgSBSCpfDAwr7HhcWPtAnerDuzx8jwby7E2UbGlapesyM2VHtkyPtgN8pwXoq.iPm5+AFy217PmtiGynlB.V1o2WV2UK2P4+jJwvkSFPLZ9OPXGXRYDrjkxfpKkLAjbGbIKaISttU11AFwjAoB+EdxM1vJiyM13binPBUqNglMEX2mcuTM.ljoqucg+i.x9MPoSFK1mCg0qmP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xVQ+iHeI0j
works perfectly here...
HiseSnippet 763.3ocsUttaSCCEG2tsAQBWDShGfvWlRkFUsvXfTAwX8BpB5VEcLgDBM4431ZMG6HGmAUHdM44f2.33jtk1stoREjOT0yMme4j+mSFnUTVRhRivtGNMlgv20Y3ToYRqIDtD0qMBeem9jDCS6m6ZuowjjDVHBiK+VqCraET10ud8dDAQRYEtPniTbJ687Htov6fceGWH5RBYGxilK6s2sGUIaoDpTfmxN0QwD5ojwr8I1zJ4fv2pSH2nzCMDCKAgqrmJb5vIpuJyy+HdB+DAyZz.MDNnb2cUhPKwVunVS3hvAm+bmffSYPQWnbdW3gN84g7K7WzMdPV.+hJluefKsHdkW.uFWGdKAI7bHUIGoMbFR07XSQDKO2womDd4Lh.s84QIOWToehcZofLjlZQjSYc0fwEUDrS85a4C+TsommlM1Wp.t8ek+m+RSur+WSyRX5yXAaWs4nTI0vURekbeH1Axfpde2yUnnDguDppOfE71p1Xlwlv9oQmvzA1y1kOxO3Q4mH7J1.cyj.YU+M2L+VVSvjiMS7eo+1U8bcy8EmlLARpomqmK7LjnDrZwZtzDXzV3yxpJD+Gd9WlsQiVY3byo6JvU.hlEofVPFJt+kzXa9ZkPXuWVftTX6.vxiLqv.YFna4eFQjxtHQPUrnTyY0jZzbsvbIpj8jbyAwL40MeflIff+8wdsIFhUeNyGjWLSa3VDvsYmAC64pUWm1rjSMpXXb+JRYXHRElJHlEmrrqSlE.5AKHmsRVYB2Lc90MWdbqx02CpuxaCVUb2vY.2PmrbdKsDdgt1+adms75dNcFMhQMEvVwo6mtwMU+aP4CpTCWNtOwn4eCzjvP1PXWNkAjHkLgUmhKYUT410s11NyPlLLy32v0rfMr13YAabdPTDgpUGSymNrqJuclGfIY1WIbgOWA19MPYSLPcN0qUGEAasOlRsshGCru7ZdxZTySWiZ1dMp4YqQM6rF0770nlWbi0X+f4aRMpn7wDvwfNYqQv3NRBnxxTjn+.ThsUeC
-
@Lindon Just to confirm, you hold down 1 or more notes and no error. Then you hold down 4 notes and no error? Do you have the audio thread guard enabled?
-
@d-healey Can confirm. Whatever reservation I make, always after the remove method knocks it down below 4, another push call triggers the ATG.
using
notes.insert(notes.length, n);
instead of push in your on note callback bypasses the issue, but the bug still remains -
@aaronventure Ah thanks for the workaround, and confirming the issue
-
@d-healey said in [bug] Illegal operation, array resizing, but I'm not...:
@Lindon Do you have the audio thread guard enabled?
I probably dont - given I have no idea how to do that... -
@Lindon HISE Preferences checkbox
-
@d-healey said in [bug] Illegal operation, array resizing, but I'm not...:
@Lindon HISE Preferences checkbox
Hmm, well it seems I have that turned on.....so that aint it.
-
@Lindon Are you using the latest develop branch?
-
@d-healey said in [bug] Illegal operation, array resizing, but I'm not...:
@Lindon Are you using the latest develop branch?
Im sure I'm not - Im in the middle of a big build....so no updates for me...
-
@d-healey I think the ATG needs to be enabled in the Projucer, no?
-
@aaronventure You might be right, but in that case it must be default because I haven't changed it on my system.