Comments (10)
Can you post the stack trace when this happens?
from fsharp.data.
this is the complete error message (copied from fsi):
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.Text.StringBuilder.ToString()
at FSharp.Data.Runtime.BaseTypes.XmlElement.Create(TextReader reader) in D:\a\FSharp.Data\FSharp.Data\src\FSharp.Data.Xml.Core\XmlRuntime.fs:line 59
at <StartupCode$FSI_0003>.$FSI_0003.main@() in /Users/halilibrahimozcan/source/projects/fsharp_xml_parsing/script.fsx:line 25
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Aufgrund eines Fehlers beendet
Any other way to retrieve info about the error?
from fsharp.data.
Thanks! In this case it seems the size of the string is too big, as this is failing with the internal StringBuilder
used in the XML Reader. Are you running in a 32-bit process?
from fsharp.data.
@cartermp No, I have not configured fsi in any way. I'm running on MacOS if that makes a difference.
from fsharp.data.
Does it matter if the source file encoding is UTF8 or UTF16 ?
from fsharp.data.
@Thorium Can you point to where I should set the encoding? I tried the following:
let text = File.ReadAllText(path, Encoding.UTF32)
which didn't work, unfortunately. UTF16 wasn't available either.
from fsharp.data.
I meant if you have the file as XML, if it's UTF16 then consider converting it to UTF8 to use less memory, e.g. Notepad++ tells you:
from fsharp.data.
@Thorium Hi, I just opened it in Notepad++; The file was encoded in UTF-8 to begin with.
from fsharp.data.
Try using fsiAnyCpu
- fsi
runs 32-bit by default
from fsharp.data.
@dsyme That doesn't seem to be the issue - i ran the script within Rider, which is anycpu by default as I checked. I also ran a console program, but it's still an OutOfMemoryException.
from fsharp.data.
Related Issues (20)
- The design-time type 'FSharp.Data.Runtime.StructuralInference+InferenceMode' utilized by a type provider was not found HOT 8
- Support DateOnly and TimeOnly types HOT 2
- FSharp.Data.Core.Tests.CSharp.csproj: [NU1504] Duplicate 'PackageReference' items found. HOT 2
- s HOT 1
- JsonProvider - writable properties? HOT 1
- When closing VS 2022, the FSharp.Data.DesignTime stays on lock that prevents closing the editor. HOT 1
- Why are the core features (`CommonRuntime` folder) implemented in the Http project? HOT 6
- Question: an F# type provider backed by ML.NET for AI/learning HOT 1
- A way forward with the JsonProvider HOT 17
- Requesting a new beta package published to nuget.org HOT 3
- FSharp.Data.Runtime.Utilities is not published HOT 2
- Preserving linefeed style HOT 3
- A new FSharp.Data.JsonSaveOptions value needed HOT 3
- XmlProvider generates types based on name attribute in XSD schema rather than the type attribute HOT 5
- support empty space separator HOT 1
- update pictures in docs with #r nuget reference (no .dll ref)
- Update FSharp.Core from 5 to 6 or 7, to get less memory usage and better performance HOT 4
- System.Text.Json for JsonProvider? HOT 1
- FS3033: Multiple definition of element error.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fsharp.data.