Re: [Open Babel] Invalid memory access during OBConversion.WriteFile()
Hi, You should probably test the result from SetInAndOutFormats, just to be sure. If that step failed, you're in trouble. Do you get the error regardless of what format you're using for output? Kind regards, Fredrik 4 dec 2012 kl. 10:16 skrev mpillong max.pill...@pharma.ethz.ch: Hmmm, sorry about that, I was using the raw Tag here ... but here's the original text. Hey everyone, I am currently running OpenBabel on a MacOSX 10.6.8 in Eclipse with Java. Recently, I encountered the following exception during using the WriteFile() Method in OBConversion: 'Invalid memory access of location 0xfffb25991558 rip=0x7fff888cb683' I have used the same method to write molecules before, the code looks like this: public static void writeOBMolecule(OBMol mol, String output, String format){ OBConversion obc=new OBConversion(); obc.SetInAndOutFormats(format, format); obc.WriteFile(mol, output); } I have tried multiple *.pdb files, the same error occurs every time (although the location does change every time). Any thoughts on this? Thanks in advance! Max -- View this message in context: http://forums.openbabel.org/Invalid-memory-access-during-OBConversion-WriteFile-tp4655729p4655731.html Sent from the General discussion mailing list archive at Nabble.com. -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Re: [Open Babel] Invalid memory access during OBConversion.WriteFile()
Hey Fredrik, thanks for the input. The SetInAndOutFormat returns true, so I'm guessing there's nothing worng here. I've experienced this error with several inputfiles of varying format (pdb, sdf, mol2). Best regards, Max -- View this message in context: http://forums.openbabel.org/Invalid-memory-access-during-OBConversion-WriteFile-tp4655729p4655735.html Sent from the General discussion mailing list archive at Nabble.com. -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Re: [Open Babel] Invalid memory access during OBConversion.WriteFile()
Ah yes, my bad! Of course, I have also tried different output formats, but the error remains the same! -- View this message in context: http://forums.openbabel.org/Invalid-memory-access-during-OBConversion-WriteFile-tp4655729p4655737.html Sent from the General discussion mailing list archive at Nabble.com. -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Re: [Open Babel] Invalid memory access during OBConversion.WriteFile()
Can you provide a complete program that exhibits the problem? Please make it as small as possible. On 4 December 2012 10:06, mpillong max.pill...@pharma.ethz.ch wrote: Ah yes, my bad! Of course, I have also tried different output formats, but the error remains the same! -- View this message in context: http://forums.openbabel.org/Invalid-memory-access-during-OBConversion-WriteFile-tp4655729p4655737.html Sent from the General discussion mailing list archive at Nabble.com. -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Re: [Open Babel] Invalid memory access during OBConversion.WriteFile()
Sure thing! Is the code sufficient, or would you need a runnable jar? package TestClasses; import org.openbabel.OBConversion; import org.openbabel.OBMol; public class TestOBWriteFile { public static void main(String[] args) { System.load(/Applications/OpenBabel/openbabel-2.2.3/scripts/java/libopenbabel.jnilib); OBMol mol=new OBMol(); OBConversion obc=new OBConversion(); boolean SetSuccessful=obc.SetInAndOutFormats(pdb, pdb); if (SetSuccessful) { obc.ReadFile(mol, /Users/max/propane.pdb); obc.WriteFile(mol, /Users/max/propaneOut.pdb); } } } Thank you so much for your help! Best, Max -- View this message in context: http://forums.openbabel.org/Invalid-memory-access-during-OBConversion-WriteFile-tp4655729p4655739.html Sent from the General discussion mailing list archive at Nabble.com. -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-discuss