Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Can't load image..... Sometimes?

Author
Message
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 22nd Feb 2013 05:05
Hi all,

So Malevolence is in open beta now and has been for a little while, and of our 1000 or so players, about 5 of them are getting hard crashes with an error message saying "could not load image X and line Y"

The image in question is different much of the time, and the crash will happen at various different points in the program. With each of the users that experience this, I've confirmed with them that the image file DOES exist, and that it's not corrupt in any way (they can open it in photo viewer or paint) and there's no common image format, either. Sometimes JPGs, sometimes DDSs, sometimes PNGs, and it's bizarre that it only happens on a handful of machines... It's also not an invalid image number, either, as that is checked before loading the image.

Can anyone shed some light on why this might be happening for some people? The only thing I can think of is that they've run out of video memory, but checking their system usage has shown that's likely not the case, as they've still got plenty to spare...


miso
16
Years of Service
User Offline
Joined: 16th Jun 2010
Location: Budapest, Hungary, 127.0.0.1
Posted: 22nd Feb 2013 08:15
Just a tip. Some videocard doesn't support big image files. These can be asked with commands get maximum texture width and height. If at any point you want to load or make a bigger image or bitmap, dbpro will result a couldn't load/create error message.

No place like 127.0.0.1 .
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 22nd Feb 2013 16:05
That's a nifty fact! Didn't know that! Though the images I'm loading are never greater than 1024x1024... Would that be too large in this instance?


miso
16
Years of Service
User Offline
Joined: 16th Jun 2010
Location: Budapest, Hungary, 127.0.0.1
Posted: 22nd Feb 2013 18:11 Edited at: 22nd Feb 2013 18:54
Ahh, i dont think so. Even the oldest cards of today knows at least 2048x2048 (including intel built-in, integrated gpus, that share system memory...). I don't have a clue then...

No place like 127.0.0.1 .
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 22nd Feb 2013 18:24 Edited at: 22nd Feb 2013 18:29
I'm not sure how you handle your images or objects, but an idea might be to use something along the lines of this to substitute the load image or load object command:



It ensures you only load any file once. If you did this:



The second object would be cloned rather than loaded again. If you did the same with images, the same ID to that image would be returned rather than loading the same image again.

I was having memory problems with my RTS "PonyCraft", and the above worked wonders. Especially the images.

I'm assuming the 5 people that are getting the errors are those hard-core gamers that have been playing for hours. Is this the case?

TheComet

http://blankflankstudios.tumblr.com/
"You're all wrong. You're all idiots." - Fluffy Rabbit
"Bottom line, people are retarded." - Fluffy Rabbit
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 23rd Feb 2013 06:37
Actually no! It's happening to them in the same places whenever they run the game. One of these players then put the game on their laptop and went to the same place and it worked just fine :\

I have a similar memory management system to what you described, too, so it's not that :\

I'm starting to think it might be a video card incompatibility? I opened the forum this morning to find that one of the people experiencing the error updated their video card drivers and the problem stopped...

But that just raises more questions!!


TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 23rd Feb 2013 11:55
I wonder if it's shader related? What happens when they go to that area with all shaders disabled?

TheComet

http://blankflankstudios.tumblr.com/
"You're all wrong. You're all idiots." - Fluffy Rabbit
"Bottom line, people are retarded." - Fluffy Rabbit
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 24th Feb 2013 03:48
No difference. It just comes up with the same error of could not load image.

Never happens with objects. Only images :\


Virtual Nomad
Moderator
20
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 24th Feb 2013 08:13 Edited at: 24th Feb 2013 08:33
just because they can view the images in paint/another program doesn't mean the image isn't suspect in some way as far as dbpro vs a user's system is concerned (see below).

Quote: "Some videocard doesn't support big image files"

and some don't support the full gamut of dimensions (ie, power of 2, etc)

as only you know what's being done under the hood, is there anything special about the list of images being reported?

and, the user with malevolence installed on 2 separate computers has provided you with both images for your scrutiny? has he/she copied the "working" image to the other system and re-tested? installer corruption might be in play here, as well?

and, updating drivers has been (strongly) suggested since the beginning for reasons just like this. we've all had games (i know i've had my share in the past couple decades, atleast) that had anomolies or issues that went away when drivers were updated. that's standard practice that i don't believe warrants "more questions". (out of curiosity, what would some of those questions be?)

one thing comes to mind while reading through the above which is that dbpro has a (not so) funny way of reading images. i recall an update when dbpro started loading images without regard for the filetype extension while, instead, deciding for itself how to go about it.

run this (it shouldn't but it will):

add the ,1 texture flag when loading images 1 or 3 (that don't exist) and you'll get your error (and, note that it will add the final "divide texture" ,0 in reporting...)

...it may or may not have anything to do with your issue, but it might.

seeing how you're using a variety of image types and knowing the photoshop/etc have different ways of saving each filetype, and seeing how dbpro has the funtionality displayed in the code above, and you might have someplace to start your search.

batch converting all your images to a single "standard" filetype (and, of course, replacing references in code) to ensure proper handling and consistency throughout is also something to consider.

looking through the update history might be a place to look, as well, as you'll see image handling begins to change (starting with update 6.0, mostly, where D3D formats are being mentioned).

while i don't envy you, i do wish you happy hunting

Virtual Nomad @ California, USA . DBPro V7.7 . Matrix1Utils 05.27.12
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 24th Feb 2013 11:34
Heh, thanks VN. I'll give it a go.

Getting them to send me their copies of said images would probably be a good place to start. As I said, it's only happening to a very small handful of people, which would heavily insinuate that it's more a problem with their machines and less a problem with my files (a couple of people even re-downloaded in case of corruption and still got the same issues)

I might start there, then run the images through the code you generously provided, and see if it points me in a better direction.


Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 24th Feb 2013 17:16
Sounds suspiciously like there's a resource leak somewhere. if there some old media hanging around still in memory and the game keeps allocating new chunks of video memory, then it'll choke at some point.

CumQuaT
AGK Master
16
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 25th Feb 2013 00:31
Yeah, checked for that... Did a sweep post-garbage-collection of used image slots... Nothing suspicious going on there.


Login to post a reply

Server time is: 2026-07-08 19:19:39
Your offset time is: 2026-07-08 19:19:39