Perl 6 - the future is here, just unevenly distributed

IRC log for #openframeworks, 2015-04-22

| Channels | #openframeworks index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:10 alski joined #openframeworks
01:54 ar_tama joined #openframeworks
01:55 ar_tama_ joined #openframeworks
02:29 austinslominski joined #openframeworks
02:34 pizthewiz joined #openframeworks
03:09 notjosh joined #openframeworks
03:23 alski I have a vector being initialized in one of my classes headers, and I can't seem to get around it giving me a bad access error...
03:24 alski All I am doing is initializing it in the header... its just vector<float> zOffset;
03:44 pizthewiz joined #openframeworks
03:52 pizthewiz joined #openframeworks
04:39 alski joined #openframeworks
04:52 notjosh joined #openframeworks
05:23 alski Is there any reason why a vector can't be initialized? All I have added is vector<float> zOffset; and it gives me a bad access error, the stack trace brings me to something going on in ofNode.
05:35 jedahan joined #openframeworks
06:16 ofarturo joined #openframeworks
06:24 ar_tama joined #openframeworks
07:58 ar_tama joined #openframeworks
08:00 ar_tama joined #openframeworks
08:16 notjosh joined #openframeworks
08:23 notjosh joined #openframeworks
08:35 ar_tama_ joined #openframeworks
08:36 notjosh joined #openframeworks
09:13 MyMind joined #openframeworks
09:17 mh_ joined #openframeworks
09:29 MyMind joined #openframeworks
09:32 ar_tama joined #openframeworks
09:40 mh_ joined #openframeworks
09:53 mh_ joined #openframeworks
10:58 notjosh joined #openframeworks
11:27 mh_ joined #openframeworks
11:43 Pisuke joined #openframeworks
11:47 mh_ joined #openframeworks
12:29 jvcleave joined #openframeworks
13:35 tpltnt joined #openframeworks
13:35 tpltnt hello oF people
13:40 ar_tama joined #openframeworks
13:45 jedahan joined #openframeworks
14:31 ar_tama joined #openframeworks
15:03 notjosh joined #openframeworks
15:19 alski joined #openframeworks
15:33 mh_ joined #openframeworks
16:36 wjf joined #openframeworks
16:39 Pisuke joined #openframeworks
16:42 pizthewiz joined #openframeworks
16:55 Pisuke joined #openframeworks
16:58 mh_ joined #openframeworks
17:47 wjf joined #openframeworks
17:48 wjf joined #openframeworks
18:38 walter joined #openframeworks
18:39 walter hey there, question: how do I go about setting the extrinsic matrix of the OF camera? or do I do that directly to openGL?
18:41 mh_ joined #openframeworks
19:05 wjf joined #openframeworks
19:13 _mh joined #openframeworks
19:21 wjf joined #openframeworks
19:26 alski joined #openframeworks
19:37 mh_ joined #openframeworks
19:58 wjf joined #openframeworks
20:05 mh_ joined #openframeworks
20:17 marcocanc joined #openframeworks
20:41 admsyn joined #openframeworks
21:33 pizthewiz joined #openframeworks
21:57 walter joined #openframeworks
22:20 alski joined #openframeworks
22:21 alski Does anyone know why I might get a bad access error by simply declaring a vector in my header?
22:21 admsyn nope, shouldn't
22:22 admsyn how are you using it? what line is actually throwing the error?
22:23 alski I am declaring it in a separate class. It's just vector<float> offsetZ; (trying to get the offset you brought up yeseterday to work). The stack trace just points me at of3DPrimitive (which my class extends), and then to ofNode.
22:24 admsyn I'd guess at some point it's being used in a way that's weird, and you get a crash at some later point
22:24 admsyn how are you using your vector?
22:25 admsyn err sorry that explanation didn't make any sense :)
22:26 admsyn sometimes if you write to memory in weird ways, you can trample on memory that's being used for something else
22:26 alski The thing is that I am not even using it yet. I've commented out any reference to it in my .cpp, it's just the declaration... really strange to me.
22:26 admsyn so if you (for example) write to myVector[5], but the vector doesn't have 5 elements, you might write over some bit of memory that's crucial for some other part of your program
22:27 alski Right. Do you think there is somehow something in ofNode or of3dPrimitive somehow conflicting with vectors?
22:28 admsyn no it wouldn't be quite that simple
22:28 admsyn I mean it's technically possible I suppose but I doubt it
22:29 admsyn more likely you're doing something odd with something in your class, and it's trampling over the "ofNode" part of said class
22:29 admsyn it's hard to be more specific than "something is wrong" :)
22:29 admsyn without seeing the code in play
22:30 alski (I don't know why it's always problems like this that I get caught up on) Any chance I could post a pastebin link?
22:31 admsyn yepp go for it
22:31 alski Thanks a ton admsyn
22:31 admsyn it'd be best if it was the smallest amount of code that's necessary to trigger the crash
22:33 wjf joined #openframeworks
22:33 tapout joined #openframeworks
22:34 tapout joined #openframeworks
22:34 wjf joined #openframeworks
22:34 tapout joined #openframeworks
22:35 Pando joined #openframeworks
22:35 tapout joined #openframeworks
22:36 tapout joined #openframeworks
22:36 alski I'm whittling it down right now (might even just come to the root of the problem in the process... I need to remember to start stripping it down when it breaks)
22:36 tapout joined #openframeworks
22:37 admsyn yeah with this sort of thing it's always handy to try and isolate it to the smallest possible reproduction, since the place where it crashes probably isn't the actual issue
22:37 tapout joined #openframeworks
22:38 admsyn don't worry about whittling it too much at the moment, I've got to head out in 10 mins or so
22:43 alski Damn, sorry, I at least isolated the line. helixTest = sin(f*amp) (helixTest is a float) seems to be conflicting somehow
22:44 admsyn I can't imagine that's the issue though..
22:48 alski http://pastebin.com/3RkAeGTe
22:48 alski I add or remove some totally unrelated declarations in the header and it works/breaks
22:50 admsyn one thing that's probably not working as you expect is that your helixTest assignment is using two uninitialized variables
22:51 admsyn but that shouldn't actually break anything, unless sin() is being weird about getting (presumably) giant float values
22:51 admsyn there's not really anything going on in there to look at :)
22:51 admsyn assuming there's also an ofApp in play I'd imagine the issue's there somewhere
22:53 admsyn what does the ofApp look like?
22:54 alski http://pastebin.com/pmeSfzxV
22:55 alski oscThread is within in a multidimensional vector (vector< vector<oscThread> > braid;), which maybe there is something strange with the memory being allocated in that way?
22:58 admsyn it looks like you're fine at a glance, but subjectively I always find multidimensional arrays / vectors kind of gross
22:59 admsyn do you have to do anything to trigger the crash or does it happen immediately in setup() ?
23:00 alski in keyPressed(), where I call oscThread setup(). Otherwise it works fine
23:01 admsyn alright, is setup() actually empty like in your pastebin?
23:02 alski Not typically, but I brought it down to the point where it would break.
23:03 admsyn so it breaks on tempBraid.back().setup(); even if setup() is empty?
23:05 alski sorry, not just setup(), It's the tempBraid.push_back(oscThr​ead(tempOrigin,mesh));...
23:07 admsyn ok, even if the oscThread constructor looks like it does in the pastebin?
23:07 admsyn I'd guess that something weird's going on with the mesh, but using 'f' and 'amp' before they're initialized could be doing something weird too I suppose
23:09 alski Ok. This has been helpful in even just reminding me of debugging techniques. I'll keeping breaking things down.
23:09 admsyn alright then, good luck :)
23:10 alski Thanks again admsyn, helpful as always.

| Channels | #openframeworks index | Today | | Search | Google Search | Plain-Text | summary