English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 28 February 2022, 03:55   #1
tygre
Returning fan!
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
Puzzling Crash when Incorporating ClassAct Example

Hi there!

I've been trying to use gadgets provided with the free ClassAct (users, developers) and I'm facing a very puzzling crash (to me!)

I can compile and run the example ClickTabExample.c just fine. When I copy/paste its content into my code, I can compile it but running it always lead to a MuForce hit that I cannot explain

I'm using the same VBCC, the same includes, the same options, etc. as far as I can see... I'm sure that I'm missing something here, could you help please?

Cheers!
Attached Files
File Type: txt AMR ClassAct Hit 1.txt (4.7 KB, 48 views)
File Type: c ClickTabExample.c (3.4 KB, 52 views)
File Type: txt project.options ClickTabExample.txt (692 Bytes, 45 views)
File Type: c rea.c (6.8 KB, 45 views)
File Type: txt project.options AmiModRadio.txt (915 Bytes, 41 views)
tygre is offline  
Old 28 February 2022, 06:56   #2
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,960
Looks like jmp/jsr to not opened library, A6 (base) is null/zero.
Don_Adan is offline  
Old 28 February 2022, 07:31   #3
Minuous
Coder/webmaster/gamer
 
Minuous's Avatar
 
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,631
There is an error in your program (and in the original example): the code calls FreeClickTabNodes() even when the OpenLibrary() on clicktab.gadget was unsuccessful. I've fixed this bug for the next release of the NDK.

But more generally I would recommend using later versions of ReAction classes rather than ones that are decades old. Dozens of bugs have been fixed since then, see eg. the OS3.9, OS3.2, OS3.2.1 changelogs.

Last edited by Minuous; 28 February 2022 at 07:49.
Minuous is online now  
Old 28 February 2022, 20:51   #4
tygre
Returning fan!
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
Hi Don and thanks!

Quote:
Originally Posted by Don_Adan View Post
Looks like jmp/jsr to not opened library, A6 (base) is null/zero.
I will double-check but, as far as I can tell, I open all the needed libraries... the MuForce report does not say which one by chance?

Cheers!
tygre is offline  
Old 28 February 2022, 20:55   #5
tygre
Returning fan!
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
Hi Minuous!

Quote:
Originally Posted by Minuous View Post
There is an error in your program (and in the original example): the code calls FreeClickTabNodes() even when the OpenLibrary() on clicktab.gadget was unsuccessful. I've fixed this bug for the next release of the NDK.

But more generally I would recommend using later versions of ReAction classes rather than ones that are decades old. Dozens of bugs have been fixed since then, see eg. the OS3.9, OS3.2, OS3.2.1 changelogs.
Yes, I had fixed this bug in a previous version but I reverted to the original because I couldn't figure out the crash (and wanted to limit the differences to the minimum)...

Regarding ReAction, I'd like to use it later but right now I'm still learning

Also, on a tangential topic: ClassAct v3.3 is free but I'm not sure that anyone can install ReAction freely too? (I bought copies of AmigaOS v3.2 but I'd like to be as inclusive as possible )

Thanks!
tygre is offline  
Old 28 February 2022, 22:06   #6
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,960
Quote:
Originally Posted by tygre View Post
Hi Don and thanks!



I will double-check but, as far as I can tell, I open all the needed libraries... the MuForce report does not say which one by chance?

Cheers!
No library name, but LVO value can be calculated.
-636
Then library seems to be easy to find. If you check your program code for used LVO values.
Don_Adan is offline  
Old 01 March 2022, 01:43   #7
tygre
Returning fan!
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
Hi Don and thank you so much!

You put me in the right direction: somehow, I didn't open the Intuition and Graphic libraries

Now that I fixed my code, the example works and I can now move on to building my UI

Cheers!
tygre 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
Puzzling: Blitter line drawing faster on second execution Yragael Coders. Asm / Hardware 10 02 June 2019 22:52
ClassAct Developer's Cd NubeCheCorre request.Other 3 11 November 2016 02:37
Puzzling visits of the Guru with Cubic IDE, vbcc 0.8, on ACA1230 tygre Coders. General 15 27 October 2016 02:40
[Solved] Puzzling problem with FTPd tygre support.Apps 3 22 March 2013 21:45
ClassAct 2 dev AmiDevel request.Apps 0 10 January 2011 20: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 17:52.

Top

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