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 / DBP strings causing a crash

Author
Message
Robert The Robot
19
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 9th Sep 2011 17:50
I'm trying to get the following code to work:



It prints the letter "L" on screen as expected, but then when I press a key to continue, Windows announces that DBPro has stopped working due to an "AppCrash", giving the following message:



It's been a while since I've written anything in DBP, so is this just my code or is it DBP at fault? Not sure which version of DBP I have, under the editor it says 1.075. Any ideas?

We spend our lives chasing dreams. Dark Basic lets us catch some of them.
Mugen Wizardry
User Banned
Posted: 9th Sep 2011 17:54
Its ur fault. I have the newest DBP, and it crashes for me too.

CHECK OUT MY WEBSITE AT http://imageposeidon.com/ !
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 9th Sep 2011 18:38 Edited at: 9th Sep 2011 18:46
I think that's a recognised fault with returning strings from functions in DBPro. Try this instead:



Edit Welcome to The Blank String Bug Club

http://forum.thegamecreators.com/?m=forum_view&t=180151&b=15
http://forum.thegamecreators.com/?m=forum_view&t=147511&b=15
http://forum.thegamecreators.com/?m=forum_view&t=174328&b=15
http://forum.thegamecreators.com/?m=forum_view&t=172931&b=15
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 9th Sep 2011 20:09
Personally, I think the text syncing is a bug as well. I wish it was turned off.

Robert The Robot
19
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 9th Sep 2011 20:50
I knew I should have tried a forum search first

Thanks for showing me how to sidestep the bug, I was spending ages staring at my code wondering what I'd got wrong!

@Pincho Paxton
Text syncing bug?? Haven't come across that one yet...

We spend our lives chasing dreams. Dark Basic lets us catch some of them.
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 9th Sep 2011 21:22
When you use the text command it flashes on, and off unless you mess around with your syncs. It should just wait for the sync in the do loop.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 9th Sep 2011 22:01
Did you use sync on first? That should stop the flashing.
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 9th Sep 2011 22:53 Edited at: 9th Sep 2011 22:56
Yeah I had sync on... I always get flashing unless I put the text at the end by the sync, or put extra syncs in. It's always been a bug since DB.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 9th Sep 2011 23:49
I've never had that problem - except with sync off. Could you provide a simple demo?

Quote: "It's always been a bug since DB."


Strange no-one else has reported it.
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 10th Sep 2011 01:09 Edited at: 10th Sep 2011 01:17
Hmm I checked it out, and it was because I had a sync in my button press code like this...

If mousekey() = 1
Repeat
sync
Until Mousekey() = 0


Which causes the flicker. So it is extra syncs that do it. I think I put that sync in there years ago to get rid of a flicker, and since then the flicker was fixed, and now it causes a flicker.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 10th Sep 2011 01:16
Quote: "So it is extra syncs that do it."


Yes, if you don't print the text each sync you'll get the flicker.

Good news anyway.

Login to post a reply

Server time is: 2026-07-11 14:37:42
Your offset time is: 2026-07-11 14:37:42