run scratchOSC / Arduino

29 views
Skip to first unread message

leeM

unread,
Feb 4, 2012, 8:59:46 PM2/4/12
to ScratchML
So I'm trying to run scratchOSC / Arduino and scratchOSC is super
great but when I add the Arduino it runs the faderPosition line off
the screen. Then crashes giving me a bad access at
drawCurve(faderPosition, 128, 0, 255);
So I looked at Serial monitor in the Arduino tools menu and if it is
set to 115200 It puts out gibberish and crashes Arduino software. If
the serial monitor is set to 9600 it puts out "y" and if I move the
fader on it perforate's the "y" with a "u". I remember this happening
but I don't remember how it was solved. I opened the mixer pulled out
the fader and everything looks sturdy enough. I change the
settings.xml tty. Any suggestions. Different subject when I downloaded
ofxXwax the ofxOsc is missing in the app-ScratchOSC. Still riding high
on everybody's great work.
thanks

Kyle McDonald

unread,
Feb 4, 2012, 9:08:33 PM2/4/12
to scra...@googlegroups.com
can you dig a little deeper into the stack trace?

where inside drawCurve() is it crashing?

the gibberish in the serial monitor is to be expected. 115200 is the
correct rate. don't try and run the serial monitor, it will definitely
always overflow the window and crash the app.

regarding ofxOsc, you might have to add it again. i did something
weird when i initially compiled the project in order to support
multicast, so it might be confused on your end.

kyle

leeM

unread,
Feb 4, 2012, 11:20:41 PM2/4/12
to ScratchML
I'm sure this will help. Debugger Output repeats "warning: Could not
find object file…." Tell me if I sent enough.

by Thread
Thread 1

stl_algobase.h
line 283 *__result = *__first;
thread 1: Program received signal: "EXC_BAD_ACCESS*.

1 std::deque<float, std::allocator<float> >:: deque(std::deque<float,
std::allocator<float> > const&)
ofApp.app
line 239 if(serialReady)

2 ofApp::draw()
line 79 drawCurve(faderPosition, 128, 0, 255);
thread 1: Program received signal: "EXC_BAD_ACCESS*.

3 ofNotifyEvent [inlined]
No Editor

4 ofNotifyDraw()
No Editor

5 ofAppGlutWindow::dispay()
No Editor

6-[GLUTView drawrect:]
line 27 0x3e00476a <+0106> andl $0xfffffff7,0x144(%esi)
thread 1: Program received signal: "EXC_BAD_ACCESS*.

11 glutMainLoop
line 53 0x3e00476a <+0106> andl $0xfffffff7,0x144(%esi)

12 ofRunApp(ofBaseApp*)

13 _ZN15ofAppGlutWindowD2Ev [inlined]
No Editor

14 main

Debugger Output
OF: OF_LOG_ERROR: ofSerial: trouble reading from port, errno 9 (Bad
file descriptor) sharedlibrary apply-load-rules all Warning: the
current language does not match this frame. warning: Could not find
object file "/Developer/usr/lib/gcc/i686-apple-darwin10/4.0.1/
libgcc.a(_eprintf.o)" - no debug information available for "/var/tmp/
gcc_40/gcc_40-5494~211/src/gcc/libgcc2.c".

warning: Could not find object file "/Users/theo/Documents/CODE/
__OPENFRAMEWORKS/gitOF/openFrameworks/apps/devApps/macDragDropExample/
buildGlutFrameworkHackedWindowLevel10.4/
libForeground.a(macx_foreground.o)" - no debug information available
for "/Users/mcast/Code/GLUT-ToPost/macx_foreground.m".

warning: .o file "/Developer/usr/bin/../lib/gcc/i686-apple-
darwin10/4.2.1/crt3.o" more recent than executable timestamp in "/
Library/Frameworks/Jackmp.framework/Versions/A/Jackmp"
warning: Could not open OSO file /Developer/usr/bin/../lib/gcc/i686-
apple-darwin10/4.2.1/crt3.o to scan for pubtypes for objfile /Library/
Frameworks/Jackmp.framework/Versions/A/Jackmp warning: Could not find
object file "/Volumes/Document1/Developpement/ProjectsCVS/JackCVS/
jack2-svn/trunk/jackmp/macosx/build/Jackdmp.build/Deployment/
Jackmp.framework 64 bits.build/Objects-normal/i386/
JackMacLibClientRPC.o" - no debug information available for "/Volumes/
Document1/Developpement/ProjectsCVS/JackCVS/jack2-svn/trunk/jackmp/
macosx/JackMacLibClientRPC.cpp".

warning: Could not find object file "/Volumes/Document1/Developpement/
ProjectsCVS/JackCVS/jack2-svn/trunk/jackmp/macosx/build/Jackdmp.build/
Deployment/Jackmp.framework 64 bits.build/Objects-normal/i386/
JackRPCEngineUser.o" - no debug information available for "/Volumes/
Document1/Developpement/ProjectsCVS/JackCVS/jack2-svn/trunk/jackmp/
macosx/RPC/JackRPCEngineUser.c".

Lee

Kyle McDonald

unread,
Feb 4, 2012, 11:49:59 PM2/4/12
to scra...@googlegroups.com
ahaaa, there was a bug in my code that i never had a chance to test:

faderPosition.push_back(faderData);
if(relativePosition.size() > maxData) {
relativePosition.pop_front();
}

that should be:

faderPosition.push_back(faderData);
if(faderPosition.size() > maxData) {
faderPosition.pop_front();
}

i just pushed the change, and uploaded an updated binary:

https://github.com/downloads/scratchml/ofxXwax/ScratchOSC-osx.zip

leeM

unread,
Feb 5, 2012, 8:39:13 AM2/5/12
to ScratchML
It works great. :(=)
I will get a washer and see if I can improve the action when flair /
craping.
leelee
Reply all
Reply to author
Forward
0 new messages