GUI:
Code: Select all
...
LAYOUT_AddChild, OBJ(OID_PREVIEW_BTN) = IIntuition->NewObject(ButtonClass, NULL, //"button.gadget",
GA_ID, OID_PREVIEW_BTN,
GA_RelVerify, TRUE,
GA_Underscore, 0,
//GA_Text, "",
BUTTON_BevelStyle, BVS_THIN,
BUTTON_Transparent, TRUE,
BUTTON_RenderImage, OBJ(OID_PREVIEW_IMG) = IIntuition->NewObject(BitMapClass, NULL, //"bitmap.image",
//BITMAP_SourceFile, ROMS"Previews/availablepreview.png",
BITMAP_Screen, screen,
BITMAP_Masking, TRUE,
TAG_DONE),
TAG_DONE),
CHILD_MaxWidth, 256, // pixels width of preview
CHILD_MaxHeight, 224, // pixels height of preview
TAG_DONE),
...
Code: Select all
...
Object *oldobj = OBJ(OID_PREVIEW_IMG);
['filename' has the fullpath of the new PNG image, choosen/clicked in listbrowser]
// Create/set new preview (, dispose old), "reassign" new and refresh window/pagetab
OBJ(OID_PREVIEW_IMG) = IIntuition->NewObject(BitMapClass, NULL, //"bitmap.image",
BITMAP_Masking,TRUE, BITMAP_Screen,pw->WScreen,//screen,
BITMAP_SourceFile,filename, TAG_DONE);
// if( OBJ(OID_PREVIEW_IMG) ) {
// ILayout->SetPageGadgetAttrs(GAD(OID_PREVIEW_BTN), OBJ(OID_GENERAL), pw, NULL, BUTTON_RenderImage,OBJ(OID_PREVIEW_IMG), TAG_DONE); // pagetab
// ILayout->RefreshPageGadget(GAD(OID_PREVIEW_BTN), OBJ(OID_GENERAL), pw, NULL);
IIntuition->DisposeObject(oldobj);
// }
...
Code: Select all
odlobj: 0x591C5834
[HAL_Alert] ALERT! 0x80000003, IP = 0x01AB651C
[_impl_CacheClearU] *** Warning: CacheClearU is deprecated
Dump of context at 0xFFBB1000
Trap type: DSI exception
Machine State (raw): 0x0002F030
Machine State (verbose): [ExtInt on] [User] [FPU on] [IAT on] [DAT on]
Instruction pointer: in module Kickstart/intuition.library.kmod+0x00005ABC (0x01AB651C)
Crashed process: snes9xGUI.debug (0x5A97C1A0)
0: 01AB6514 58986180 00000000 0218972C 6FF5F542 24260000 589862B8 591C5744
8: 591C57AC 02350000 00000000 00000007 28822484 5961F690 00000000 00000000
16: 00000000 81547402 8154740A 28822888 00000000 81547401 8154740D 00000000
24: 591C5438 24260000 6FF5E4D0 00000000 8154740B 00000000 81547403 81547407
CR: 28442888 XER: 00000001 CTR: 01822B14 LR: 01AB6514
ESR: 00000000
DEAR: 24260058
mcsrr0: 0x00000000
csrr0: 0x00000000
Disassembly of crash site:
01AB650C: 7D2903A6 mtctr r9
01AB6510: 4E800421 bctrl
01AB6514: 418E01F4 beq- cr3,0x1AB6708
01AB6518: 3D200235 lis r9,565
>01AB651C: 80990058 lwz r4,88(r25)
01AB6520: 38A00013 li r5,19
01AB6524: 8169B5EC lwz r11,-18964(r9)
01AB6528: 812B1156 lwz r9,4438(r11)
01AB652C: 7D234B78 mr r3,r9
01AB6530: 812902CC lwz r9,716(r9)
..
Kernel command line: debuglevel=4 SERIAL
Registers pointing to code:
r0 : native kernel module Kickstart/intuition.library.kmod+0x00005ab4
r3 : native kernel module Kickstart/kernel.debug+0x0098972c
ip : native kernel module Kickstart/intuition.library.kmod+0x00005abc
lr : native kernel module Kickstart/intuition.library.kmod+0x00005ab4
ctr: native kernel module Kickstart/kernel.debug+0x00022b14
Stack trace:
(0x58986180) native kernel module Kickstart/intuition.library.kmod+0x00005abc
(0x58986240) native kernel module Kickstart/intuition.library.kmod+0x00005ab4
(0x589862B0) module CLASSES:images/bitmap.image at 0x7FD8E3EC (section 0 @ 0x33C8)
(0x589864A0) native kernel module Kickstart/intuition.library.kmod+0x00021448
(0x58986500) native kernel module Kickstart/intuition.library.kmod+0x000215ec
(0x58986580) native kernel module Kickstart/intuition.library.kmod+0x0000a348
(0x589865B0) native kernel module Kickstart/intuition.library.kmod+0x0000a0dc
(0x58986620) [snes9xgui.c:511] snes9xGUI.debug:LaunchShowRom()+0x7c8 (section 1 @ 0x2EB8)
(0x58986680) [gui.c:307] snes9xGUI.debug:ProcessGUI()+0x1014 (section 1 @ 0x4C84)
(0x58986700) [gui.c:998] snes9xGUI.debug:CreateGUIwindow()+0x47f4 (section 1 @ 0x991C)
(0x58986BC0) [snes9xgui.c:236] snes9xGUI.debug:main()+0x57c (section 1 @ 0x14B0)
(0x58986D00) native kernel module Kickstart/newlib.library.kmod+0x000020ac
(0x58986D70) native kernel module Kickstart/newlib.library.kmod+0x00002d5c
(0x58986F10) native kernel module Kickstart/newlib.library.kmod+0x00002ef0
(0x58986F50) snes9xGUI.debug:_start()+0x170 (section 1 @ 0x16C)
(0x58986F90) native kernel module Kickstart/dos.library.kmod+0x000261f8
(0x58986FC0) native kernel module Kickstart/kernel.debug+0x00067bc4
(0x58986FD0) native kernel module Kickstart/kernel.debug+0x00067c0c
...
As you can see in code I don't "show"/paint image (it's commented) to try to find problem/culprit.
And it doesn't happen always it just happens after a couple iconify/uniconify actions and when (re)selecting a new lb's entry.