Hey everyone. Hello, I'm Dalai Filinto and yesterday I recorded a live stream with Pablo Basque is about Diving into blender code and asking some and answering some questions online So today decided to try something a bit different, which is basically trying to fix a bug not live I'm recording this but if that goes well, maybe we can even try something live next time and Let's go to it. So the bug Unlike I'd like to address is this a stereoscopic related So I was going over the tracker today trying to see if there was any high priority bug And since I was the main developer to implement a stereoscopic in Blender This is the one I could probably help So if you want to see the bug You can see it here basically When you open a file if the Aspect ratio of the the camera setting is not the same as the video you have in the sequencer when rendering The right eye is all over the place And if you change this has already asked the correct correct aspect ratio If you change it and then bingo, it's correct We shouldn't be super hard to figure out because for one of the ideas are I correct? Well, I guess let's see how it goes So the first step whenever I want to fix a bug like this I'd really need to make sure you have a really nice test file Which this one is nice enough is the one Well, kind of the one sent in the bug report But I think be more convenient if I could just open Blender and Have it right here there go. I read with the right image and just play safe. Let's show here the left image So if I just go here and render Man, I already see that the problem there and I could even if you lock interface make sure it doesn't pop up That's fine. Leave it popping up. I don't care. The other thing is to save the file as my startup But if I just go about in saving it and save it next time open Blender the video Might not be there because This is this was using relative file paths So as you see and then I should have so I should have converted to To to absolute and so just need the folder here So what I what I actually do There I go here Usually go here go to external data make all paths absolute and then I go and make a default startup file Okay bank It's right here. The other thing I have you change it here is the splash screen So doesn't come on my face doesn't pop up in my face every time So if I just open Blender and render, I can see whether or not to fix the problem Okay, so now how to go about this problem in particular. I know the area in question, which is the Which is a video sequencer So I know some of the part of the code because I had to do this region originally when was implemented is for For 2.7. That's the thing like this doesn't happen in 2.7. So if you go to 2.7 4 7 5 7 9 it works fine So it's a good to know that the walls work at some point. So honestly, what I'm gonna do I'm gonna about just gonna chase down these resolution settings and see I Don't know. Let's let's improvise so percentage scale for rendering render resolution So let's try to find this percentage Scale oops was So two tip, right? Yeah And that is I think there that's okay size. I think it's hard point size if I'm not mistaken Blah blah blah, but let's Now pretend there's no camera here, and I'm not talking to everyone so I can actually focus on Approach the way you would it is the NLA is not the sequencer Sequencer effect So for instance, this is the this being used for one of the sequencer settings Try to think what can be the problem actually Render size Why why would it why would it read correctly the first pass another second one? Have no idea I have no idea so preview render size something else and Unlikely like a real live stream or something this might be very an interesting But as is as a video can also just go ahead and just came over it. I don't think sparks related Why you did not I Mean tricked actually So first let's try to see if kind of don't really remember the I don't think it goes here I don't really remember the entire Path of the of the sequencer editor So I don't remember What's actually been called? So let's just add a Breakpoint to this function because I think this function is related Should be every time we create the in both in both as the image buffer Blender has We should increase this a little bit. Yep. What's up, and I think Could put some music right? That's gonna be very quiet video and again just render and It's wrong and that's okay, but the other thing is that they didn't call my Breaking point. So I'm just gonna add the other scene here. Oh, it's already calling the breaking point Okay, okay, okay Yeah, here probably call it now Right have a feeling that The issue might be related to to to caching So this already have a good idea of where the functions been called from So if you just go back to as you can see here Anyways, it's easier to do it this way. So First things first, so let's go here Let's do it differently let's add a Breakpoint here So continue here. Oops. Let's add a break point here and delete the first break point and continue I think I have other instances of Landrel. Let me just close so I don't get Confused now that's the one that's valid That's the one no one cares about. Yep so Gonna delete again the scene This probably gonna trigger the The code did it twice again Did it once and did it twice? Did it three times four times? Oh The thing is we kind of read everything even when Honestly, if I hide here Should be fine Now it's simpler because if I change the frame doesn't trigger that function. Let me save the The default again and now if I render That's entry. Oh, I was wondering like why it's not didn't stop. It did stop Just let me see how many times it stopped. So once and Twice Which we assume is once for each I if I render again, does it cache anything? Hope not So once and twice Just to play to play extra safe Now forget to No Get out I Will turn off the the the the multi bill Just to be complete completely sure that issue is Has been called twice because of the multi bill Bang disabled Just render again Call it once And that's it Of course since multi bills disabled, you're gonna see the image as it was originally at the input Which is a top-bottom image. The problem is not I think I know where the problem is The problem has to be in reading the the video file So the first one is fine. Don't even want to to investigate further. Now. Let's go down here In booths you can sort get cash.  Oh Actually, it's not empty And again, but now I'll try different route now because this is all fine, blah, blah, blah But I think I really think the problem is when reading the image format, and I know I have in Glendor And a few different parts in the code Different code to the only different image format depending on the on the input. So is it top-bottom? So let's actually go for the look at the code that actually uses this top-bottom. I think a Product is probably like this Nope Yeah, so that's the file for sure the stereo in both and I really think that part of the problem Why is this code even different? Okay, read the dimensions right to the main it seems to be in the read the dimensions and I want to Breaking let's add here to make it simpler Here I want this function, which is just And I want I want in this case to show the with a size T Let me try if with it You just put a breakpoint here, but Sure, let's just put a breakpoint there now it has no problems reading the The image dimension so it shouldn't be here the problem. Let's just play safe playing safe So now I want to actually add a breakpoint here and I want to delete the second breakpoint so if I continue That seems to be about right Is it though? It should be of course and let's Just to be safe just do it again Yeah, it's totally right And this should be right so the problem is not here, so this is correct Let's let's read this Think here steer 3d. I find the Gdb is so primitive sometimes X 24 1440 if I do it again, so that's for the second one I like to use more like strange numbers when I'm doing those things. Let's do again Actually here should be We are using the same right weeded and high And of course Because this is the same above to both of them, but does it mean that we're running? Very quiet video. Yeah, let's honestly Let's look at some code here Cut the problem is either on reading the e-mail the the video or I'm showing it This video is not the best video to be honest. That would work better If I had like a very clear Maybe I should do that like a very clear Color that I could tell apart the top and bottom so I could see in different ways You know, I just want to add a bunch of printing statements I find it is easier than So this technique of bug fixing I call it just chasing the the rabbit hole Kind of go try to apply some intuition to the whole thing, but honestly it's really Just you read just just Try to follow the leads and see where the where do they get where do they get us Yeah, because this is happening for both of them. So it doesn't make sense for this one to be wrong Otherwise the other one would be wrong as well So I really think oh I'm thinking consider to go back to the Render size. Oh boy the cables of bug fixing. That's a sequence draw I don't think actually I tried to I don't think I tried to save the image to be honest Let's open a new blender just to leave the other one as it was just have it here So if I try to save the image Let's put here to create a new folder for us Statter 3d save it as Individuals perfect Tony she can just Thumbnails. Yeah, it's definitely wrong. Are they the same size even they must be Let's find the most convoluted convoluted way to to check this out. Yeah, they have the same size Actually, if I had a distinct very distinct color for both of them, I probably wouldn't even be able to tell the Problem like what's happening? So is it it when reading So what does blender do? Should be the scaling right when you're what happens in this sequencer when the input has a different size Then the output think that's the actually the question you have asked 20 minutes ago, let's close this so you don't get confused. Thank you So Delete every single breakpoint here for each wheel Calculate stuff I'm always suspect of anything that only runs for Ace actually, I think this is running for both views, but is it though? It's not check this out Let's do a break point here. Yeah, just Not even stop in my breakpoint, but still let's go there. We are on sequencer Okay Cops check this out if for if here we're if you're running this for every single fell yet for this one here we're doing only for The current will this actually should be fine Cut it if it should be fine. It is multiple. It is multiple Render move strip open mission file is multiple system over files You know, we keep going back and forth. I still think the issue is probably It's probably related to the it's definitely related to the scaling of course, but we had the same problem I didn't show here, but even if the width and height is different without playing with the percentage of the render We have the problem that sometimes even on the first one on the on the left image Which little lets me to think let me to think that problems in the scaling as if it's only scaling Sometimes not always Let's dive again This doesn't matter I still have a feeling that this might be my might have to do this. So let's just Change this number to anything really and then Problem I've compiled here looks cooler Yeah, I just Want this fine Let's just just move and I think Hopefully and I'm not that that Hopefully that enough to break both eyes equally and then you know that the problem is that we're doing something only for one of the eyes And not for both of them It's still let's finish. That's how this is the I'm gonna close the Skill okay, it's fascinating right because if it didn't break anything Then what's the point of this line even anyways, let's Let's continue and I will go back to to look at how the Let's make it bigger. Did it be here? Did it be here? I think here probably probably sequence edit. It is not been called This is not being called So I think it's somewhere here on on the edit file Good the code you're looking at is actually commented out. So it doesn't exist So it's definitely not in sequence edit Sickness draw shouldn't really be Given that the file implies your only handling of drawing But go figure. Let's see what this doing sequence drop. Sorry. Oh I didn't copy. I did copy Jesus Christ All this commented out cold should just be removed once and for all does that happen for different That's a pretty good question. Does it happen for different image types? So if instead of being top-bottom if it's a For instance and a glyph, right? Does see how interesting how different so this is assuming Anyways Huh, I like it Which means oh, this is the The file the value changed exactly here Jesus This is good That's not specific to the top-bottom is I have a feeling that you're looping We are setting some value values for the first loop and to handle Starscop your chains and I think maybe we're changing some value inside the loop and not setting back to the original value I don't know. I'm not back to grasp me at stress here. I Don't want to go to 2.7. The code is changed too much to be relevant But one thing we can do is for instance Now what we can do actually that would help us tremendously So if right now They'll work. How can I try so basically if I was to call blender and This is where build my blender Because right now I'm visually checking the issue and we want to To render render frame one. I don't care Now you see It's a Let's open. That's open. Let's open This correct and this should be wrong Yes So which means I don't even need to open blender to to run into the issue Of course whenever I want to try if the if it's fixed I definitely want to do that But it means I can actually more easily Oops, looks like I'm gonna quit easier Clear my GDP Gdb's this is a bit of my own Is in and shortcut so Not that reproducible So we were 30 minutes in We didn't do a lot of progress but What can you do so So what I was curious about is This function here if it's getting the values correctly So my computer is being a bit slow, but that's okay.  That's fair. It's a pointing. I just triple check the SC Taking my arguments Let's be a bit more radical. Remember we were here I think there must be something wrong with my My comments Let's try here. Does that work? I think you need to do Gdb dash dash Let's kill this Has to be Gdb dash dash Arguments something like that. I can find this out on my illness Yeah, that's arch Gdb. There we go. So Gdb dash arch blender background That should do That's why at some point you might want to set up your gas code to handle the bugging from within it. I Just never bothered I'm not doing a lot of coding nowadays either. I do every now and then like become two become three We need to address a high priority bug so Those occasions. I definitely try to help But end up spending most of my time helping to make sure everyone's Working correctly. I Really suspect this function is not working well And Okay, it's something is not working here It's heartbreaking. I know it's breaking some point before So No problem.  No, well, I can still don't close. Oh, damn it. I can still The bug it let's try both ways while it's loading there consider the bug it and Just don't do it automatically via command line because so much more convenient when it can just run the whole thing from command line so you see Anyways function. I want to see This is a well, okay. I want to see the x one thing interesting to get here is the current view which we have Think we have on on Here, so maybe can we can let's move it a bit down here. Okay, and the view ID Equal, okay, that sounds about right I'm gonna do two things I want to build this one I can try to To the bug this Really miss miss music. I've been Not at now that I'm working from home like every single day Wow. Oh my god. That's why so the other thing was correct It wasn't stopping that point of just because it wasn't being called But this is probably only called when drawing so indeed Huh So indeed the debugging thing was correct and just to be triple sure did you build here? Okay, did finish building right? Yeah, I did So if I do this from No, no, but should be called so never mind what I said So like is that is that function ever called? Why do we even use it is to most? I have a suspicion which soon the one one help us here Because here Since I decided to disable That's gonna be exactly that Since I changed the sequencer to not draw here, there you go That's why this function has been called not been called in one from command line So we still have the same problem. Where is the where is this being called? Not proxy. Don't care about proxy. It's same input preprocess Oh My boy, what is this function even? Who calls you? Yeah, I think I'll be fast to try using to deploy the bugger My computer at work is a bit faster. That's a better knowing To wait that long for the debugging section to start is really Not cool makes me want to Look at the cold while waiting. So kind of so this is this render strip. I don't even have a stacked amongst Some people actually love to that helps actually to like keep an old ton of only cold flow You can probably do here. So you have like an idea of how things are going, blah, blah, blah, let's It does help to keep notes sometimes in paper or in the computer doesn't matter But let's go back here. Nothing new should be zero now. It's even please preprocessed Nope, so this house gonna calculate to see if there's a cash and this is that something else. Sorry. Okay, it's not cashed good means I both should be I am but should be no here. No proxy Now that's a function then though renders trip and cashed. I'm at a break point here. Mm-hmm I think this should still return nothing, right? Yep. No should be multi-fuel. So that should be Unable news proxy Yeah, that's That's correct. That should be now this is a big chance that this is true to the other To the other eye Let's add a break point here. Just for the second. I just triple check open file of the file is gonna Kind of want to assume that this is not the problem So please remember doing those things that I need to decide which part of the of the cold I trust which ones I don't this should be one total files and we have Okay, so it should be two So the first time you do with your red created I buff to both fields Which is the just like an array like a buffer like to start a video. How is this related to the buffer we create? The I buff array who determines I this I here for you to be helpful To exactly rename this to I And to declare only within this context in other words I'm change here. Just to illustrate and honestly is actually useful to do those changes in here, yep, so take I remove it and I call it view ID. I don't remember if I call view ID or I in the in everything else in the code But view this should be fine. Please a bit more just creative Then I oh, I don't think you can declare is it that way? You cannot declare One thing if you plan to have two other thing here under the mirror, but this is more clear And yeah, there are some tools to rename things, but For what you're doing through the matter. I'll look at that and then it's not bad per se But here I would actually once again do it's gonna complain This I can do anything is better than the eyes. So honestly, I'm gonna do just Let's call this something different Call this I buff view ID So in this way, we make sure the variable is not used After the loop in a way that's not intended. Well, this is like just a small cleanup since I'm going to the code And now here we can actually make sure this is consistent And here again. Oh, that's the That's the value of change was what was I buff? size x I think I can As I can see I can get very dispersed. Let me just save these these these these these these These these these these these yeah, I was I buff x and y And if you answer I cannot even remove I'm using a git a list is G here. That should make it a bit easier to read British, let's go back to debugging debugging. So we're really here We really know and what we're gonna do now if I just continue it will And so that's the thing Since I Since you change the source files It kind of messed up when debugging Anyways, my I believe the what we have here is a case where It's loading the videos correctly I should be I should have a better way to test that but I think it's loading the videos correctly correctly That is creating once for both views and Reading back. It's not again This video might be one hour long, maybe two hours long. Maybe three hours long. Who knows? Have we ever now then like to close some of my windows my Bang Bang leave it here. There's our that's trying to read symbols and all that Least up. We did it this time. All right. All right But I think this is all correct Right. So looping over This of course is very strange, but doesn't happen. It's only Now, I think this is when the image itself is at two different images how to read from it remind I'll see it's correct If this is all correct Just stop. Where's the I still think the best course of action because I'm kind of being through like going try a bit more Sematic here but the best course of action a bit to go after the the same size You know what? Let me try something here So in theory, it is gonna be correct like and then Are they actually different? Yes But if I change These because this is easier to track in the code Let's change something else. Okay. Okay. This Makes no difference whatsoever. No, let's stick to this one And it's close close here, right? Can I get the cash and Ba-ba-ba Gonna skip something like Got the cash And of course I buff the size is gonna be the final size So now there's an above ba-ba-ba Some approximate at some point is gonna be a place to resize things. I believe and What I want to do is I want to render here now. This is a second eye and we know this Think if I do context I can actually see here Yeah, the view ID one Can even see the size 640 by 360 This is the Original. Oh, there's already it's bit by half. So this is also correct. So correct Anyways, the thing is here's gonna be ready cashed unlike the other one Yeah, so what I'm gonna try to do is To make sure the cash always fails Which I don't really think the issue once again. I'm thinking to play with the copy And I don't think the problem, but maybe it is this also Hmm So the problem might be when you're getting the result from the eye both here. Actually, that's pretty good question. What's the what's the Dimensions here, they are correct for the first feel Should be for both of them now for the second feel again Good piece to correct. Oh, good question. What if I try is the stamping working correctly? Correctly that are a good a good Good call. So stamping is we all know is the stamping options is in metadata There we go as stamp is correct. I mean just again eliminating sources of the potential problem which means That the Buffer has the right size I'm so lost here Anyway, let's try the the caching thing. So let's try to make sure it never caches. So I want this function to always be called, right? Might as well do Might not work entirely because it might work under the assumption that That is running for the first feel. I guess we'll find out It is the same image on both. No, no, it's the ha So one hour mark We find I found a really really good clue. So the cache systems basically Making things not work Which makes sense because it was probably Introduced with 2.83 or 82 we have this cache. It's recent Oh, so happy. So if you see that's the thing, right? So here and here We see that it's definitely different image The 3d itself drama is not working the separate bug Happiness, there's an option to actually disable cache It's there, right? So let's So let's try to disable those options. So instead of hacking blender. Yeah, yeah, it's gonna be a bunch of Main what does it mean then when the cache? So cache is Not storing things correctly You see the problem, right? Because if the problem is retrieving something from the cache anyways, I Could totally stop the video now pretend. It's a it's a victory. It's a lot of progress Normally, I could even stop now and go to the chat and then talk to developer that implemented it the recent cache and say dude how's the Like which assumption you're doing you're doing here like during the cache and Try to discuss together because they probably have a better clue. So now I know exactly what's a Causing the problem But I think we're gonna insist a bit further But feel free to stop the video now. I will Not test something again, this is then once again a vanilla blender vanilla blender, which means Could be 2.8 83. I want to disable cache here See if some of those cache options It's probably gonna just I'll make it worse because it's probably just definitely needs the Pretty cool. Anyway, so that's progress Take a water drink something. Oh Actually, so you have the printing there. So let's actually do Do the work? Yeah again, so I Did what I did just call it just just just rendered from the command line As you can see it helps to know how to use blender to develop stuff And this did the stripping catches only even called once Now why if I call it once So anyways, we're likely we're I'm excited. I Put like on the on the mark of the video one hour mark excitement Now why is it because we're calling Sorry, is it because we're calling It's because the buffer that is stored if the cache is the wrong one And there's a good way to find that out which is I'll make sure whenever I try to get the cache and the above and everything You're always gonna try to get the right eye So let's quickly Look here this. Oh Jesus Okay fair enough fair enough Confuse equal. Let's try first always the zero one and then here itself a Big chance that might mess things up if things are stored in the context. Can't they just Who's calling this? Who's calling this? Okay, never mind if it's constant It means that we cannot create it as we read only my concern is what if this function is changing something inside context and then Mine to do is a different problem, which I cannot I won't find out later on but Don't happen because it's content is constant So pa Pa pa. Yeah, and I don't need this That's good enough Since be why would build I can explain quickly what I did here I want to pass a different context variable It has every single setting from the original one, but the view ID because I want to make sure it's always a view ID zero It's probably work with the the the one as well But let's try this one first. I Put my camera up here between and never check and probably blocking some of the text But just so because my camera is down So I kind of look at the people most of the time Okay, now let's see so just remember the the the left eyes I want with this mark Okay, and as you can see it's still cashing but just Just getting the buffer from one and now let's build again So what do I expect to happen? What does the thing like if it if it shows the buffer correctly? It means Hold on it works on the last time. The problem is the cached information What's the Is it even the left side to check out I can Now here's just gonna show that one of them I don't know if it shows the left or the right one here. Again, this is not the best file shame on me Start saying that is nice. Have a good demo file. Should I spend one minute doing a better one? I should but I don't think I will so So what the heck? Right, so what the heck? So we've won Fascinating coming to the cut is to show in the Active processing and then install raw like Did even I don't oh my god, I don't even know if that's the one that's a That's calling as well So does it mean that I both itself is wrong I'll do something now a bit more So so the first time that we are calling it And of course, this is totally overkill because I'm just gonna make sure that the first time it's called It's calling the correct one. Let me Interrupt my debug section here Like I should quickly quickly quickly quickly create a better video file which do it by adding image bugs Those are the ones you created today, right? I created so many times in my life the Like a good left and right sample file Let's do it again Let's with the 2.82 quickly. This is an example of the images. I create every single time. This is a right I Let's make it not move to you Okay, okay. Those are the the image I was looking for where they oh Okay, okay, okay Quickly Neil and Always Okay Here video editing Image I want it to be moved to feel we need to do it elsewhere we'll hear Turn all motivation for the entire scene or status copy status copy take this trip and Tell that this is supposed to be multiple Which is individual. Okay, and ignore the preview. That's a other bugs we have in blender and I want to render My whole thing as Stereocopy top bottom and let's render 10 frames of this So this should be fine render one frame Output individual no stair top bottom render is individual. No, that's the input of the image This should be fine, and I want the output itself to be on On our cover it better sample and Hit animate and I probably do this in 2.79 because I think indeed that The reason I'm putting effort into these whole things because for a few reasons Stereoscopic 2d has been neglected and I think it's unfair this incredible feature It's not what our people use. So let's do it properly image So Documents, right? Loaded I think I forgot to Don't make it. I get what will stairs copy beautiful 2.79 the best Sir 3d top bottom Let's make an in on a video file fan pack RGB Good enough in coding No, no, no one likes Matroska and for bugs Now it's a better sample thing Okay, better sample now the video We said what 20 20 is enough Render animation How does it look like? It's probably look perfect Open bugs 3d. Oh, it's playing. It's perfect. It's playing in my other screen, but it's perfect So now it is a better demo I'm not sold under resolution though and doesn't matter. It's good enough close anything. That's not to point 80 Take this file and place with the new video Bank And of course we need to Make sure once again is this is the right one Now the problem of this sample file is that it doesn't have that nice thing going But it's okay. I'm save these as a new default and Let's go back to To see the problem without my changes. So here you can see the left and this is the right Clearly so much better again, it makes it makes a word of difference to have a good sample files She'll put my effort to that in the beginning So Again, if I force it to be one like it, that's yeah, let's let's babe steps No hurry here. You're probably watching with twice as twice as fast I'm gonna still building and gonna close things that Don't need to be open like my Linking is where what takes forever, but I would just ignore this building on a build again close close Close so now you're forcing create the cache Now I'm curious to see what happens looking outside. It's a nice feel Perks of not working from the office Why did it? Oh Actually, this one's gonna be wrong every single step of the way. That's good This that's why it's you could have a good sample file. Oh my god. It's so wrong. But this is not even the correct 920 1020 1080 This is gold trying to think what what the heck's happening So to force no cash works. Let's try again See if there's a new default it's kind of cool As you can see it makes a difference if you can build very fast Which I'm not at the moment and the forced cash to never happen I'll just go here and return over it. Yes This is a way to I'm doing just this against an area that I have what is to build only the project I'm on and to link only the project I'm on Since the so it doesn't have to go through the entire Folder structure to see what changed to what not But since the bottleneck here is linking makes no difference That's right out right some of the findings if I disable This is actually what we're trying what we're double-checking now but As you can see 21 minutes ago Seems to be sound correct yeah, so They're gonna be crashes of course because we're doing a few things that we shouldn't Even gonna change this. So this is the one that should fail every single time But works beautifully So super confirmed that if disabled cash Things work fine So the problem is in the cash system. Yeah, we know that So this one shouldn't matter Let the cash be what we want to do is So I want to try again if the force cash to be Actually, I'm just trying to see if we use really getting the view from the context on from Blah blah blah Okay, so now trying to force by the time you run the Try to get the cash Like should you actually should even mention here cash found can even do like this Cash and then like this and of course as the correct is to do like this So this at least gonna tell us You're wondering will the light post this video if you cannot fix the bug I will Yeah, which I was of my My old So I had an even faster computer at work with a faster CPU, but somehow it fried So I wish I had my work computer now Makes life so much easier. So we're gonna do Window view so I can see see cash not found and then cash found and Only shows the left right left eye for both of them. That's kind of what we We asked over there, I want to try so many things now, but let's first try these and Let's compile what they write down findings Let's continue so if I force context fill to be zero for Getting the cash and that doesn't make sense God check this out But you couldn't find the cash. So it won't catch it that that will make no difference at all as if there was nothing these is where These are gonna just show the left and right with the the right wrong Got the cash is not found and then cash is found Anyway, the problem for me since that we are creating the cash the in the wrong way for the rightville for the second wheel because here I'm gonna write it down. So I don't forget and it's clear. So if I force the view to be To be zero when getting the cash both bills Now if I do the same for one to this super confirmed from trying to say here, which a bit unfair comparison because If you really want to try left for both eyes, you need to do the same here Which I might as well do it and then Context local because the other one was calculating for the zero. Yeah got it and then We'll try to get for the one but to try to get for the zero and it was cash. So good enough so never So we don't fair comparison. Why if you try it with the one when When drawing the right the left eye will still correct. This is what we got it. Come on before it compiles ah Failed What I'm curious is if I force to be one when getting the cash What happens, right? Which is not what we're trying now what you're trying now is if I force context fill to be one when getting the cash and when Calculating and cashed. It's what we're trying now Compile. Yes, it did compile. It works as in But now it's never finding the cash Never finding the cash I have this more feeling the issue has to do this preprocess, but it shouldn't be Write down the find and so if I force Cash to be one again and calculate and cashed shows only right correctly and But never finds cash It means even if I render again, which is scenario where the cash should be there So you cannot find the cash It's a bad sign Pretty good, but a pretty bad sign So you want to do the other test so There's anything coldest you assume as we do first the zero view and then the second will work this line I keep one now this way we changed that didn't do any difference, right? Struggling it's not the first time I found a problem with the cash system better think I mentioned that already This time is usually is usually useful to go for a walk and to clear the mind a little bit There's a rise get too much stuck into the same problem. This is silly to even consider to change that So Let's go back though. You're directly we're doing progress over there. Oh Salami Mingui What if something different here, so we're gonna try to do now If you try this at some point already, but anyways, I'm just thinking like any ideas keep coming like what if the context itself is different For the second run, we're never gonna find out What is even in the context in the context even If he helps if you can't print that but I doubt it. I doubt it No cash found or not and then So we are expected to have cash found every single time and then context wrecked X equal This I'm even gonna do the other one might as well and then context I Don't expect them to be different for the views, but Actually, I'm so stupid it that that won't do it I Won't do it Not so stupid It's a process of thinking first Let's get rid of these and then these Okay now What do you want to do is this here? Probably to free the above Produse to do like I'm almost almost sure But I won't let's man leak and This we can so for now the only difference is that now the only thing you're doing is forcing cash to be To be used for both the left and the right field so we're seeing the problems in the reading from the cash or Generating the cash And if that works and I see I have plenty of plenty of ideas. I want to try to Swap the views here, and they're gonna see and then the other thing one do is for both views So what then? Curious curious I am as well. That's probably gonna crash right the resolution is the same Let's let's try again because I forgot to see the why is cash not found Here wise cash wise cash not found. Oh, sorry Cash not found for left and cash found for right Like why oh? Because I'm doing I forgot to oh Hum and that's correct. I'm just calling it 3,000 times And this is probably one of those issues which is a one-line fix Ah Was part of my show And pego nas colas Rogue a placola com a de professor My super messes malucas tão curtas quanto um sonho bom Please color there Sitis come the girl died baby So what the heck? When are we adding things to the cache? Later. I should know which one is being called. Honestly, I'm just gonna copy the whole thing. So there we go. To all the things you can't really doftel largest in space sequence effects before rescaling to end resolution has been done. Which means rescaling is probably afterward. I think I know what the... Anyways, no one wants to hear me bobbling, bobbling. Kind of want to get rid of this whole preprocessing. Let's do this. But this is the preprocessing So we are actually storing preprocessed. Let's just gimme gimme. Which music? I like to listen when programming. Oh, thanks for asking. Thanks for asking. Bank. Use preprocess to find somewhere. So quick recap. I'm actually going to the effort now and just hide this so it's doesn't get on the way to add to the cache. So now I'm definitely mostly holding the same having both left and right field to read from the cache. The struggle is real. I'm getting gray hair already just for thinking of that. I'm not writing down my findings now because I failed my experiment. So it's okay. And now the console always found the cache. So reading from the cache is fine. Now let's try to... Now that's going to be the fun part. So this is done and left is right. It's correct. Oh, this would be beautiful to write. Left is right. And right is wrong. Left is right. Right is wrong. And now let's swap it. So now if found the cache means this doesn't run. So we're just returning it. Beautiful. Beautiful. Oh my. So now I'm going to try to... Maybe I should first try to do 00 for both of them and then 11 for both of them. And then I try to flip. Maybe the... I think actually a little bit of this whole preprocessing. I think it's kind of not looping over every single view it should. So it's not scaling the other view. That must be it. How beautiful. What does it mean? The cache is wrong. It means what is actually cached is entirely wrong. And now they are swapped. But left or... No, left is still wrong. Which also means if I do 00 it should be fine. If I do 11 both of them should be wrong. So the whole preprocessing. When was this added? Where's my git lenses? Record and TALIC. VSC cache rewrite. Yeah, my friend. I suspect you broke some 32 to even assume that without checking. Sorry, he got... Big file. Those things are hard to... Cards can just go back in time and build the blender before days and see if the... How it was before and then try up their odds. See if the problem was introducing this one. Probably was. Let's now let's look from the beginning and look at any sense of view. So another good reason to use view instead of eye. Of course, viewing previews they're very much alike. Some of this is wrong. Some of this is wrong. That's simple. I call it. I call it right now. Some of those are totally wrong. Who get there? First let's continue here. So you know I tried both of zero. That should be perfect. And then both of one. Both of them have the same error. Beautiful. Congratulations. Let it build while I look at the thing again. So it's in the sequencer space and then this other one. So it's both in the same file which I believe is the sequencer.c. But first let's use bookmarks. I think why are you even why are you even... Okay we're not we're... Okay it's valid. We're already doing something special for those cases anyways but because if it's the recent one if the current one I'm just anyways. And which confirms when I first thought about talking about the... I thought I mentioned this cache and talking to the developer that was that is working with cache in the video sequence editor. That's Hikard Antalik. And he probably knows that but I'm just gonna try to do this myself. So this is Christ. I think it's Jesus Christ. So we were expecting... I was expecting to get the exactly same result in both of them and I think we actually did say so they're both equally wrong but that's good. The other kind of thing just has some problems with the alpha and whatnot. Okay this doesn't really tell but you can see that they're like there's some garbage at the fill in the alpha but everything else is correct. I mean it's equally wrong. And if you see only the color of the alpha...  Always found the cache. So it's been again one hour since we found that the problem was in the cache and now another hour to try to figure out that the problem is is on storing I'll say not retrieving which we're storing preprocess whatever the no I'm storing the second view the right eye. So if I force to read from cache and swap then just left right and then if I force to read from cache for both views and read left on both of them. Oh right on both of them they are both equally wrong. So one thing didn't test but doesn't matter. Oh my god so what is the issue? And actually I have a fix for this whole time now I don't. So I think I mentioned right I think the problem is those old Jesus there's I will once again go over the how many calls we have for this. One, two, three, four, five, uh plenty. First I think I will hide the let me let me switch branches. So this is fixed VSC Stereo yeah super generic. Clean up rename it to view ID. I want to do a few more of those but I want to stash those changes aside by stash I mean literally it's stash save uh uh uh uh force count the force cache. I think it's like this like force cache. Yes which means we're back here back to black. Now what I do I want to once again blah blah blah. So now I want to go over the changes from this. I want to go over those three changes here and make sure first I want to rename them so let's go to them one at a time. And this is where we are already. Oh just for image I will change because what I'm going to do is rename me only so it's fine but has nothing to do with the what I'm trying to fix. And yeah I think if it's if it'll be alive it'll probably be a bit more interesting because people might maybe I can actually read and and have something to talk while doing those things again ain't view ID view ID view ID do do do do otherwise you know just it's missing again not one try next time so in both in both so this for the image now it's probably the same for movie strip and then same strip okay and of course the only one that's really oh I forgot one thing they're probably in order yeah and also to remove the eye inked eye where is that declared here go out okay now I'll do the same thing for the movie strip oh I did this already and for the same strip mine as well my god yaka am I in the right function yes I am I'm going bottle up which doesn't make that much sense but I sure there's no more elegant way of renaming things yeah they are but I'm not in a hurry doing those things also help to to bring to settle a bit it's goodbye so forcing for most you should build no reason for this not to build that trick to build the project also exactly also helps to catch compile errors quickly so three oh zero seven so six seven sorry three five seven nine three six one three there we move if I didn't it's gonna complain as well that these variables not being used okay seems to be good enough the changes I did and I'll never commit those changes together with the fix actually let's this can get this can go to master like now didn't I create a branch I had a rebrand already from last year which anyways for March last year so one year ago these are clean master yeah it is and bug was introduced so I had a branch already with that name so I didn't refuse to create the branch let's delete the branch farewell stereo and remove it from my keep my github account so I use it as backup so it doesn't exist there or this is the polinto and the other one is I never know no anyways mm-hmm cool now I can once again create a branch just to keep things clear go back to master make sure again I could just commit this to master no problem but I don't okay we're back here and did this build right so now let's go back to this blah blah blah do render movie strip blah blah what was called see that my energy is already like going low movie strip okay so that very suspicious commit I was suspecting here right why would you there should be easier and first let's run this for both yeah I think I'm it's starting to understand the code which is first let's uh which is that maybe the way we're putting things in the cache so this is gonna probably gonna this should make this will make the cache to fail so I see one my like this now it shows dash this jesus christ does any one know how to here's where was it uh line 3667 when we never really managed to do uh in a nice way is to to actually use bookmarks do render strip and cached no sequence render strip because now it should not it should fail to get a cache for in both cases I should probably put time sometime to understand what's the difference what's the difference between the raw cache and the processed but I think we tried right and it fails for both of them so it's not the case I'm trying to think what can it be which means so the problem is is whatever we're putting whatever we're putting the cache is wrong now when I force the cache for both views and call then did I manage to read the left from cache I think I did but then it's because I anyways I think this code here to add to the cache is so different from the code here which makes me wonder what the heck is that like why here we go through the trouble so an interesting test to be too so many options little water break and we're back I should have done this a long time ago so easy to break one thing that bothers me big time big time is that we want we go through a lot of hustle right to store something and to start the left field well when when it comes to this the right field you're calling one function and that's clearly not enough so let's I don't know if you have context here but so what I want to try to bring everything we have basically all this function calls so first let's just add a few prints here print if yeah one just to I don't have an idea of what is called yeah that's the only one process does this process or just shouldn't process right shouldn't process yeah correct should always this should be constant to be honest should be constant but it's not it's okay it's okay so just want to double check that none of those none none of this is called or is called it's not called just triple check it now that I think of I could have paused every single time I would compile but then but then there'll be no music there'll be no singing and I believe I think preprocess has been called and there's probably final fix you probably can I don't know reutilize some of the which changes we did here oh now you're just not just not putting the left one in the cache and interest on this one b b is called b is called b is called and b my friend is due so basically what we want I believe probably want to check blah blah blah blah blah I'm assuming we need the preprocessing who cares it's gonna need to be revealed anyways and then if if you hope the process should be true in this case but the heck is begin why do you keep defining things like can be no I don't let me focus here so before one thing I like to do is like this so we can dump the code here a bit more plus so we can dump the code here and not worry about formatting then you can see what part of this is useful you can even just compare what the heck so that's the correct thing cost is zero so we're just gonna order the whole cost false is false what let's try something different begin blah blah blah so what is exactly the difference here so this is the same without the cost okay and that thing we first are adding the raw then do this whole in both preprocess maybe so that's the in both we need to add I have this so that's I have this feeling that what we need to do let's just assume everything's no no here so let's pretend the cost is going to be zero if I close here can already remove the begin zero you're just ignoring it proxy image don't care about the cost rich okay I have a feeling that a big part of the problem of the problem here that we're storing I don't think it's this one but this is like blind gas I could just try that one but I think this one here I think if you want to preprocess preprocess no idea let's just assume it's false false I think I checked before no okay maybe can actually can actually anyways for now it doesn't matter context you can still do it okay okay okay okay okay okay if let's do a thing here boolean preprocess both fall equal false probably the initialization of the variable correct how do we know if it's a proxy image I'm if it's a sequence a movie clip so it's false dude it's here it's your friend oh why don't you let's let's simplify our our life are using above yeah we are now let's stick to let's stick to this I think we got something here so preprocess true blah blah blah just copy and paste it did it even read interesting we probably had a problem here this should be it's on function okay but since we're just quickly exploring of course and fine I just oh it's I'm buff I buff I think no yeah I'm oh but cap to be cap to be okay reset timer no such thing as timers since we have conviction that this might be what we need now is this friend I'm buff anyway let's not oh did you see that look at that now it's only the proxy image anyways I think I did something stupid and some false positives let's clean them up now before it's too late ignore those these because of the alt format okay of course to do it for real would probably just double check if oh it was from the original code so I'm sorry about that so this goes back and this whole let's let's let's uh let's be civilized blah blah of course this is what we usually do it'll be like if this is equal just continue plastic plastic I think we don't need this okay although I think it's in this case I think we can afford an extra thing looks cooler this way let's see if I messed up the code too much I did I did it's missing one now I'm just messing up the code maybe this yeah I think so perfect of course build oh use preprocess not yeah we uh we're always you're assuming you always would want to add the preprocess no let's go back to the now this always run not mine as well just just the costs you can push the raw thing it's the raw and the high buff oh okay so I need no worry don't worry don't worry don't worry so we need here is to define this outside doesn't it be that I can be here oh this is going to specify the code a little bit as well and we can use these instead and we can add these instead this is how we do I do I buff sequel I buff yep beautiful we're calling this twice why this before over there uh I'm both the sequencer no it's not so this doesn't exist here because we call this earlier on there's really all that's all there is to it so it can even come on or are we using the I missed the old blender code style preprocess I like the I think I like the readability of this code a bit better to be honest and when you're the computer kind of optimizes it anyways when compiling so it doesn't matter as in like the generated code should be the same just about check what else I changed the code you know it's small enough I don't so technically all you're adding now you're anyways that's a terrible sign I was thinking exactly that now like if it's crashed now we just give up I just hide this for now one thing that's wrong here is this which we both know is not why I think they're failing still worth trying and it was found beautiful beautiful beautiful so two hours and a half problem fixed now should I bother with the proper fix because I have a I have a feeling that you're gonna have the same problem with images you're gonna try let's try so this is for image seek for v the right image sequence but I need to free some stuff so this is for let's add single images I had this in the document honestly you can do this one now let's uh let's uh let's uh I think it's projects even let me find this off-screen and then we right get right back to you it was in documents projects I have it here right multi-view yeah here thank you let me copy this uh this file off-screen here quickly 2020 multi-view demo actually everything to my bugs s3d okay I just moved it here so this is my image again I want it to be multi-view stereo and it was individual files yes and if you render I had crashed it's a good sign I really think it has it has exactly the same problem for images because so first we don't need these anymore please for the render strip and now let's do for let's take a look at the render image strip thank you here it probably has exactly exactly is after this same problem let's just quickly see the problems they're not let's sequence s3d okay I should I should I should I should save this as a top bottom to be a proper to be exactly same scenario right and honestly the best way of doing it just take this go to video editing add the video we're playing with now and only just save one so what's the source dimension dimensions 960 that's not true right no it's not what was the file let's show your name better sample blah blah blah to better better sample four and just so five c works we keep a link to it just because right so there's a file and just want to render one image and save it that's all this is the single top bottom thank you very much now go back here to our sample file image sequencer editor oh actually save two of them we don't want right no we just want a single one of them so let's rename let's remove single bottom left right one and then move the signal bottle left to be stand alone oops thank you very much use mood fill just top bottom see the same problem let's save this as a different file it won't be single could always be could they could all be in the same file but single image so now we go here to the single image and let's just copy so view what this is so hateful the anyways the naming was a bit different so this is the old one let's just see if there's a thing the same local context sectors blah blah blah blah yeah no that's the old one yeah sequence and both zero blah blah blah okay okay now whoop compiling just to be fair it doesn't mean that the issue was introduced in that commit I was complaining about earlier because maybe by the time was you working and the whole preprocess thing changed afterwards I don't know and it definitely needs its own function to avoid the repetition and to avoid this error in the future so that's what I'm gonna do in the final part of this video so this is the one of the video so not the image so you're working fine now let's open the image one things make crash because of them see because of memory but the way we are creating things nice uh-uh check this out beautiful and third one was what was seen this we have this somewhere oh my god I have so many windows open and with that commit see maybe at the time yeah it's probably already broken at the time so what I can even check so this is the sequencer.c with that we're changing so let's just take this file and get show where we have editors space now it's kernel so how do we find out let's go to that function over the the render oh no the other one this one here no it's not this one I forgot which file was it thinks the render sequence blah blah blah blah blah and I can also just look for this comment it's gonna show me nope nope now I feel just pathetic but we're looking at this one here is the sequence render strip the render the render and let's make this render is this the one yeah that's the one so let's look at this beauty on here so the time of that commit this function is called everywhere isn't void or it's an above actually see at that time it was already expecting this preprocess so this commit introduced the issue so if you go to the commit before that I don't know it's doing maybe it's already see it maybe it was already there so enough side tracking we got image oh I needed the commit number oh this one yep so we let's go for this scene render scene strip which I assume has the same problem so let's already so let's move this to its own function shall we so what you're doing is I'm gonna do this in the original one which is the this one no that's the one I even have on my clipboard here no it's so on so on so on Jesus I it's not that it's the sequence render strip it's getting dark that's how long this is taking so on this whole beauty here to be its own function so I can use it over and over and over again and let's do it over we're just gonna do like before this function so three eight I will turn out the light be right back and we're back a little bit more of light so just copy this whole thing okay turn whatever no so and actually and then of course we do the depth definitely one and I'm both as an input and we definitely want to declare these in a few places but for now I just copy this whole thing here I think we can actually only honestly try to think here because if you compare these with the the move blah blah blah what is it called render I don't like it either way I should just send it as as it is and but it's too ugly to have that much logic repeated over and over and over again and then the next time we need to add something we're gonna have the same problem again so yeah I'm not happy and you shouldn't be happy either so this can be in the logic this can be in the logic this whole cost let's let's let's let's uh let's play okay so you want to Boolean preprocess preprocess you definitely want to aim both do you want it to be a const maybe say keep repeating the same mistakes over and over again sorry I'm tempted to almost that this shouldn't be long here anyways get cost supposed to be a float so we stop the count and start again I kind of didn't want this to be included in this logic but sure whoever called that she had she probably had something good in mind why do we even care about that uh this way not you can pass it as a parameters as parameters why do I feel I'm the wrong right one okay now begin let's see clock right something something something clock which I clearly never used in my life put up to call clock and redo this as a point now clock is begin right the name yep Boolean and then here of course need to do if begins not no check so so star and then star which might be zero so again why do you do this twice how cares about that really it's called totally won't be accepted after later on I can post in the description if like a follow-up what happened let's simplify a bit of code a bit strange because because I've talked to because it keeps picking to myself because here we're ending regardless how did they call this function sec render strip cache at it's really bad sign that there's already a function called this in the code no there's not good Remy Remy context state well I just copied the name so I can just now this is begin so now's a pointer and you my friend can now go to hell and of course so I changed I'm both yes I did why did it change I'm both and the beauty is we do the same for friend here I can just come on copy some of the arguments here but I think it's even think I know I even think I know how to fix the the crash shows again here so I can copy stuff blue blue blue right context sequence see frame I'm both it's going to be the feel see for here after so move this one here I'm both see for all the state what is state for did I just copy an argument which I don't use the dodges copy an argument which I don't use I did sir I did did I just copy the the function yes I did that's why we even use sequence I do I do I do I do okay no states is required okay so once again sequence above see frame the no is prox image false is preprocessed I think that's false we're doing yeah false if what I do is this is equal this is equal this and now we do the same for the other ones I can show you the word full of medic and sorry please will you ever with a buff track buffs don't declare their clothes man yeah fantastic point of view want to tell there's no where to go where was it didn't just look at it here why does it was a really function to do all these now let's pretend it's not let's pretend it's not again let's go back here full of magic and wonder sorry prince will you never yeah here also I didn't fix for the I didn't fix for the the other one for the scene that's why for this one that's the one we decided to be smart about it and so let's just find we're looking for this but that's exactly oh but now it's the raw you know what I will ignore this if it's still a problem I will deal with this later because I think the raw has no problem the problem is only if this whole preprocessing mess one can hope close close close close uh uh let's go to our new function how's it called again probably to kind of move it around or at least let's do this I think we got it but here is it ugly a little bit so we're not returning I don't know that's a good enough I don't like this timing like spread throughout the entire code so honestly I will violate my own rules and move cost here and I don't care how is I'm missing something very obvious here because who is even changing cost like missing something very obvious here let's cost cost cost oh because we're didn't I do this oh because cost is equal that's why and then we do cost again equal blah blah blah blah so it's really different cost sure honestly how cares cost is zero then here it began because we did this we border with this which means again we reset yeah but then oh that's why because I did the same mistake twice okay code style I think this baby is ready are you using all the parameters should otherwise you want to complain anyways one thing I like to do is while I come oops okay no I any warning is important oh of course bang and use preprocess not used what do mean it's set here it's set here it is here whoa oh it's in the 3843 then that's a cleanup now there's no more we still shouldn't I do this and my shouldn't I do this in my code as well actually first I both is always true here but we were running this sorry running this before honestly it can be used preprocessed fine no it's not almost there where did I get this from that's how the thing only thing I'm wondering that's that's this is when you start making like big mistakes big mistakes I'm thinking anymore three hour long video I should write down the the timestamps already I'm gonna do it here I was like one hour find cash two hour nail it down two and a half or something don't remember what that's why I should write this before anyways three hours polishing patch can also do the classic let the pet reviewers complain I just want to say any chance that these will create something that will be called oh it's not even based on the on having eye buff there wasn't no eye buff you didn't even oh gosh let's do it like this constant bullion you know that can work yep there you go do you like it no should this one be above then yes I'm mixing cleaning up with changes then maybe things won't work I still hate this begin thing here hit it big time it's ugly it's ugly super ugly preprocessed first getting hungry think about making a soup tonight and of course this is how we're calling use preprocess yeah and these need to go back in this cold fear nothing by the one oh that's why it's because it can it was part of the code removed kind of do two tests for just don't make it constant it should be fine means we do want it to be true for those scenarios let's also make sure here we call it call it properly how is not fine didn't uh didn't I bring it back didn't I bring it back sir should be here now yes beautiful so there's one thing you need to do sorry so we have a 44 eye buffs array and we have 91 eye buff array so you see eye buff array being used in three different files and I both as ray above array anyways I really want to simply unify this later but as a cleanup let's complain store to no pointer of type 387 my bad I hate this thing we also could we also can make this three times three thousand times faster which is well not faster probably slower what is this now if we can this can be clock and then I have throughout the cold clock to begin that if clock then else again equal now like this clock oh I need to put a pointer I think so which means there's always always a clock this and then this this and this we messed up the style again if else if I don't feel so much better yeah that's what we're aiming at eco eco beef above above image preprocessed float coast I can even repeat this verb button okay this as well float coast which means we can remove the other coast down on here if us preprocess float coast sequence for this then blah blah blah reset timer now I just out of curiosity how's the also initial value for clock okay I don't need this I do actually we can even is it expensive to have this Jesus quite less simplified lives oh I don't like to be called this called this timer clock is probably a protected word so so we don't wait this is all sound and this is like a mess I'm trying to unmask this doesn't matter can't you just pass a clock every single time I'm saying time you know if timer just move on so it doesn't matter otherwise yeah sure don't break my heart say you love me I think clock literally just a number aren't we overdoing by passing I mean already like way out of focus here if I wasn't recording to probably be on Twitter right now so we gain okay and then oh and then you do the whole costing thing right and then what's the cost so you can store the cost which means the timer didn't come but every time we do it no no honestly we should my ability of making decisions is affected this is gonna be begin I don't care I don't care I don't care I don't care and magically where do they edit this oh my god begin comes before user prep process here of course and just gonna be like gonna show the wrong number for everyone else they need to really no they can cast like what type is that even is it something I need to oh good good good good good good good good call which needs to do this wasn't this what are you doing the beginning thing or I can't call from here it's a clock get out clock and I'm probably gonna need to still change it but you're so close maybe what you can do is to use this instead you care no I don't the moment deciding whether it is clock or or not I will use this the way the way it is now bingo don't like it no problem ladies and gentlemen oh the satisfaction is it too precious no see also fix the memory problem now let's open the image let's do the cloud the whole thing so this is the video sequencer now let's go to the image one congratulations to us you're only took us three hours and 23 minutes to fix this okay let's call me call to commit and then I do a few things so it's a fix and I have this fix could I commit directly I could I want I will get people to reveal it and people have a bad vsc let's simplify steric scopic three issues with mismatched dimensions beautiful that's it and now to to change this for reveal first let's okay let's do us fall let's first update my blender to the latest and then go back here let's also do a rebase okay and let's quickly look at the this the one wheel three name cherry pick okay so so I'm gonna commit this to master and this I'm just gonna make sure it builds but this doesn't need any reveal it's a cleanup it's good enough ish as it is and we can also reiterate later but since my patch requires this to be requires this then might as well commit this first I don't expect people to watch the whole video it's two hours three hours and a half but let me know what you think and I'll do a wrap up soon but still I'm curious like the parts you've seen what you think committed and then go back to my branch but again a rebase just to be triple sure pep so and I only have as the patch is actually quite small but uh but I'm quite happy with it all right so and now we will do a arc lift which compares this code with master and let's add as a reviewer's Hicat Antalek which I assume is going to be this his nickname I'm going to add Sege just because just because I think I'm going to add Sege as a subscriber straight from now if you go to this the original task you can see that this shows here somewhere above above it should and I need to do it manually but related tasks it did here revisions so now they're linked together so anyone that comes to see this and hey I want to fix that you're actually gonna go all the way here and that's the code we produced today okay so that takes some time that's about it that's that's what it takes sometimes especially if it's an area which we are not familiar with I could have asked the developers of the sequence editor for some tips I wanted to try to go a bit more blind in this way but I think we did well and it's not that atypical to take that long to review this for like three hours and a half and we could probably do it in two hours especially if not streaming probably do a few things faster but in two hours I don't think so maybe maybe took us one hour just to find out that the issue was was the was a caching at that point it could have stopped maybe just updated the the the task with the bug report and say hey the issue is the cache if I remove it from that that person would probably take I think took me one hour give her a take to go from that point check a bunch of stuff and then to get to the conclusions to the conclusion of the that where the issue was I think that could we definitely be shortened by asking someone that more knowledge in the area but then I'd have to wait a little bit and add to the tracker back and forth so I wanted to make this whole thing in the video and then took us what took us another hour what was it for all to find then yeah but anyways I hope you like it I will add like a timestamp of the video to help people navigate here let me know what you think I can always make more of this this is I don't do a lot of coding nowadays as I mentioned but I like when I do it so might as well share it and that's about it thanks so much for staying for that long or for visiting this video and see you next time bye


So, yeah, so, as was just said, my name is David de Carriensu, my background is actually in criminology, so I have a PhD in criminology, and I've been listening and looking and investigating illicit markets online for the past almost 10 years now, and most of my research really tries to understand what is the impact of technologies on crime, and very often it will gear towards the dark web, the dark net, and anonymity technologies. So I'm a co-founder and chief research officer at Flare Systems, and what I'm talking about today is part of a report that we published on botnets and proxies in Canada. So one of the things that I try to do is to focus more on the Canadian market since most of the research is international or even American or European, so it's nice to have some data and some content about Canada. So most likely today we're only going to get to the first part of this talk, so we're going to be talking about botnets basically, and more specifically, a market that is reselling access to bots. There's also a part about proxies, we'll see how things go, and if we have some time for it, then we'll talk about it. So of course there's a lot of debate in the research community about kind of naming the target of the investigation. In this case, we're going to be talking about a very specific market today, it's called Genesis Market, and I know there's some pros and cons, but in this case because it is a market that has been extensively researched, and something that is very known in the community, we decided we're going to publish a name of the market that we're going to be studying, and this will help you kind of understand what kind of threat it poses for your organization, and if it's something that you should care about. So while I start, a very quick and basic kind of introduction to botnet, just to make sure everyone understands what we're talking about. Today I'll be talking about botnets, which are basically just networks of infected computers who are under the control of a botmaster. So the botmaster is the person or the group of people running a botnet of infected computers, which we're going to call bots, and very often these bots are going to be used either as proxy or they're going to be using proxies, which is basically just a device or something that allows you to run your traffic around somewhere on the internet. Now the fight against botnet is growing and it's a major problem for organizations, so just to give you a very high level view, when we're looking at how much companies are spending to fight botnets, it's expected to grow up to a billion dollars in 2023, so it's something that is a very big and growing concern for organizations. Now when we're looking at Canada more specifically, is botnet a problem in Canada? Well, one of the things that we can look at, and this is data from Spenhouse, is where are the botnets come in control centers located? So basically where are the computers controlling the spotnets located? And it was quite interesting to see that actually Canada is in 12th place in terms of location. States, Russia, China, Europe are the main places where you're going to find these command control centers, but Canada doesn't seem to be at the core or the center of this industry based just on this information. Now another important thing to understand is that the botnets they used to be about many, many things, but what you see over here is a description of what botnets are being used for today. And basically you see that there's two things that they're mostly used for, it's either credential stealer or it is remote access tool. So in most cases, what botmasters and what people who are taking advantage or using these botnets are looking for, is to steal some credentials. And today we're going to be talking about one of these botnets. So analysis by other research teams have pointed that the Genesis market is actually reselling the Azor Road botnet, so the bots infected by Azor Road. And so what we're going to be talking about today mostly because this is a credential stealer is the reselling or the using of stolen credentials. Now when we're looking at where these command control centers kind of, where they're being web hosted, you have the list of countries over here and the list of networks. And once again, Canada is not part of that list. So if we want to focus more a bit on Genesis market more specifically, which is kind of the aim of this presentation. First, just a very brief overview of how the market works. Basically, when you log into the market, you're going to get a list of all the bots that are available with the number of bots per country. And so if you look at the bottom of your screen, what you're going to see is in Canada, we have about 20, there was about 2600. That's kind of concurrent. So there's always a bit around 2500, maybe a bit more bots for sale from Canada. And the market is actually pretty generous in that it provides us with a lot of information about all of the bots that you can rent out on this market. So one of the things that you're going to get is for example, the country where the bot that you want to rent is going to be located. You're going to see the number of resources which are kind of the credentials that you can purchase that you're going to get access to the bot. You actually get when the bot was installed, which means when was the computer overtaken by this botnet. When was it last updated? So this is when was the last information sent from the bot to the bot to the botnet. And you even have partial IP addresses and the OS version. So all of this is pretty interesting because as an organization, you can actually see some actual intelligence that you can look at and say, well, this is an IP range that's part of my network. We see the OS, for example, it could be Windows Enterprise. And so it becomes kind of, it will help you to kind of understand if one of these bots belong actually to your corporate network. Now on the market itself, this is what it looks like. So you see the menu on the left as always. And there's a bunch of stuff going on over there. But maybe more interesting is actually the fact that you can get for every single bot that you can rent out, all of the information about the cookies and the credentials that you actually get when you rent out these bots. So basically, you're going to see a list of websites that everyone's familiar with, Facebook, Amazon, and whatever. And you're going to get exactly the cookies and you're going to see all the information that you're going to get if you were to rent out this bot. And so it's pretty specific. And in terms, for research, it's extremely valuable because you can actually see everything that is for sale. And it allows us to do some projections and some calculations. I'll be talking about those pretty briefly. Now searches, well, of course, you can search for content. But maybe the most interesting thing is this notion of generating fingerprints. So as was said at the beginning of my talk, many organizations, including banks, will fingerprint their users, which means they're going to look at the IP address they're using, what kind of browser they're using, the language, they're going to be even looking at the plugins that are installed, the resolution. So they build a profile for what normal access to their service looks like. And with Genesis, what you're actually getting when you're renting out these bots, you're actually getting the credentials that were stolen from the bot, but also a fingerprint. And this allows you to very, very, very precisely mirror the victim that you want to impersonate.  Now, the market does give out for free two things, either their own browser, or you can actually get a plugin they can install on your browser. So in both cases, what these plugins or this browser do is they're actually there to let you import the fingerprint, and you can even get live updates from the bots with new credentials that have been stolen. So basically, this makes it extremely seamless to get, to impersonate anyone that you want, as long as their computer is for sale on this Genesis market. Now, you do have to provide your own proxy. So this is something that you have to add to the service.  So very kind of high level. This is what the Genesis market looks like. And if we look a bit more closely at what's going on on the market, and this is kind of the whole point of this conversation today, is to look at how many bots are for sale. And what you're seeing over here, and this each number represents the number of bots that were active that were for sale from Canada on Genesis market on a given day, what you're seeing is some sort of a downward trend. And you see that these numbers are slowly decreasing. And so that's kind of interesting to see that over time, we don't see an increase necessarily for Canadian bots. And we've been watching the market for the past now, maybe five or six months. And what we've always seen is that the number of bots for sale in Canada is going down slowly, but surely every single day. Now, when we're looking at the number of new Canadian bots that are posted for sale per day, what we're seeing, and this is once again, just a couple of days, the number of bots, of course, it's going to vary depending on the day. But what you're getting on any given day is about 15, maybe 20 new bots being sold on Genesis market from Canada. And so what we see is that there's a surprisingly constrained supply of Canadian bots on Genesis market. And this is pretty, so this means that the bot net is not infecting vast numbers of computers in Canada. It's, you know, a kind of a steady grind of maybe 15 to 20 bots that are getting infected every single day. Now, one of the big surprises that we got when we were looking at Genesis market was the fact that when you analyze the bots that are for sale, you come to realize that many of these bots were not infected in 2021, or in 2020, they were most of them were actually infected in 2018 and 2019. And so when you get down to it, what you realize is that Genesis market is enabling or facilitating the sale of bots that are actually pretty old, and that you can actually question if they're even working at all, or if the information you're going to get from these bots is going to be relevant. And so this was kind of a big shot because we expected, you know, the bots to be quite fresh, but to see stuff that's, you know, two, three years old was pretty surprising. And when we look at the last update, it's kind of the same thing. So it's one thing to have a bot that was, you know, infected in 2018 for sale. Maybe it's been infected for three years, maybe it's been around, and you're going to get some quality data. But actually what we're seeing is that in many cases, the bots didn't send out an update for three years or even two years. And so when you go on Genesis market, you see thousands of bots for sale, yeah, perhaps, but at the same time, what you're, what you can actually buy is something that hasn't sent out any new credential in two years. And at that point can actually question the quality of what you're getting, and whether it's really significant or something that you would like to buy. Now there's quite a few that have been updated in 2021, and those are going to be probably the ones that you're going to get and the one that, you know, the most malicious actors who want to purchase or rent out. Finally, when we look at the Windows versions, which we see for these Canadian bots, is that most of them are running the latest version of Windows.  It's basically stuff that, you know, that's with Windows 10, which is once again the latest Windows. You do have some, you know, weird people still running Windows Vista for an unknown reason, but, you know, for in most cases, it's going to be newer ones. Now that we see kind of what is the supply on Genesis market, now we can look at the demand and try and understand exactly how the sales in Genesis markets are operating. So one of the things that we see, if we look at the number of bots from Canada that are going to be sold every single day, what we're seeing is that it's about, you know, 30 to 35 bots being sold every single day on Genesis market. And once again, this number is pretty low. And this is kind of interesting. So it means that the supply is kind of constrained, as we said, with about maybe 15, 20 new bots every day. But we also see that the demand is pretty low with, you know, only a couple of bots being both every single day from Canada. And so what we're seeing is that these bots actually hold credentials. And here you have kind of the main credentials or the most commonly sold credentials with these bots. Of course, it's kind of no surprise to see that, you know, Google, Facebook, Microsoft with Live.com, Netflix and Amazon are going to be kind of the most common credentials that are going to be sold on these botnets. But later on, we'll also see that there's actually a bit more to it. So, you know, when you're buying these bots, you're actually getting access to, in many cases, to these credentials. Now, one of the things that we wanted to better understand is how do people make their purchasing decision? And so what we wanted to build is actually a model that would predict which bot is going to sell on Genesis market. And so the way to analyze this is to look at the bars and to understand that if a bar is going to be yellow, it means that it will increase the odds of a bot being sold. And if you look at the blue lines, it means that it will decrease the odds of a bot being sold on Genesis. And of course, the length of the bar is going to indicate the strength of the relationship between one variable and the fact that the bot is going to sell on Genesis market. And so we tested for a number of variables that you can see in the graph over here. So we looked at the time since the last update. So how long had it been since the bot had been updated? We looked at the invention length. So how long ago was the bot infected? We looked at the number of cookies that were sold with the bot. We looked at the price. We also looked at the number of credentials that were being offered with the bot, the Windows version, whether it's enterprise and whether it's new or old version of Windows. And what you see in this model is that there are four variables that are connected with sales on Genesis market. And the biggest predictor of a sale, well, it's going to be the time since the last update. And as you can see by the length of the bar, it really is the biggest factor here. So basically, when people log into Genesis market, what they're going to be looking at for is a bot that was recently updated, which means that provided new credentials, something that was fresh pretty recently. Invention length is important, but not as much. The price is important, but once again, not that much. But the number of cookies was relevant and important. So basically malicious actors appear to be looking for bots that are going to have more cookies. And of course, when you get the cookie, you can actually just log into an account. So it makes it much more easier to impersonate someone and to get their data. So this model was really interesting to better understand. And when you're working for an organization, well, you know, if you determine that on Genesis market, one of your computer is actually for sale. Well, the fact that it hasn't sent anything for a couple of months, couple of years, basically mean that the odds of it being sold to someone are extremely low. So there is a problem, but the problem may not be as big as someone who has a computer that just sent out some fresh information to the bot. Now, we also wanted to look at the pricing of bots on Genesis market. And here you have the price of bots overall, as well for every year, depending on when they were last updated. And it's pretty interesting to see that, whether we look at the median or the average price, what you see is that the fresher bots or the bots that were last dated are going to fetch a much higher price than the ones that were that were infected and updated a long time ago. So if you're wondering about the price of a bot, so on average, if you want a bot that was infected recently and updated recently, on average, the cost is going to be $58. And if you're looking to the right, the median is even lower at $35. So most of these bots, when you rent them out, they're only going to cost you a few tons of dollars in most cases, though there are some bots that are going to fetch in the hundreds of dollars. And if you go down the list, you're going to see, for example, that a bot that's a couple of years old, well, it's only going to cost you five or $6 probably, or perhaps as little as $10, or even $1. So basically, most of these bots are sold for pretty cheap. And it's kind of interesting, and we'll get back to this in the discussion at the end, to see that nobody sells gold for the price of silver. And it really kind of makes you wonder as to how much can you really get out of these bots and how good are these fingerprinting services working if these bots are selling for some cheap, basically. So it's a question that we can talk about later on in the discussion. Now, the other thing that we wanted to look at was the prices of bots. So we actually built another model that would predict this time around the pricing of each of these bots, not whether they would sell. And we have kind of the same logic here to look at this graph. So if you look at the yellow bar, this is something that will increase the price of a bot. If you're looking at the blue bar, you're going to see something that decreases the price of a bot. And the length of the bar shows the strength of the relation between the variable and the pricing of bots. And what you see over here is actually the number of credentials is the lead variable, has the strongest relationship for the pricing of bots. And so it's kind of interesting to see that when the malicious actors, they're pricing their bots because, as I showed just before, there's a wide range between $1 and $350. They actually have to set a dynamic price for each of these bots. Well, they're going to take into account the number of credentials, and that's going to be kind of the strongest predictor of the pricing of bots. And we're also going to see the time since the last update. So the older the bot is, the cheaper it's going to be. And it was quite interesting to see that the newer version of Windows were actually fetching a lower price. And so it was kind of interesting and probably because the newer version of Windows may be more difficult to hack or to maintain your presence or to get new credentials from them. And so they are a bit cheaper than the other ones that you're going to get. So here, the goal was really to understand, so how are these bots priced? And what we see over here is that the number of credentials is really the leading factor. Now, the last part of this analysis was to estimate and try to understand exactly what is the impact of Genesis Market on the Canadian economy. So that's a pretty big goal to have. So what we did is we actually built scenarios and we tried to assess the impact of Genesis Market depending on each of these scenarios. And so for the scenarios, what we figured was that the optimistic model is the model where you're going to have the last impacts. We're optimistic that there's going to be very little damage by Genesis Market. And so in this case, what we're looking at is perhaps 15 bots being sold every single day. That these bots are going to cost on average $71. That maybe 60% of these bots are going to work out and you're going to be able to do something with them. And that each fraud per bot is going to be around $300 when it works. And at the other end of the spectrum, what you find is the pessimistic model. And in this case, what you're seeing is actually a lot more bots being sold every day, so around $60. These bots cost pretty cheap, so only $8. 90% of these bots are going to work out. And then the impact of the fraud for each bot is going to be about $1,000. So these are numbers that we can talk about later on in the discussion if you guys want to. But we tried to model the impact on the economy. And in this case, what you see here, so in the blue line is the pessimistic model. And what you see is the impact over 12 months. And what you're seeing is that Genesis market in the worst kind of scenario that we could figure out, the impact was around $19 million. And optimistically, it was more around $1 million. And so in this case, it was really interesting to kind of evaluate the impact that you can have and to consider to think about how Genesis market in Canada only represents about 1% of all the bots out there. And so it's pretty difficult to determine exactly what the impact is going to be on all these bots. And we didn't even try to come up with a scenario for the international and the whole world. But you can play with the numbers in your mind. You can pretty quickly see that the impact of Genesis market on the economy around the world could be quite significant when we're looking at these numbers. Now, just because I only have a very short time left, I'll skip that part and I'll be wrapping up with my conclusion. So basically, what we found out when we're looking at Genesis market, and that was perhaps one of the really interesting point was that there's a lot of false publicity to attract the customers, but also vendors. And that's something that we see on many forums and many markets. So if you look at the criminal underground, you're going to see people boasting to have zero days, people claiming to sell pretty much anything. And in the end, if they really have what they say they have, probably not. And in this case, what we saw was a lot of false publicity. So if you log into Genesis market, you can think that there's actually thousands of bots that you could buy from Canada. But in reality, there's only a handful of them, perhaps a couple of hundreds that are still active that are interesting to anyone, and that the buyers are likely to buy. The rest is probably there just to inflate the numbers. And this shows you the importance of really digging into the data to analyze it and to really better understand the threat landscape that this threat poses. Now, the place of Canada in the botnet and account takeover come on the ground. The place of Canada appears to be quite small. So we're talking about one percent of all the bots on Genesis market coming from Canada. And what we're seeing is the number of bots, therefore, is pretty low. And we see other countries. So if you're looking at France, Australia, which are probably the closest in terms of GDP per person, as well as the size of the population. And we see a lot more bots attacking those other countries. So Canada for some reason is somewhat protected against this threat. And that is a pretty good news. Now, Genesis market is, as I said before, a really generous platform. And that it really shares a lot of information. And following the release of our report on Genesis market, we actually saw a banner on the market with the administrators asking their members, and do you know if there's anyone investigating us, if there's something going on, do let us know. And one thing that we do expect is that the platform is not going to remain like it is right now, just because it is giving out way too much information. And this allows researchers and organizations to see if one of their computer has been taken over and to look, for example, in the list of credentials for internal domains or services or websites that no one outside of their employees should have. And just because you get a list of all the credentials, well, it kind of helps you to understand whose computer is being taken over, because you have the partial IP, but you also have the list of websites they're going to. So you're going to have music sites and other forms that will help you kind of identify and know who the person is. Now, my main point and question with all of this was the fact that nobody sells gold for the price of silver. And that was a title of a paper by Microsoft researchers almost a decade ago now, maybe a bit more. And in this case, I mean, you get so much every time you're getting a bot on Genesis Market. So it is pretty surprising to see that people are not willing to pay more than $50 or $60. In some cases, yes, $200. But on average, the price of the bots is going to be pretty low. And so this really questions kind of the worth of these bots, and whether you can actually get that much information out of them and how easy it is to use them. Now, the practices, I kind of skipped that part. And basically, and the fact is that when you're a company and you're facing challenges such as the Genesis Market one, well, you're going to have perhaps a hard time to identify the fraudsters because of the fingerprinting techniques, but at the same time, just because they're being sold for so low, maybe it is not such a problem in the end.