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.

Dark GDK / strange bug with dbFileExist()

Author
Message
Barnski
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: Switzerland, Zurich
Posted: 28th Feb 2006 12:00 Edited at: 28th Feb 2006 13:54
Hi,

I really can't explain why dbFileExist crashed my program, I tried following steps to find out why:

I copied the code (edit; only the one in question) into a new project and tried it: worked.

In my original project, at the place where I used dbFileExist I use fopen to find out whether the file exists: worked.

the code now looks like this, and crashes on the line of dbFileExist:


This is weird, isnt iT?????

The string at runtime in s_full_path is:

edit; the forum cuts out the backslashes hmm but the string is correct, and my function returns true!!

Anyone? Understands? this?
I. Don't.

edit: any idea what I can do to determine the source of the problem?

-- I just started with DarkSDK, by translating DBP Projects. --
Barnski
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: Switzerland, Zurich
Posted: 28th Feb 2006 13:01
I use now following function I made:


What do you think, is it ok for a replacement for dbFileExist?

-- I just started with DarkSDK, by translating DBP Projects. --
Barnski
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: Switzerland, Zurich
Posted: 28th Feb 2006 15:11
I found out what the problem was... took me very long though.

in short: it was a buffer overrun that did not cause a segmentation fault.

any db Functions called afterwards that would need to look at paths/file strings were to fail and crash the program! really weird

now dbFileExist() works superb again

greets,
Barnski.

-- I just started with DarkSDK, by translating DBP Projects. --

Login to post a reply

Server time is: 2024-05-06 08:46:07
Your offset time is: 2024-05-06 08:46:07