Handling Opengl error Out of memory - Support - VTK Discourse
文章推薦指數: 80 %
Hi, I'm trying to make an adaptive volume loader, first trying to load super big volume that will probably not fit into the memory and then ... HandlingOpenglerrorOutofmemory Support mykolav (MykolaVankovych) August13,2020,4:15pm #1 Hi,I’mtryingtomakeanadaptivevolumeloader,firsttryingtoloadsuperbigvolumethatwillprobablynotfitintothememoryandthendecreasethevolumedimensionsandtryagainuntilthevolumeactuallyloads. I’veusedErrorObserverexampletointersepterrormessages,thenIrebuildthevolumedata.Thisgenerallyworks. TheproblemI’veseenhappeniswhenItrytoloadthevolumeofsize23gb,whilemyfreememoryis5gb,Icatch“Outofmemory”,thentrytoload3gbvolume,itstillgives“Outofmemory”eventhoughIhave5gbfree,andonlyonthethirdtrywith0.5gbitloadswithouterror. Thisdoesn’thappenifIloadthesame3gbvolumefromthestart,whatcouldbetheproblem,openglnotreleasingresourcesfastenough,errorhanginginsidethebufferfortoolong?howdoImanuallyfreetheopenglresources? lassoan (AndrasLasso) August13,2020,4:32pm #2 Itisgenerallyapproachedfromtheotherwayaround:youloadalow-resolutionvolumequicklytominimize“timetofirstimage”(importantqualityfactorofimagingsoftware).Then,preferablyinthebackground,youcanloadhigher-resolutionimage. Ingeneral,thereisnowaytosafelyprobetheamountofmemoryavailableonasystembytryingtoallocatememory:yoursoftwaremaygetimmediatelyterminatedifittriestoallocatemorememorythanitispermitted,oryoumaygetvirtualmemoryallocatedthatcausessomuchswappingthatrendersyourentirecomputerunusable.Itisbettertoallowtheusertospecifyamaximummemoryusagelimit(maybeinitializethatlimitfromvaluethatyoudeterminefromsysteminformation;suchasusemaximumof50%oftotalRAMbydefault). Paulo_Carvalho (PauloCarvalho) August14,2020,12:24pm #3 Hi,Mykola, ItseemsI’mmissingsomething.Areyoureferingtomainmemoryorgraphicscardmemory?Thesearedifferentresources.Ifyou’reloadingvolumedatatoRAM,thenthereisnothingOpenGLcandotohelpyou.Youhavetocheckthememorymanagementtechniquesinyourprogram. AnotherreasonforgettingOoMerrorsismemoryfragmentation.Sometimesyouhavemanygigabytesfreeinyoursystem,butthereisnoslotbigenoughforyourbigblock. regards, Paulo mykolav (MykolaVankovych) August14,2020,1:15pm #4 Sorryfortheconfusion,Iwastalkingaboutgraphicscardmemory. Ithinktogotheotherwayandloadlow-resolutionfirstwouldbeamuchbetterapproach,thanks.HowwouldIknowifthevolumewasloadedsuccessfully? I’mstillconfusedwhywhenhaving5gbfreemem,andafterfailingtoload20gbI’malsofailingtoload3gb,eventhoughifIload3gbstraightaway,itworks. mykolav (MykolaVankovych) August14,2020,2:43pm #5 I’vemanagedtofixthenotloading3gbafter23gb.IfItriggertherenderinginbetweendoingtheloading(e.g.Modified()orResetCamera()andthenRender()),thenitworksand3gbisloadedafterthefailurewith23gb.Ithinktheopengljustneedstimetodeallocatethememory?idk… 2Likes
延伸文章資訊
- 1My game (modded) keeps saying "OpenGL Error: 1285 (Out of ...
My game (modded) keeps saying "OpenGL Error: 1285 (Out of memory)" then crashing · Open the launc...
- 2GL Error value 1285: Out of memory - java - Stack Overflow
- 3GL Error value 1285: Out of memory - java - Stack Overflow
Error 1285 apparently means "Out of memory" which is patently absurd since I'm using a 1 megabyte...
- 4OpenGL error 1285 (Out of Memory) on Intel HD systems
I have a number of users with Intel HD systems that crash with OpenGL error 1285 (out of memory)....
- 5OpenGL 1285 Out of Memory Error - Planet Minecraft
I was testing Resource Packs. I installed the Sphax Pure BD x512 res. After I got into single pla...