@All
I grab BSZili's code of ARX and build it over GL4ES. At first, it runs, menu works, i can chooice all i need in the menu, but then when level generation starts it crashes the same as crash for Walkero on the ConematicLoad:150 when about to load "akbaa_dream_c.cin"
And there are the crashlog:
Machine model: 9 (AmigaOne X5000/20)
Dump of context at 0xEFDB4000
Trap type: Alignment exception
Current kernel stack pointer: 0x02209760
DSISR: 01000000 DAR: 577D6F67
Page: 0xEFA12540 (Virtual: 0x577D6000, Physical: 0x1B109000, Flags: 0x 102)
Machine State (raw): 0x0002F030
Machine State (verbose): [Critical Ints on] [ExtInt on] [User] [IAT on] [DAT on]
Instruction pointer: 0x7EA36C44
Crashed process: arx_gl4es (0x66D43AA0)
Exception Syndrome Register: 0x01000000
0: 01A6643C 615A4280 00000002 615A4288 7EA36C38 FFFFFFFF 000000B4 0000001C
8: 577D6FFB 61430000 02200000 01A6640C 00000794 615B81BC 6149B098 00000001
16: 66BA19BC 61D9AD70 66D424F0 00000000 615A4DA8 7EA88E2C 0000000A 6149B088
24: 00000000 577D6F4B 00000000 00000000 02410000 61D52000 66D43AA0 614211E0
CR: 22442842 XER: 60000063 CTR: 00000000 LR: 7EA36C38
Disassembly of crash site:
7EA36C34: 485EEB41 bl 0x7F025774
7EA36C38: 3D206143 lis r9,24899
7EA36C3C: 83210204 lwz r25,516(r1)
7EA36C40: C189B300 lfs f12,-19712(r9)
>7EA36C44: C019001C lfs f0,28(r25)
7EA36C48: A079000C lhz r3,12(r25)
7EA36C4C: A099000E lhz r4,14(r25)
7EA36C50: FF806000 fcmpu cr7,f0,f12
7EA36C54: 83990018 lwz r28,24(r25)
7EA36C58: 5463043E rlwinm r3,r3,0,16,31
Temporary stack trace:
#0: 0x7EA36C44
#1: 0x7EA37AF8
#2: 0x7EA318C4
#3: 0x7EA65E00
#4: 0x7EA66574
#5: 0x7EA7B700
#6: 0x7EA89C48
#7: in module newlib.library.kmod+0x00002614 (0x01A5FA74)
#8: in module newlib.library.kmod+0x00003340 (0x01A607A0)
#9: in module newlib.library.kmod+0x00003864 (0x01A60CC4)
#10: 0x7EA1BB40
#11: in module dos.library.kmod+0x00029E18 (0x01958578)
#12: in module kernel+0x0005EDE4 (0x0185EDE4)
#13: in module kernel+0x0005EE5C (0x0185EE5C)
#14: 0x00000000
Kernel command line: serial debuglevel 1
Registers pointing to code:
r0 : native kernel module newlib.library.kmod+0x00008fdc
r4 : [src/cinematic/CinematicLoad.cpp:380] arx_gl4es:_Z14parseCinematicP9CinematicPKcj()+0x28d4 (section 1 @ 0x1CC34)
r9 : module arx_gl4es at 0x61430000 (section 1 @ 0x4FDC)
r10: native kernel module kernel+0x00a00000
r11: native kernel module newlib.library.kmod+0x00008fac
r13: arx_gl4es:AllTLVertex()+0x7100 (section 24 @ 0x72EC)
r15: module LIBS:ogles2.library at 0x00000001 (section 0 @ 0xFFFFFFDC)
r21: [src/core/Startup.cpp:100] arx_gl4es:main()+0x0 (section 1 @ 0x6EE28)
r28: native kernel module bootimage+0x00b17f20
ip : [src/cinematic/CinematicLoad.cpp:90] arx_gl4es:_Z14parseCinematicP9CinematicPKcj()+0x28e0 (section 1 @ 0x1CC40)
lr : [src/cinematic/CinematicLoad.cpp:380] arx_gl4es:_Z14parseCinematicP9CinematicPKcj()+0x28d4 (section 1 @ 0x1CC34)
ctr: unknown (0x00000000)
Stack trace:
(0x615A4280) [src/cinematic/CinematicLoad.cpp:90] arx_gl4es:_Z14parseCinematicP9CinematicPKcj()+0x28e0 (section 1 @ 0x1CC40)
(0x615A4560) [src/cinematic/CinematicLoad.cpp:380] arx_gl4es:_Z14parseCinematicP9CinematicPKcj()+0x28d4 (section 1 @ 0x1CC34)
(0x615A46E0) [src/cinematic/CinematicController.cpp:109] arx_gl4es:_Z22cinematicLaunchWaitingv()+0x1e4 (section 1 @ 0x178C0)
(0x615A4880) [src/core/ArxGame.cpp:1386] arx_gl4es:_ZN7ArxGame7doFrameEv()+0x4e8 (section 1 @ 0x4BDFC)
(0x615A4A00) arx_gl4es:_ZN7ArxGame3runEv()+0x8c (section 1 @ 0x4C570)
(0x615A4A10) [src/core/Core.cpp:250] arx_gl4es:_Z7runGamev()+0xb0 (section 1 @ 0x616FC)
(0x615A4B70) [src/core/Startup.cpp:198] arx_gl4es:main()+0xe1c (section 1 @ 0x6FC44)
(0x615A4D10) native kernel module newlib.library.kmod+0x00002614
(0x615A4D60) native kernel module newlib.library.kmod+0x00003340
(0x615A4F10) native kernel module newlib.library.kmod+0x00003864
(0x615A4F40) arx_gl4es:_start()+0x1e0 (section 1 @ 0x1B3C)
(0x615A4F90) native kernel module dos.library.kmod+0x00029e18
(0x615A4FC0) native kernel module kernel+0x0005ede4
(0x615A4FD0) native kernel module kernel+0x0005ee5c
Disassembly of crash site:
7EA36C34: 485EEB41 bl 0x7F025774
7EA36C38: 3D206143 lis r9,24899
7EA36C3C: 83210204 lwz r25,516(r1)
7EA36C40: C189B300 lfs f12,-19712(r9)
>7EA36C44: C019001C lfs f0,28(r25)
7EA36C48: A079000C lhz r3,12(r25)
7EA36C4C: A099000E lhz r4,14(r25)
7EA36C50: FF806000 fcmpu cr7,f0,f12
7EA36C54: 83990018 lwz r28,24(r25)
7EA36C58: 5463043E rlwinm r3,r3,0,16,31
Stack pointer (0x615A4280) is inside bounds
Redzone is OK (4)
As can be seen crash is "alignment exception" meaning that it probably x5000 specific where we don't have implemented software fallbacks of that crap, so it need to be taken into account into the code itself.
Issue as can be seen from stack trace coming from this part of code:
static res::path fixTexturePath(const std::string & path) {
std::string copy = boost::to_lower_copy(path);
size_t abs_dir = copy.find("arx\\");
if(abs_dir != std::string::npos) {
return res::path::load(copy.substr(abs_dir + 4));
} else {
return res::path::load(copy);
}
}
Strange through .. Maybe stack trace not correct enough.
I may try to test it on my pegasos2 (old radeon9250 + old minigl) and on sam460 (so not x5000 alignment issues , but radeonrx560, so can see if gl4es version will have the same issue as on x5000 there or not).
Edited by kas1e on 2022/7/22 9:28:17
Edited by kas1e on 2022/7/22 9:29:11
Edited by kas1e on 2022/7/22 9:30:12