View Single Post
fread and large amounts of data
Old
  (#1)
Lazy
Member
 
Lazy's Avatar
 
Status: Offline
Posts: 236
Join Date: Jan 2004
Location: Toronto, Ontario, Canada
Default fread and large amounts of data - 15-01-2004

I'm writing a class to make BSP reading easier ( for me anyways ).
The problem is that on certain maps reading the texinfo lump will cause some serious bugs. What's wierd is that it crashes when I try to free memory that the BSP class used ( overloaded delete operator ). If I comment out loading texinfo it works fine.

I know it's a problem with large data amounts because of the following scenario...

1. Tried to load ns_mineshaft - Crash
2. Tried to load ns_siege007 - Worked

Alot of the numbers produced by my class so-far show siege to be quite small as compared to the other maps ( when they loaded ).

Any suggestions?
I already tried using "open" instead of using "fopen" to see if that would help but with no luck. I also do not want to resort to using the windows file I/O functions.

Any help is appreciated.

[ Added ]

Some test data, results are at the bottom of each section.

===========
ns_origin
===========
BSP Version: 30
Models: 202
Vertexes: 27503
Planes: 11196
Leafs: 6303
Nodes: 11418
TexInfo: 14150
ClipNodes: 30181
Result: Crashed
=============
ns_siege007
=============
BSP Version: 30
Models: 104
Vertexes: 5211
Planes: 1140
Leafs: 1065
Nodes: 1728
TexInfo: 337
ClipNodes: 4825
Result: Worked
=========
ns_lost
=========
BSP Version: 30
Models: 116
Vertexes: 17227
Planes: 14198
Leafs: 3488
Nodes: 6490
TexInfo: 3538
ClipNodes: 19090
Result: Worked

Last edited by Lazy; 15-01-2004 at 08:45..
  
Reply With Quote