English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 27 January 2023, 22:50   #1
remz
Registered User
 
Join Date: May 2022
Location: Canada
Posts: 140
Hint about icon preventing program from working

Hi Amiga hardware and os experts,

I would like to have guidance or hints regarding an issue I'm seeing with my game: When I launch it thru CLI, it works. When I launch it thru workbench, with "Show All Files", it works.
But when I added a .icon file, of type Tool, with default stack 4096, it crashes. It displays a blank screen, and nothing happens.

I'm attempting to start looking into initialization code to pinpoint the issue, but would you have "usual suspects" regarding what could make a program fail to load because Workbench launched it as a Tool?
remz is offline  
Old 27 January 2023, 23:18   #2
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,475
Quote:
Originally Posted by remz View Post
Hi Amiga hardware and os experts,

I would like to have guidance or hints regarding an issue I'm seeing with my game: When I launch it thru CLI, it works. When I launch it thru workbench, with "Show All Files", it works.
But when I added a .icon file, of type Tool, with default stack 4096, it crashes. It displays a blank screen, and nothing happens.

I'm attempting to start looking into initialization code to pinpoint the issue, but would you have "usual suspects" regarding what could make a program fail to load because Workbench launched it as a Tool?
I think executable binaries need to have specific wbstartup code linked in them to be launched this way. The other way you ran it from show all files is equivalent to running it in a shell. You can't just randomly give it an icon and expect it to work. You can create an iconx icon to a script to run your executable, however.
Karlos is offline  
Old 27 January 2023, 23:23   #3
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,064
1. Do you handle WB specific startup (get startup message, forbid/reply at the end)?
2. Only have startup/cleanup code active (comment out a call to main or something similar), and see if that works. If it does, startup code is probably ok.
3. Add "tst.w $1234.w" somewhere at start of your program (or anywhere where you want to start debugging), then in winuae debugger add a breakpoint "w 1 1234 2 r", start your program and go through with debugger.
a/b is offline  
Old 28 January 2023, 02:16   #4
remz
Registered User
 
Join Date: May 2022
Location: Canada
Posts: 140
You are definitely right. I switched to doing a dummy script and setting IconX has its default tool: it works. Much simpler than trying to make it WB-friendly.
I am using IconX from wb 1.3 however; because when I tried the version found in wb 2.04, it didn't work on 1.3
remz 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
Running program from icon = current dir is changed 8bitbubsy Coders. Asm / Hardware 11 25 January 2023 17:01
Workbench: dragging files onto the program icon AMIGASYSTEM support.Apps 0 30 September 2020 09:57
Change icon drop thingy program VresiBerba support.Apps 11 28 October 2018 11:07
problem launching my program using an icon Sparticle Coders. C/C++ 4 10 July 2015 15:05
Icon Update program - what do you use? Bloodwych support.Apps 9 22 September 2007 22:54

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 06:14.

Top

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