c# - Mono Linq to XML throwing SIGSEGV -
i have been banging head against wall on 1 , i'm hoping can kind enough give advice might going wrong code below.
i've got project i'm developing mono 3.0.7 in monodevelop 4.0.9 on linux , project targeting .net 3.5.
i need process xml file want use linq xml make easier work xml file. i'm not having problems generating xml , writing out file. however, when try read things file, mono crashing sigsegv error.
for example, i'd try this:
//load document xdocument indexfile = xdocument.load(indexfilepath); foreach (xelement acctelement in indexfile.descendants("account")) { acctcls acct = new acctcls(acctelement.attribute("acctid").value); acctslist.add(acct); foreach (xelement regionelement in acctelement.descendants("region")) { regioncls region = new regioncls(regionelement.attribute("region").value); acct.regionslist.add(region); } }
i have tried running .net framework , seems run fine. however, when run mono, following error message:
stacktrace: @ <unknown> <0xffffffff> ...my own libraries... @ (wrapper runtime-invoke) <module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <il 0x00050, 0xffffffff> native stacktrace: /usr/bin/mono() [0x4ae331] /usr/bin/mono() [0x503b8b] /usr/bin/mono() [0x4226b2] /usr/lib/libpthread.so.0(+0xf830) [0x7f4f68629830] /usr/bin/mono() [0x4d00d9] /usr/bin/mono() [0x4d5049] /usr/bin/mono() [0x4d5741] /usr/bin/mono() [0x4d583f] /usr/bin/mono() [0x4d67b5] /usr/bin/mono() [0x4d75fc] /usr/bin/mono() [0x4caeea] /usr/bin/mono() [0x4cb03e] ================================================================= got sigsegv while executing native code. indicates fatal error in mono runtime or 1 of native libraries used application. =================================================================
i same error when simple this:
ienumerable acctslist = indexfile.descendants("account"); foreach(xelement acctelmnt in acctslist) { string test = acctelmnt.attribute("acctid").value; }
i've tried putting xmlreader in using statement , passing xmlreader xdocument.load method doesn't either. don't know if relevant or not, happening while i'm debugging code , stepping through it.
i've been googling few hours , racking brains trying everything, can't figure out how work. mono website says supports of linq xml , other people on various forums , sites i'm reading seem have working fine i'm wondering i'm missing. can help?
after playing issue while, figured out problem had trying debug linq xml statement. specifically, seems happen every time try step linq xml statement. if don't step statement, , when run application without debugging, linq xml works fine. think problem has inability load symbols mentioned in comments above.
Comments
Post a Comment