Brian, not sure if related, but I had a similar issue a while ago, take a look here:
https://sourceforge.net/p/openbabel/mailman/message/32893219/ Maybe it helps, S -- Stefano Forli, PhD Assistant Professor of Integrative Structural and Computational Biology, Molecular Graphics Laboratory Dept. of Integrative Structural and Computational Biology, MB-112F The Scripps Research Institute 10550 North Torrey Pines Road La Jolla, CA 92037-1000, USA. tel: +1 (858)784-2055 fax: +1 (858)784-2860 email: fo...@scripps.edu http://www.scripps.edu/~forli/ ________________________________________ From: Brian Adams [adam...@duq.edu] Sent: Monday, June 13, 2016 2:45 PM To: openbabel-discuss@lists.sourceforge.net Subject: [Open Babel] Unity3D + OpenBabel Crashing Hi, I'm having some trouble with some code I'm using in Unity with C#. Simply put, the code attempts to display a ligand and the surrounding protein residues within 5 angstroms. Unfortunately, I'm getting very strange errors and inconsistent ones at that. When I take a gander at my debug log, the stack trace shows the last functions attempted before crash; either GetAtoms() or GetResidue(). Also, when I ran an assembly debug, the error was an access violation from openbabel_csharp at 0x........ The hex didn't indicate that it might have been a null pointer exception issue and I confirmed through some print statements that it really couldn't be possible. Below is the code: /**********************************************************************************************************************/ //ligandVec and proteinVec are lists of Vector3s taken during the main loop so I could do this analysis if (ligandVec.Count != 0 & proteinVec.Count != 0)// simple check for list size ensure no bound issues { for (int i = 0; i < ligandVec.Count; i++) { for (int k = 0; k < proteinVec.Count; k++) { float dis = 5; if (Vector3.Distance (ligandVec [i], proteinVec [k]) <= dis & proteinResAt[k] == true) { //Add all atoms in residue to a tempList to be used later in the toggle section //This is where most of my issues show up where if I were to store the atoms from the residue like so: test = proteinAtom[k].GetResidue().GetAtoms(); //test being a VectorpAtom for(int j = 0; j < test.Count; j ++) tempList.Add(test[j]); } } } } /*********************************************************************************************************************/ I apologize for my code formatting; Outlook hasn't been very accommodating for my code. :/ If anyone has any suggestions or possible solutions I would be very grateful. :) Also, if you have any further questions to explain a bit more feel free. Brian Adams B.A. in Computer Science Duquesne University Phone: 412-926-0430 e-mail: adam...@duq.edu ________________________________ NOTE: This message was trained as non-spam. If this is wrong, please correct the training as soon as possible. ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. http://pubads.g.doubleclick.net/gampad/clk?id=1444514421&iu=/41014381 _______________________________________________ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss