English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 20 December 2022, 19:23   #1
thyslo
Registered User
 
Join Date: Apr 2018
Location: Germany
Posts: 189
Compiled executable crashes after exit

Im playing around with the old BlitzBasic 2.1, I recently installed it using The Ultimate Blitz Basic 2.1+ CD.

And I noticed that the executables I create always crash some seconds after they seemingly successfully exited to Workbench. It does not happen when I click "Compile & Run" in TED. Then there is no crash.

But when the binary created in TED with "Create executable.." is started from Workbench it crashes, see the attachement.

This is an WinUAE emaulated A1200 with Basic OS3.1 installation.

The code looks like this:
Code:
;Open a screen with 256 colors
Screen 0,0,0,320,256,8,0,"DonkyeKong",1,2
ScreensBitMap 0,0

x = 160 - 8
xmax = 160 + 8
y = 128 - 8
For i=0 To 255
  Plot x,y,i

  x+1

  If x > xmax
    x = 160 - 8
    y+1
  EndIf

Next

MouseWait
End
Has anybody an idea, why it crashes?
Attached Thumbnails
Click image for larger version

Name:	2022-12-20-BlitzBasic-crash.png
Views:	62
Size:	76.5 KB
ID:	77459  
thyslo is offline  
Old 20 December 2022, 20:19   #2
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
You need to have the statement WBStartup in your code (I usually add it at the top). This is needed for Blitz to add the code necessary for handling communications with Workbench. If it's left out, the executable will work fine from the Shell (and directly from Blitz), but will crash when run from Workbench.
Daedalus is offline  
Old 21 December 2022, 08:26   #3
thyslo
Registered User
 
Join Date: Apr 2018
Location: Germany
Posts: 189
Ah this fixed it. And it's a wonderfully easy solution:-)

Thank you very much!
thyslo is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vaporwave Voyager 3.x+ compiled for 68k ShenLong request.Apps 1 14 March 2021 02:05
Can I get my original code from my old compiled projects? vroom6sri Coders. AMOS 6 24 April 2019 20:42
XPM compiled! Noth support.Amix 1 11 May 2016 19:18
Winuae compiled with Intel c/c++ compiler Jgames support.WinUAE 4 29 December 2009 17:41
WinUAE crashes on exit glwxxx support.WinUAE 13 19 August 2006 11:41

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:58.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08830 seconds with 17 queries