<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Upon some further investigation, it looks like I pasted the wrong stack trace and exception. This is the correct one.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Exceptions Thrown:<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'>Exception thrown at 0x00007FFEB8F53C58 in vstest.executionengine.exe: Microsoft C++ exception: std::runtime_error at memory location 0x00000052B77796F8.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'>Exception thrown at 0x00007FFEB8F53C58 in vstest.executionengine.exe: Microsoft C++ exception: std::runtime_error at memory location 0x00000052B77765C8.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal>Stack Trace:<o:p></o:p></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'> ntdll.dll!00007ffebbef6124() Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'> KernelBase.dll!00007ffeb8f53acf() Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'> ntdll.dll!00007ffebbefab6d() Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'> ntdll.dll!00007ffebbe99933() Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'> ntdll.dll!00007ffebbef9c8a() Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'> KernelBase.dll!00007ffeb8f53c58() Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'> vcruntime140d.dll!00007ffe90187d80() Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'> OMEFiles.dll!ome::common::module_runtime_path(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &) Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'> OMEFiles.dll!ome::xml::OMEEntityResolver::OMEEntityResolver(void) Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'> OMEFiles.dll!ome::xml::createDocument(class std::basic_istream<char,struct std::char_traits<char> > &,struct ome::common::xml::dom::ParseParameters const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &) Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'> OMEFiles.dll!ome::xml::createDocument(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct ome::common::xml::dom::ParseParameters const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &) Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'> OMEFiles.dll!_guard_dispatch_icall_nop‑() Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'> vcruntime140d.dll!00007ffe901814f0() Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'> vcruntime140d.dll!00007ffe901853aa() Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'> ntdll.dll!00007ffebbefa163() Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'> OMEFiles.dll!ome::files::createOMEXMLMetadata(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &) Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'> OMEFiles.dll!ome::files::in::OMETIFFReader::cacheMetadata(class boost::filesystem::path const &) Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'> OMEFiles.dll!ome::files::in::OMETIFFReader::initFile(class boost::filesystem::path const &) Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'> OMEFiles.dll!ome::files::detail::FormatReader::setId(class boost::filesystem::path const &) Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'>> OMEFiles.dll!OMETIFFReader::open(const char * filepath) Line 43 C++<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b>From:</b> Dennis Ai <br><b>Sent:</b> Wednesday, January 24, 2018 5:55 PM<br><b>To:</b> 'ome-devel@lists.openmicroscopy.org.uk' <ome-devel@lists.openmicroscopy.org.uk><br><b>Subject:</b> [ome-files] Getting Exceptions When Opening Files for setId(...)<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Hello,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I am trying to use ome-files (C++, 0.5.0) for the first time, and am trying to use the setId method to open an existing OME-TIFF on Windows. What path should I be sending to setId(…) for OMETIFFReader? A relative path, an absolute path, or either?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>My function is described below.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'>void open(</span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>const</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>char</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>* </span><span style='font-size:9.5pt;font-family:Consolas;color:gray'>filepath</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'>{<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> std::</span><span style='font-size:9.5pt;font-family:Consolas;color:#2B91AF'>string</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> fp(</span><span style='font-size:9.5pt;font-family:Consolas;color:gray'>filepath</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> boost::filesystem::</span><span style='font-size:9.5pt;font-family:Consolas;color:#2B91AF'>path</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> bfp{ fp };<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> reader</span><span style='font-size:9.5pt;font-family:Consolas;color:teal'>-></span><span style='font-size:9.5pt;font-family:Consolas;color:black'>setId(bfp);<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:Consolas;color:black'>}</span><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I placed a copy of the file at “C:\multi-channel.ome.tiff”. When I pass “C:\\ multi-channel.ome.tiff”, I get the following exceptions.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'>Exception thrown at 0x00007FFEB8F53C58 in vstest.executionengine.exe: Microsoft C++ exception: std::runtime_error at memory location 0x000000BBFE17AD30.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'>Exception thrown at 0x00007FFEB8F53C58 in vstest.executionengine.exe: Microsoft C++ exception: std::runtime_error at memory location 0x000000BBFE178360.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'>Stack Trace: <span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> ntdll.dll!00007ffebbef6124() Unknown<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> KernelBase.dll!00007ffeb8f53acf() Unknown<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> ntdll.dll!00007ffebbefab6d() Unknown<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> ntdll.dll!00007ffebbe99933() Unknown<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> ntdll.dll!00007ffebbef9c8a() Unknown<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> KernelBase.dll!00007ffeb8f53c58() Unknown<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> vcruntime140.dll!00007ffeaea446e2() Unknown<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> OMEFiles.dll!ome::common::module_runtime_path(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &) C++<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> OMEFiles.dll!ome::xml::OMEEntityResolver::OMEEntityResolver(void) C++<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> OMEFiles.dll!ome::xml::createDocument(class boost::filesystem::path const &,struct ome::common::xml::dom::ParseParameters const &) C++<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> OMEFiles.dll!ome::xml::createDocument(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct ome::common::xml::dom::ParseParameters const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &) C++<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> OMEFiles.dll!_guard_dispatch_icall_nop‑() C++<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> vcruntime140.dll!00007ffeaea4c8c0() Unknown<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> vcruntime140.dll!00007ffeaea42e83() Unknown<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> ntdll.dll!00007ffebbefa163() Unknown<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'>> OMEFiles.dll!ome::files::createOMEXMLMetadata(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &) C++<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> OMEFiles.dll!ome::files::in::OMETIFFReader::cacheMetadata(class boost::filesystem::path const &) C++<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> OMEFiles.dll!ome::files::in::OMETIFFReader::initFile(class boost::filesystem::path const &) C++<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> OMEFiles.dll!ome::files::detail::FormatReader::setId(class boost::filesystem::path const &) C++<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> OMEFiles.dll!OMETIFFReader::open(const char * filepath) Line 43 C++<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I then moved the file “C:\Users\...\Documents\Visual Studio 2015\Projects\OMEFilesSharp\OMEFilesSharp.UnitTests\bin\x64\Debug\Resources\multi-channel.ome.tiff”. When I pass “C:\\Users\\...\\Documents\\Visual Studio 2015\\Projects\\OMEFilesSharp\\OMEFilesSharp.UnitTests\\bin\\x64\\Debug\\Resources\\multi-channel.ome.tiff”, I get the following exceptions.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'>Exception thrown at 0x00007FFEB8F53C58 in vstest.executionengine.exe: Microsoft C++ exception: ome::files::tiff::Exception at memory location 0x0000001AED2BB080.<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'>Exception thrown at 0x00007FFEB8F53C58 in vstest.executionengine.exe: Microsoft C++ exception: ome::files::tiff::Exception at memory location 0x0000001AED2BB200.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:Consolas;color:black'>Exception thrown at 0x00007FFEB8F53C58 in vstest.executionengine.exe: Microsoft C++ exception: ome::files::FormatException at memory location 0x0000001AED2BB378.</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'>Stack Trace: <span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'> </span><span style='font-size:9.5pt;font-family:"Courier New"'>ntdll.dll!00007ffebbef6124() Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:"Courier New"'> KernelBase.dll!00007ffeb8f53acf() Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:"Courier New"'> ntdll.dll!00007ffebbefab6d() Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:"Courier New"'> ntdll.dll!00007ffebbe99933() Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:"Courier New"'> ntdll.dll!00007ffebbef9c8a() Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:"Courier New"'> KernelBase.dll!00007ffeb8f53c58() Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:"Courier New"'> vcruntime140.dll!00007ffeaea446e2() Unknown<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:"Courier New"'> OMEFiles.dll!ome::files::in::OMETIFFReader::getTIFF(class boost::filesystem::path const &) C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:"Courier New"'> OMEFiles.dll!ome::files::in::OMETIFFReader::initFile(class boost::filesystem::path const &) C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.5pt;font-family:"Courier New"'> OMEFiles.dll!ome::files::detail::FormatReader::setId(class boost::filesystem::path const &) C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><b>Dennis Ai</b><o:p></o:p></p><p class=MsoNormal><span style='font-size:9.0pt'>Senior Strategic Advisor, SRI Biosciences</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:9.0pt'>SRI International</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:9.0pt'>333 Ravenswood Ave</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:9.0pt'>Menlo Park, CA 94025</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:9.0pt'>(847) 440-4765</span><o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><b><span style='font-size:14.0pt;font-family:"Helvetica",sans-serif'>SRI </span></b><span style='font-size:14.0pt;font-family:"Helvetica",sans-serif'>Biosciences</span><sup><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'>™</span></sup><o:p></o:p></p><p class=MsoNormal><span style='font-size:6.0pt;font-family:"Helvetica",sans-serif'>A DIVISION OF SRI INTERNATIONAL</span><o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>