Closed theod closed 8 years ago
@lossius could you make an integration test for it while I fix it ?
sorry for the noise... I think this trouble was due to a bad build of JamomaCore or bad copy of the result of this build ... I don't know but there no trouble at all !
It still crashs on my computer with a fresh clean build (Jamoma v1.0-beta.1 | build 189e647)
oh ! so I was not dreaming ... could someone else (@lossius, @jln-, @bltzr or @matcham) can test this before I reopen the issue ?
It crashes most often as well on a build from monday morning. It doesnt necessarily crashes on the first bang sent to parameter though. Sometimes it crashes on the second bang sent or more if I send a bang to parameter of type decimal in the mean time (akthough I cannot reproduce exactly)
I set up a metro banging the two objects every 50 ms, and after a few minutes I got the following crash:
https://gist.github.com/lossius/3ccf52f7c9defc146913
Does this look similar to what you have seen? As usual it is useful that reports on crashes are accompanied by crash logs.
I confirm it crash here as well after sending a couple of bangs to a j.parameter test @type integer
Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000012ed53f8
VM Regions Near 0x12ed53f8:
CG image 0000000012ed3000-0000000012ed4000 [ 4K] rw-/rwx SM=COW
-->
CG backing stores 0000000013064000-00000000131f5000 [ 1604K] rw-/rw- SM=SHM
Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
0 libJamomaModular.6.dylib 0x0b9e1fb9 TTDataInfo::getIsNumerical(TTDataType) + 25
1 libJamomaModular.6.dylib 0x0b9e1f1d TTElement::truncate() + 29
2 libJamomaModular.6.dylib 0x0b9e47ed TTData::IntegerDecimalArrayCommand(TTValue const&, TTValue&) + 3949
3 libJamomaModular.6.dylib 0x0b9e7199 TTData::Command(TTValue const&, TTValue&) + 777
4 libJamomaFoundation.6.dylib 0x0be3098b TTObjectBase::sendMessage(TTSymbol, TTValue const&, TTValue&) + 491 (TTObjectBase.cpp:477)
5 libJamomaFoundation.6.dylib 0x0be2df75 TTObject::send(TTSymbol, TTValue const&, TTValue&) + 85 (TTObject.cpp:151)
6 libJamomaMax.6.dylib 0x0b9208ce jamoma_datacommand(TTObject&, symbol, long, atom const_) + 206 (JamomaModularForMax.cpp:415)
7 org.jamoma.j.parameter 0x10034495 datalist(void, symbol, long, atom) + 85 (j.parameter.cpp:335)
8 org.jamoma.j.parameter 0x10034334 databang(void) + 68 (j.parameter.cpp:309)
9 com.cycling74.Max 0x001532a9 outlet_bang + 1045
10 com.cycling74.button 0x0f54bedc jbuttonmousedown + 63
11 com.cycling74.Max 0x00221154 BoxComponent::sendMouseMessage(juce::MouseEvent const&, symbol) + 202
12 com.cycling74.Max 0x00221ba4 BoxComponent::mouseDown(juce::MouseEvent const&) + 1248
13 com.cycling74.Max 0x004991d9 juce::Component::internalMouseDown(juce::MouseInputSource&, juce::Point
truncate() is only called when type is integer, so this probably only happens with integers.
My guess is that either we have memory corruption, or there's something flacky in Foundation with truncation(). That's where I'd start out searching for the problem.
Unfortunately I'm still struggling with how to set up Xcode projects in such a way that we can run the debugger.
yes I had the same crash too. about Xcode I used to make an external build system projects for each Makefiles generated by Cmake (into the build folder) depending on what I need to fix. Then I wrote my own post build script action to copy stuff around after the build. Here is a example of script for Core project relative to my computer :
cd /Users/WALL-E/Documents/Developpements/_Build/Jamoma/Max/JamomaCore make install
cp -f /usr/local/jamoma/lib/libJamomaAudioGraph.6.dylib /usr/local/jamoma/JamomaMax/Jamoma/support cp -f /usr/local/jamoma/lib/libJamomaDSP.6.dylib /usr/local/jamoma/JamomaMax/Jamoma/support cp -f /usr/local/jamoma/lib/libJamomaFoundation.6.dylib /usr/local/jamoma/JamomaMax/Jamoma/support cp -f /usr/local/jamoma/lib/libJamomaGraph.6.dylib /usr/local/jamoma/JamomaMax/Jamoma/support cp -f /usr/local/jamoma/lib/libJamomaModular.6.dylib /usr/local/jamoma/JamomaMax/Jamoma/support cp -f /usr/local/jamoma/lib/libJamomaScore.6.dylib /usr/local/jamoma/JamomaMax/Jamoma/support
cp -f "/usr/local/jamoma/extensions/*" /usr/local/jamoma/JamomaMax/Jamoma/support
cp -Rf /usr/local/jamoma/JamomaMax/Jamoma/support /Users/WALL-E/Documents/Developpements/Jamoma/Max/Jamoma
I think I know what is going wrong in the code of IntegerDecimalArrayCommand :
if (aValue.size())
// Cast to int if
if (!checkIntegerType(aValue))
aValue = (TTInt32)aValue[0];
aValue[0].truncate();
here there is a lack of {} under the "if (aValue.size())" so the last line can be done even if the value is empty.
it seems to be fixed ! does anyone can test it before I close the issue ?
it works on my machine !!
cheers,
renaud
Le 27 oct. 2015 à 15:42, theod notifications@github.com a écrit :
it seems to be fixed ! does anyone can test it before I close the issue ?
— Reply to this email directly or view it on GitHub https://github.com/jamoma/JamomaMax/issues/933#issuecomment-151523793.
thanks Renaud !
here is the patch to reproduce the crash :