Shared Objects - Help needed

This forum is for general developer support questions.
Post Reply
User avatar
Raziel
Posts: 1170
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Shared Objects - Help needed

Post by Raziel »

Hi devs,

i'm cross-posting this from amigans.net, since not all read everywhere.

I've got a problem with shared objects, namely ones that are created by a third party app (ScummVM to be exact).


Short Version:


Whenever i compile a shared objects build of ScummVM AND it's engines to be plugins aswell (shared objects too), the app will run fine with ONE (and only one) of the .so engines in place.
Whenever there is a second (or more) one (and even without having a game for that second engine installed) ScummVM will bomb on loading the game.

Here is the serial debug log:

Code: Select all

Crash log for task "scummvm" 
Generated by GrimReaper 53.19 
Crash occured in module scummvm at address 0x7EF5E740 
Type of crash: DSI (Data Storage Interrupt) exception 
Alert number: 0x80000003 

Register dump: 
GPR (General Purpose Registers): 
   0: 7EF5E714 5F18D880 93E1000C 4B7CCA08 5F2B5E79 00000003 00000000 76656E67  
   8: 4B7CCA22 00000000 00000000 5F18D880 00000798 5F393E5C 00000000 4E26C000  
  16: 7EE24740 00000000 4DEB29D0 5F2B0DD8 02B30000 02B30000 00000000 00000001  
  24: 6FF8C180 00000001 46844888 00000000 5F2B1850 4B7CCA08 5F3890C4 5F18D880  


FPR (Floating Point Registers, NaN = Not a Number): 
   0:              nan                1                0                1  
   4:                1               -1                1              0.5  
   8:              240              0.5                1       4.5036e+15  
  12:       4.5036e+15      2.14748e+09                0                0  
  16:                0                0                0                0  
  20:                0                0                0                0  
  24:                0                0                0                0  
  28:                0                0                0               -0  

FPSCR (Floating Point Status and Control Register): 0x82004000 


SPRs (Special Purpose Registers): 
           Machine State (msr) : 0x0200B030 
                Condition (cr) : 0x5F42F7FC 
      Instruction Pointer (ip) : 0x7EF5E740 
       Xtended Exception (xer) : 0x49005018 
                   Count (ctr) : 0x6FF494D0 
                     Link (lr) : 0x7FB11920 
            DSI Status (dsisr) : 0x49004DD0 
            Data Address (dar) : 0x021AD048 



680x0 emulated registers: 
DATA: 00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000  
ADDR: 6FFB8700 964B8C00 00000000 00000000 00000000 00000000 00000000 5F18D1A0  
FPU0:                0                0                0                0  
FPU4:                0                0                0                0  



Symbol info: 
Instruction pointer 0x7EF5E740 belongs to module "scummvm" (PowerPC)  
Symbol: _ZN21AmigaOSFilesystemNodeC2ERKN6Common6StringE + 0x108 in section 11 offset 0x00141790 

Stack trace: 
    [backends/fs/amigaos4/amigaos4-fs.cpp:88] scummvm:_ZN21AmigaOSFilesystemNodeC2ERKN6Common6StringE()+0x108 (section 11 @ 0x141790) 
    [backends/fs/amigaos4/amigaos4-fs.cpp:82] scummvm:_ZN21AmigaOSFilesystemNodeC2ERKN6Common6StringE()+0xdc (section 11 @ 0x141764) 
    [common/fs.cpp:45] scummvm:_ZN6Common6FSNodeC2ERKNS_6StringE()+0x134 (section 11 @ 0x36FD94) 
    [base/main.cpp:147] scummvm:_ZL7runGamePK6PluginR7OSystemRKN6Common6StringE()+0x88 (section 11 @ 0x82C4) 
    [base/main.cpp:566] scummvm:scummvm_main()+0xd94 (section 11 @ 0xA204) 
    [backends/platform/sdl/amigaos/amigaos-main.cpp:103] scummvm:main()+0x2e8 (section 11 @ 0x7A78) 
    native kernel module newlib.library.kmod+0x000020a4 
    native kernel module newlib.library.kmod+0x00002d0c 
    native kernel module newlib.library.kmod+0x00002ee8 
    scummvm:_start()+0x170 (section 11 @ 0x1AB8) 
    native kernel module dos.library.kmod+0x000255c8 
    native kernel module kernel+0x000420ac 
    native kernel module kernel+0x000420f4 

PPC disassembly: 
 7ef5e738: 813e8014   lwz               r9,-32748(r30) 
 7ef5e73c: 81290000   lwz               r9,0(r9) 
*7ef5e740: 83a90474   lwz               r29,1140(r9) 
 7ef5e744: 813e8014   lwz               r9,-32748(r30) 
 7ef5e748: 83890000   lwz               r28,0(r9) 

System information: 

CPU  
 Model: P.A. Semi PWRficient PA6T-1682M VB1  
 CPU speed: 1800 MHz  
 FSB speed: 900 MHz  
 Extensions: altivec  

Machine  
 Machine name: AmigaOne X1000  
 Memory: 2097152 KB  
 Extensions: bus.pci bus.pcie
and here is the code where it crashes.
I didn't write that code, so it might be easily outdated and need updating to cover the latest additions to AmigaOS4.
Since i wouldn't be able to do it, i'd be happy if someone could chime in.

Long Version:


A) The Reason

ScummVM offers three possibilities of compiling.
1. Static et al (everything is crunched into one executable) - I'm using this right now for releases.
2. Partly shared (the app itself will use .so's for it's main exe, e.g. libPNG.so, libFLAC.so etc, but will still crunch all the engines into the executable)
3. Shared et al (botht he main exe AND the engines are build as shared objects and "plugins" (which are shared objects of all said engines, e.g. libscumm.so, libsci.so, libqueen.so etc)

Option 3 is what i would love to get running, since the latest engine additions are going to get me close to hit the memory barrier bug in AmigaOS4 (everything over ~750 MB used RAM will crash the system) while linking the ever so growing static executable.


B) The Problem

After struggling with shared objects for a long time i tried to give it a go again.

I built a static binary first and tried to link the engines as plugins ( which are effectively just shared objects themselves), which didn't work (t'was pretty obvious afterwards, since the static binary doesn't have any means to work with shared objects built into it - something learned).

So, i went on to compile a shared test build, with just one engine to speed up compilation and ... it worked, hell yeah, and on the first try too ... yes, and that's about all the good news there was.

After i compiled the whole thing, with all engines, i tried to start the same game from the same engine i tried before, with only one engine in place, and it crashed (on starting the game). Ok, i thought, maybe something went wrong, so i compiled it fresh again with clean and everything ... and it crashed again ...
... after winning more space over my receding hairline by actively thinning it out ... i decided to thin out the engines. I took them out by a couple and tried again ... crash all over again.

Only after i got back to ONE engine, it worked again.
And yes, i tried having different engines in place, ALL of them work, all the different games start and can be played fine, but ONLY if there is NO MORE THAN ONE ENGINE in place!


C) The Layout

The ScummVM environment looks like this:

Code: Select all

scummvm.ini                    1935 ----rw-d Today     19:28:20
scummvm                    24502017 ----rwed Today     11:01:01
2 files - 23M bytes - 5985 blocks used
sobjs/

Code: Select all

Directory "sobjs" on Monday 07-Oct-19
libc.so                       53756 ----rwed Today     19:24:05
libgcc.so                     56324 ----rwed Today     19:23:56
libstdc++.so                5043417 ----rwed Today     19:23:37
libfreetype.so               656552 ----rw-d 22-Sep-19 16:49:07
libcrypto.so.1.0.0          2598179 ----rwed 22-Sep-19 16:49:07
libssl.so.1.0.0              563473 ----rwed 22-Sep-19 16:49:07
librtmp.so.1                 174249 ----rwed 22-Sep-19 16:49:07
libcurl.so.9                 615736 ----rwed 22-Sep-19 16:49:07
libfaad.so                   783998 ----rwed 22-Sep-19 16:49:07
libtheoradec.so              146205 ----rwed 22-Sep-19 16:49:07
libz.so.1                    123244 ----rwed 22-Sep-19 16:49:07
libpng16.so.16              1165184 ----rwed 22-Sep-19 16:49:07
libjpeg.so.12               1466134 ----rwed 22-Sep-19 16:49:07
libmad.so.0.2.1              264482 ----rwed 22-Sep-19 16:49:07
libogg.so.8                   73822 ----rwed 22-Sep-19 16:49:06
libFLAC.so.8.3.0             979368 ----rwed 22-Sep-19 16:49:06
libvorbis.so.0.4.8           206322 ----rwed 22-Sep-19 16:49:06
libvorbisfile.so.3.3.7        47368 ----rwed 22-Sep-19 16:49:06
libpthread.so                234620 ----rw-d 22-Sep-19 16:49:06
libSDL2-2.0.so              5243833 ----rwed 22-Sep-19 16:49:06
libSDL2_net-2.0.so.0         147077 ----rwed 22-Sep-19 16:49:06
21 files - 19M bytes - 5073 blocks used
plugins/

Code: Select all

Directory "plugins_" on Monday 07-Oct-19
libsupernova.so             2383321 ----rwed Today     11:01:21
libbladerunner.so          13561642 ----rwed Today     11:01:17
libzvision.so               2949323 ----rwed Yesterday 13:54:51
libxeen.so                  6208363 ----rwed Yesterday 13:53:25
libwintermute.so            7719758 ----rwed Yesterday 13:51:10
libvoyeur.so                1132344 ----rwed Yesterday 13:47:28
libtucker.so                 970934 ----rwed Yesterday 13:47:02
libtsage.so                13767792 ----rwed Yesterday 13:46:43
libtouche.so                 971410 ----rwed Yesterday 13:43:30
libtoon.so                  1674477 ----rwed Yesterday 13:43:11
libtony.so                  2731781 ----rwed Yesterday 13:42:32
libtoltecs.so               1228847 ----rwed Yesterday 13:41:44
libtitanic.so              27242739 ----rwed Yesterday 13:41:16
libtinsel.so                3486628 ----rwed Yesterday 13:21:46
libteenagent.so             1597333 ----rwed Yesterday 13:20:23
libsword25.so               2892651 ----rwed Yesterday 13:19:51
libsword2.so                2134218 ----rwed Yesterday 13:18:27
libsword1.so                1895003 ----rwed Yesterday 13:17:32
libsky.so                   1323686 ----rwed Yesterday 13:16:26
libsherlock.so              5963398 ----rwed Yesterday 13:15:51
libsci.so                  12835439 ----rwed Yesterday 13:13:27
libsaga.so                  3589950 ----rwed Yesterday 13:09:12
libqueen.so                 1814289 ----rwed Yesterday 13:07:57
libprince.so                1798393 ----rwed Yesterday 13:07:18
libplumbers.so               250902 ----rwed Yesterday 13:06:26
libpegasus.so               9582023 ----rwed Yesterday 13:06:19
libparallaction.so          3004774 ----rwed Yesterday 12:53:38
libneverhood.so             5335316 ----rwed Yesterday 12:52:32
libmortevielle.so            876089 ----rwed Yesterday 11:36:03
libmohawk.so                6007766 ----rwed Yesterday 11:35:41
libmads.so                  9159724 ----rwed Yesterday 11:33:41
libmade.so                  1004320 ----rwed Yesterday 11:30:59
liblure.so                  2659199 ----rwed Yesterday 11:30:36
liblab.so                   1163625 ----rwed Yesterday 11:29:50
libkyra.so                 11400662 ----rwed Yesterday 11:29:19
libillusions.so             4165765 ----rwed Yesterday 11:24:50
libhugo.so                  1709684 ----rwed Yesterday 11:23:01
libhopkins.so               2121935 ----rwed Yesterday 11:22:18
libhdb.so                   3062964 ----rwed Yesterday 11:21:42
libgroovie.so               1034604 ----rwed Yesterday 11:21:00
libgob.so                   7502234 ----rwed Yesterday 11:20:36
libgnap.so                  2379065 ----rwed Yesterday 11:17:16
libfullpipe.so              4783262 ----rwed Yesterday 11:16:30
libdreamweb.so              1368015 ----rwed Yesterday 11:14:18
libdrascula.so              1035307 ----rwed Yesterday 11:13:41
libdraci.so                 1137969 ----rwed Yesterday 11:13:15
libcryomni3d.so             2475039 ----rwed Yesterday 11:12:49
libcruise.so                1435256 ----rwed Yesterday 11:12:05
libcomposer.so              1047458 ----rwed Yesterday 11:11:17
libcine.so                  1687808 ----rwed Yesterday 11:11:02
libcge2.so                  1196854 ----rwed Yesterday 11:10:27
libcge.so                   1056158 ----rwed Yesterday 11:09:55
libbbvs.so                  1304474 ----rwed Yesterday 11:01:50
libagos.so                  3708532 ----rwed Yesterday 11:01:14
libagi.so                   2945395 ----rwed Yesterday 10:59:44
libadl.so                   2042577 ----rwed Yesterday 10:58:30
libaccess.so                2389374 ----rwed Yesterday 10:57:57
libscumm.so                11022310 ----rwed Yesterday 10:56:57
58 files - 224M bytes - 57444 blocks used

D) The Solution

Yes, i really would like to get one, maybe even one which i could use immediately.
But i'd be fine with one that would mean to fix a bug somewhere in AmigaOS4, just so i know it wasn't me who messed up.
And finally i'd be also fine to know that i messed up, just tell me what is going on there and how i can fix it.


E) Notes

1) I don't think memory is running out (a RAM docky isn't indicating anything) but that doesn't mean i'm right, of course. There could be something fragmenting the memory in the background or some other weird s*** is going on.
2) It doesn't matter which engine is in place (one of the bigger ones, one of the smaller ones - it will always work with ONE engine) and also, if two (or more) large or two (or more) small engines are grouped together (it will always crash with more than one).
3) I checked and fixed another problem with an outdated libc.so i had (thanks to broadblues) but that didn't fix this behaviour/crash.
4) salass00 over at amigans.net suspects a NULL DOS pointer. But why it happens with more than one .so, while it works with one is beyond me?
This is what i get on serial when reading out IDOS, newlib and the used path:

Code: Select all

IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: scummvm.ini
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: plugins
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: /usr/local/lib/scummvm
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Development:Coding/Ports/VM/scummvm-test/plugins/
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:ScummVM/themes/
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:ScummVM/themes/translations.dat
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: scummremastered
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:ScummVM/themes/
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:ScummVM/themes/THEMERC
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:ScummVM/themes/scummamigaos4/THEMERC
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:ScummVM/themes/scummamigaos4/fonts/THEMERC
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:ScummVM/themes/scummamigaos4/fonts/topaz/THEMERC
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:ScummVM/themes/scummamigaos4/fonts/topaz/topazlt/THEMERC
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:ScummVM/themes/fonts/THEMERC
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:ScummVM/themes/fonts/topaz/THEMERC
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:ScummVM/themes/fonts/topaz/topazlt/THEMERC
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: /usr/local/share/scummvm
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:ScummVM/themes/scummremastered.zip
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:ScummVM/themes/scummremastered.zip
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:ScummVM/extras/
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:ScummVM/extras/
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:ScummVM/extras/
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:ScummVM/extras/
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:ScummVM/extras/
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:GamesVM/AGI/Enclosure/
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:GamesVM/Sierra/Space Quest/The Pirates of Pestulon/
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:GamesVM/Westwood Studios/Blade Runner/
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: Games:GamesVM/Lucas Arts/Monkey Island/LeChuck's Revenge/
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: scummvm.ini
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
String: scummvm.ini
IDOS: 0x00000000
Minimum newlib version: 52.20
String: Games:GamesVM/Lucas Arts/Monkey Island/LeChuck's Revenge/
Dump of context at 0xDF7FA000
Trap type: DSI exception
Machine State (raw): 0x100000000200B030
Machine State (verbose): [Hyper] [ExtInt on] [Super] [FPU on] [IAT on] [DAT on]
Instruction pointer: 0x7EF6714C
Crashed process: scummvm (0x4E5C37E0)
DSI verbose error description: Access not found in hash or BAT (page fault)
Access was a load operation
 0: 7EF67120 4797A890 38C00000 4B59E038 47A8DEEF 00000003 0000004C 6875636B
 8: 4B59E040 00000000 00000000 4797A890 00000798 49C72D0C 00000000 46F5F340
16: 7EE2D10C 00000000 4DB6B9D0 47A88DD8 02B30000 02B30000 00000000 00000001
24: 6FF8C180 00000001 57955999 00000000 02973054 4B59E038 49C67DB8 4797A890
CR: 5B953399   XER: A0000054  CTR: 00000000  LR: 7EF67120
DSISR: 40000000  DAR: 00000474

FP0 : FFF8000082004000 3FF0000000000000 0000000000000000 3FF0000000000000
FP4 : 3FF0000000000000 BFF0000000000000 3FF0000000000000 3FE0000000000000
FP8 : 406E000000000000 3FE0000000000000 3FF0000000000000 43300000800001E0
FP12: 4330000080000280 41E0000000000000 0000000000000000 0000000000000000
FP16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FP20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FP24: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FP28: 0000000000000000 0000000000000000 0000000000000000 8000000000000000
FPSCR: 82004000
HID0: 0x8000000000000000  HID1: 0x000000005CE993B1
HID4: 0x4400240000080180  HID5: 0x0000006600000080

V0 : 00000000000000000000000000000000 00000000000000000000000000000000
V2 : FE01D629FE01D629FE01D629FE01D629 FE01D629FE01D629FE01D629FE01D629
V4 : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF D62AD62AD62AD62AD62AD62AD62AD62A
V6 : FF01D729FF01D729FF01D729FF01D729 FE01D629FE01D629FE01D629FE01D629
V8 : 00000000000000000000000000000000 D52AD52AD52AD52AD52AD52AD52AD52A
V10: FFD6D7D6FFD6D7D6FFD6D7D6FFD6D7D6 00000000000000000000000000000000
V12: 00000000000000000000000000000000 00000000000000000000000000000000
V14: 001002120414061608180A1A0C1C0E1E 01000100010001000100010001000100
V16: FF000000FF000000FF000000FF000000 FFD6D7D6FFD6D7D6FFD6D7D6FFD6D7D6
V18: FE01D629FE01D629FE01D629FE01D629 00000000000000000000000000000000
V20: 00000000000000000000000000000000 00000000000000000000000000000000
V22: 00000000000000000000000000000000 00000000000000000000000000000000
V24: 00000000000000000000000000000000 00000000000000000000000000000000
V26: 00000000000000000000000000000000 00000000000000000000000000000000
V28: 00000000000000000000000000000000 00000000000000000000000000000000
V30: 00000000000000000000000000000000 00000000000000000000000000000000
VSCR: 00000000 VRSAVE: 00000000

Disassembly of crash site:
 7EF6713C: 39400000   li                r10,0
 7EF67140: 99490049   stb               r10,73(r9)
 7EF67144: 813E8018   lwz               r9,-32744(r30)
 7EF67148: 81290000   lwz               r9,0(r9)
>7EF6714C: 83A90474   lwz               r29,1140(r9)
 7EF67150: 813E8018   lwz               r9,-32744(r30)
 7EF67154: 83890000   lwz               r28,0(r9)
 7EF67158: 813F0028   lwz               r9,40(r31)
 7EF6715C: 39290028   addi              r9,r9,40
 7EF67160: 7D234B78   mr                r3,r9

Kernel command line: serial munge debuglevel=1

Registers pointing to code:
r0 : [backends/fs/amigaos4/amigaos4-fs.cpp:94] scummvm:_ZN21AmigaOSFilesystemNodeC2ERKN6Common6StringE()+0x198 (section 11 @ 0x1417A4)
r13: scummvm:_ZZN7MT32Emu6Tables11getInstanceEvE8instance()+0x86c (section 32 @ 0x7B28)
r16: scummvm:main()+0x0 (section 11 @ 0x7790)
r20: native kernel module graphics.library.kmod+0x00860580
r21: native kernel module graphics.library.kmod+0x00860580
r23: module wait at 0x00000001 (section 0 @ 0xFFFFFFDC)
r25: module wait at 0x00000001 (section 0 @ 0xFFFFFFDC)
r28: native kernel module kernel+0x00973054
r30: scummvm:logo_data()+0x1804 (section 26 @ 0x33F4)
ip : [backends/fs/amigaos4/amigaos4-fs.cpp:100] scummvm:_ZN21AmigaOSFilesystemNodeC2ERKN6Common6StringE()+0x1c4 (section 11 @ 0x1417D0)
lr : [backends/fs/amigaos4/amigaos4-fs.cpp:94] scummvm:_ZN21AmigaOSFilesystemNodeC2ERKN6Common6StringE()+0x198 (section 11 @ 0x1417A4)
ctr: unknown (0x00000000)

Stack trace:
(0x4797A890) [backends/fs/amigaos4/amigaos4-fs.cpp:100] scummvm:_ZN21AmigaOSFilesystemNodeC2ERKN6Common6StringE()+0x1c4 (section 11 @ 0x1417D0)
(0x4797A8D0) [backends/fs/amigaos4/amigaos4-fs.cpp:94] scummvm:_ZN21AmigaOSFilesystemNodeC2ERKN6Common6StringE()+0x198 (section 11 @ 0x1417A4)
(0x4797A8F0) [common/fs.cpp:45] scummvm:_ZN6Common6FSNodeC2ERKNS_6StringE()+0x134 (section 11 @ 0x3720A4)
(0x4797A930) [base/main.cpp:147] scummvm:_ZL7runGamePK6PluginR7OSystemRKN6Common6StringE()+0x88 (section 11 @ 0x8240)
(0x4797AE20) [base/main.cpp:566] scummvm:scummvm_main()+0xd94 (section 11 @ 0xA180)
(0x47A220D0) [backends/platform/sdl/amigaos/amigaos-main.cpp:79] scummvm:main()+0x264 (section 11 @ 0x79F4)
(0x47A22D00) native kernel module newlib.library.kmod+0x000020a4
(0x47A22D70) native kernel module newlib.library.kmod+0x00002d0c
(0x47A22F10) native kernel module newlib.library.kmod+0x00002ee8
(0x47A22F50) scummvm:_start()+0x170 (section 11 @ 0x1AB8)
(0x47A22F90) native kernel module dos.library.kmod+0x000255c8
(0x47A22FC0) native kernel module kernel+0x000420ac
(0x47A22FD0) native kernel module kernel+0x000420f4

Disassembly of crash site:
 7EF6713C: 39400000   li                r10,0
 7EF67140: 99490049   stb               r10,73(r9)
 7EF67144: 813E8018   lwz               r9,-32744(r30)
 7EF67148: 81290000   lwz               r9,0(r9)
>7EF6714C: 83A90474   lwz               r29,1140(r9)
 7EF67150: 813E8018   lwz               r9,-32744(r30)
 7EF67154: 83890000   lwz               r28,0(r9)
 7EF67158: 813F0028   lwz               r9,40(r31)
 7EF6715C: 39290028   addi              r9,r9,40
 7EF67160: 7D234B78   mr                r3,r9
Stack pointer (0x4797A890) is inside bounds
Redzone is OK (4)

68k register dump
DATA: 00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000
----> 00000001 - "wait" Hunk 0000 Offset 00000000 (SegList: 0x11E20CF5)
ADDR: 6FFB8700 93BEC100 00000000 00000000 00000000 00000000 00000000 4797A1B0
Page information:
Page not found
5) If you need any more info, please let me know and i'll add asap.

This is config.mk and ultimately the linker line used:

Code: Select all

# -------- Generated by configure -----------

CXX := g++
CXXFLAGS := -std=gnu++11  -W -Wno-unused-parameter -Wno-empty-body -gstabs -fvar-tracking-assignments -pedantic -Wno-long-long -Wno-format -fPIC -I/SDK/local/common/include/freetype2
LD := g++
LIBS += -lSDL2_net -L/SDK/local/newlib/lib -use-dynld -lSDL2 -lpthread -use-dynld -lm  -lvorbisfile -lvorbis  -lFLAC  -logg  -lmad  -ljpeg -lpng -lz  -ltheoradec  -lfaad -lz  -lmpeg2  -la52 -L/SDK/local/newlib/lib -lcurl -lrtmp -lssl -lcrypto -lpthread -lz -lpthread -L/SDK/local/newlib/lib -lfreetype 
RANLIB := ranlib
STRIP := strip
AR := ar cru
AS := as
ASFLAGS := 
DWP := dwp
WINDRES := windres
WINDRESFLAGS := 
STAGINGPATH=staging
WIN32PATH=c:/scummvm
AMIGAOSPATH=Games:ScummVM
STATICLIBPATH=
XCODETOOLSPATH=
SPARKLEPATH=
SDLCONFIG=/SDK/local/newlib/bin/sdl2-config

ABI := 

BACKEND := sdl
MODULES += backends/platform/sdl
MODULE_DIRS += 
EXEPRE := 
EXEEXT := 
NASM := 
NASMFLAGS := 
PANDOC := 
PANDOCFORMAT := plain
PANDOCEXT := 
ZLIB_LIBS := -lz
ZLIB_CFLAGS := 

prefix = /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
libdir = ${exec_prefix}/lib
datarootdir = ${prefix}/share
datadir = ${datarootdir}/scummvm
mandir = ${datarootdir}/man
docdir = ${datarootdir}/doc/scummvm


HAVE_GCC = 1
HAVE_GCC3 = 1
CXX_UPDATE_DEP_FLAG = -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" -MQ "$@" -MP
AMIGAOS = 1
SDL_BACKEND = 1
USE_SDL2 = 1
USE_SDL_NET = 1
# VERBOSE_BUILD = 1
# USE_ELF_LOADER = 1
DYNAMIC_MODULES = 1
PLUGIN_PREFIX := lib
PLUGIN_SUFFIX := .so
USE_MT32EMU = 1
USE_LUA = 1
DISABLE_NUKED_OPL = 1
USE_RGB_COLOR = 1
USE_HIGHRES = 1
USE_SAVEGAME_TIMESTAMP = 1
USE_SCALERS = 1
USE_HQ_SCALERS = 1
USE_OGG = 1
USE_VORBIS = 1
# USE_TREMOR = 1
# ENABLE_OPL2LPT = 1
USE_FLAC = 1
USE_MAD = 1
# USE_ALSA = 1
USE_JPEG = 1
USE_PNG = 1
USE_THEORADEC = 1
USE_FAAD = 1
USE_ZLIB = 1
USE_MPEG2 = 1
USE_A52 = 1
USE_LIBCURL = 1
USE_CLOUD = 1
# USE_FLUIDSYNTH = 1
USE_FREETYPE2 = 1
USE_OPENGL = 1
ICONV_USES_CONST = 1
USE_ICONV = 1
# USE_NASM = 1
# USE_PANDOC = 1
# ENABLE_VKEYBD = 1
# ENABLE_KEYMAPPER = 1
ENABLE_EVENTRECORDER = 1
USE_TRANSLATION = 1
# USE_TASKBAR = 1
# USE_SYSDIALOGS = 1
# USE_TTS = 1
USE_BINK = 1
# USE_UPDATES = 1
ENABLE_ACCESS = DYNAMIC_PLUGIN
ENABLE_ADL = DYNAMIC_PLUGIN
ENABLE_AGI = DYNAMIC_PLUGIN
ENABLE_AGOS = DYNAMIC_PLUGIN
ENABLE_AGOS2 = 1
# ENABLE_AVALANCHE
ENABLE_BBVS = DYNAMIC_PLUGIN
ENABLE_BLADERUNNER = DYNAMIC_PLUGIN
ENABLE_CGE = DYNAMIC_PLUGIN
ENABLE_CGE2 = DYNAMIC_PLUGIN
# ENABLE_CHEWY
ENABLE_CINE = DYNAMIC_PLUGIN
ENABLE_COMPOSER = DYNAMIC_PLUGIN
ENABLE_CRUISE = DYNAMIC_PLUGIN
# ENABLE_CRYO
ENABLE_CRYOMNI3D = DYNAMIC_PLUGIN
ENABLE_VERSAILLES = 1
# ENABLE_DIRECTOR
# ENABLE_DM
ENABLE_DRACI = DYNAMIC_PLUGIN
ENABLE_DRASCULA = DYNAMIC_PLUGIN
ENABLE_DREAMWEB = DYNAMIC_PLUGIN
ENABLE_FULLPIPE = DYNAMIC_PLUGIN
# ENABLE_GLK
ENABLE_GNAP = DYNAMIC_PLUGIN
ENABLE_GOB = DYNAMIC_PLUGIN
ENABLE_GROOVIE = DYNAMIC_PLUGIN
# ENABLE_GROOVIE2
ENABLE_HDB = DYNAMIC_PLUGIN
ENABLE_HOPKINS = DYNAMIC_PLUGIN
ENABLE_HUGO = DYNAMIC_PLUGIN
ENABLE_ILLUSIONS = DYNAMIC_PLUGIN
ENABLE_KYRA = DYNAMIC_PLUGIN
ENABLE_LOL = 1
ENABLE_EOB = 1
ENABLE_LAB = DYNAMIC_PLUGIN
# ENABLE_LASTEXPRESS
# ENABLE_LILLIPUT
ENABLE_LURE = DYNAMIC_PLUGIN
# ENABLE_MACVENTURE
ENABLE_MADE = DYNAMIC_PLUGIN
ENABLE_MADS = DYNAMIC_PLUGIN
ENABLE_MOHAWK = DYNAMIC_PLUGIN
# ENABLE_CSTIME
ENABLE_RIVEN = 1
ENABLE_MYST = 1
ENABLE_MYSTME = 1
ENABLE_MORTEVIELLE = DYNAMIC_PLUGIN
# ENABLE_MUTATIONOFJB
ENABLE_NEVERHOOD = DYNAMIC_PLUGIN
ENABLE_PARALLACTION = DYNAMIC_PLUGIN
ENABLE_PEGASUS = DYNAMIC_PLUGIN
# ENABLE_PINK
ENABLE_PLUMBERS = DYNAMIC_PLUGIN
ENABLE_PRINCE = DYNAMIC_PLUGIN
ENABLE_QUEEN = DYNAMIC_PLUGIN
ENABLE_SAGA = DYNAMIC_PLUGIN
ENABLE_IHNM = 1
# ENABLE_SAGA2
ENABLE_SCI = DYNAMIC_PLUGIN
ENABLE_SCI32 = 1
ENABLE_SCUMM = DYNAMIC_PLUGIN
ENABLE_SCUMM_7_8 = 1
ENABLE_HE = 1
ENABLE_SHERLOCK = DYNAMIC_PLUGIN
ENABLE_SKY = DYNAMIC_PLUGIN
# ENABLE_SLUDGE
# ENABLE_STARTREK
ENABLE_SUPERNOVA = DYNAMIC_PLUGIN
ENABLE_SWORD1 = DYNAMIC_PLUGIN
ENABLE_SWORD2 = DYNAMIC_PLUGIN
ENABLE_SWORD25 = DYNAMIC_PLUGIN
ENABLE_TEENAGENT = DYNAMIC_PLUGIN
# ENABLE_TESTBED
ENABLE_TINSEL = DYNAMIC_PLUGIN
ENABLE_TITANIC = DYNAMIC_PLUGIN
ENABLE_TOLTECS = DYNAMIC_PLUGIN
ENABLE_TONY = DYNAMIC_PLUGIN
ENABLE_TOON = DYNAMIC_PLUGIN
ENABLE_TOUCHE = DYNAMIC_PLUGIN
ENABLE_TSAGE = DYNAMIC_PLUGIN
ENABLE_TUCKER = DYNAMIC_PLUGIN
ENABLE_VOYEUR = DYNAMIC_PLUGIN
# ENABLE_WAGE
ENABLE_WINTERMUTE = DYNAMIC_PLUGIN
ENABLE_XEEN = DYNAMIC_PLUGIN
ENABLE_ZVISION = DYNAMIC_PLUGIN

INCLUDES += -I/SDK/local/newlib/include/SDL2 -D_REENTRANT             -I/SDK/local/common/include 
OBJS += 
DEFINES += -DPPC_TARGET -DSDL_BACKEND -DDATA_PATH=\"${datarootdir}/scummvm\" -DPLUGIN_DIRECTORY=\"${exec_prefix}/lib/scummvm\"
LDFLAGS += -athread=native -Wl,--no-keep-memory -L/sdk/local/newlib/lib -Wl,--export-dynamic -L/sdk/local/newlib/lib


PLUGIN_EXTRA_DEPS =
PLUGIN_LDFLAGS  += -shared
PRE_OBJS_FLAGS  := -Wl,-export-dynamic -Wl,-whole-archive
POST_OBJS_FLAGS := -Wl,-no-whole-archive


port_mk = backends/platform/sdl/amigaos/amigaos.mk

SAVED_CONFIGFLAGS       := --enable-plugins --default-dynamic
SAVED_AR                := 
SAVED_AS                := 
SAVED_ASFLAGS           := 
SAVED_CPPFLAGS          := 
SAVED_CXX               := 
SAVED_CXXFLAGS          := -std=gnu++11
SAVED_DWP               := 
SAVED_LD                := ld
SAVED_LDFLAGS           := -athread=native -Wl,--no-keep-memory -L/sdk/local/newlib/lib
SAVED_PKG_CONFIG_LIBDIR := /sdk/local/newlib/lib/pkgconfig/
SAVED_RANLIB            := 
SAVED_SDL_CONFIG        := 
SAVED_STRIP             := 
SAVED_WINDRES           := 
SAVED_WINDRESFLAGS      := 
Thank you very much
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
User avatar
Raziel
Posts: 1170
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Re: Shared Objects - Help needed

Post by Raziel »

I should start to write lenghty posts more often...

Some minutes after i finished this one i got an answer over at amigans.net, which fixed the crash. (Thank you, kas1e!)

I had to put a manual load of dos.library and it's IDOS interface to the code.

Code: Select all

AmigaOSFilesystemNode::AmigaOSFilesystemNode(const Common::String &p) {
	ENTER();

	// Open dos.library and it's IDOS interface
	DOSBase=IExec->OpenLibrary("dos.library",0);
	IDOS = (struct DOSIFace *)IExec->GetInterface(DOSBase, "main", 1, NULL);
	
	int offset = p.size();

	//assert(offset > 0);

	if (offset <= 0) {
		debug(6, "Bad offset");
		return;
	}

	_sPath = p;
	_sDisplayName = ::lastPathComponent(_sPath);
	_pFileLock = 0;
	_bIsDirectory = false;
	_bIsValid = false;

	// Check whether the node exists and if it's a directory.
	struct ExamineData * pExd = IDOS->ExamineObjectTags(EX_StringNameInput,_sPath.c_str(),TAG_END);
	if (pExd) {
		_nProt = pExd->Protection;
		if (EXD_IS_DIRECTORY(pExd)) {
			_bIsDirectory = true;
			_pFileLock = IDOS->Lock((CONST_STRPTR)_sPath.c_str(), SHARED_LOCK);
			_bIsValid = (_pFileLock != 0);

			// Add a trailing slash if needed.
			const char c = _sPath.lastChar();
			if (c != '/' && c != ':')
				_sPath += '/';
		} else {
			//_bIsDirectory = false;
			_bIsValid = true;
		}

		IDOS->FreeDosObject(DOS_EXAMINEDATA, pExd);
	}

	// Close dos.library and it's IDOS interface again.
	IExec->DropInterface((struct Interface *)IDOS);
	IExec->CloseLibrary(DOSBase);

	LEAVE();
}
Should this have been in there in the first place or might this be a bug in the shared objects handling of AmigaOS4?
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
User avatar
Raziel
Posts: 1170
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Re: Shared Objects - Help needed

Post by Raziel »

Ultimately it was a bug in newlib.library 53.30...which has been fixed already in beta...

sooo, when do we get a new OS release with all those bugs fixed?
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 530
Joined: Sat Jun 18, 2011 3:12 pm
Location: Finland
Contact:

Re: Shared Objects - Help needed

Post by salass00 »

@Raziel

Could you also output the value of &IDOS?

Code: Select all

IExec->DebugPrintF("&IDOS: %#p\n", &IDOS);
This would say if something is just overwriting the value of IDOS or if it's being shadowed by another IDOS declaration, or there could be a problem with the relocation not working in this one instance(?).
User avatar
OldFart
Posts: 100
Joined: Tue Jul 12, 2011 2:56 pm
Location: Groningen, Netherlands

Re: Shared Objects - Help needed

Post by OldFart »

Raziel wrote:

Code: Select all

AmigaOSFilesystemNode::AmigaOSFilesystemNode(const Common::String &p) {
	ENTER();

	// Open dos.library and it's IDOS interface
	DOSBase=IExec->OpenLibrary("dos.library",0);
	IDOS = (struct DOSIFace *)IExec->GetInterface(DOSBase, "main", 1, NULL);
	
	int offset = p.size();

	//assert(offset > 0);

	if (offset <= 0) {
		debug(6, "Bad offset");
		return;
	}
This part contains a small niggle. In the rare(?) occasion that p.size <= 0, both dos.library and its main interface remain open.

I think it would be better to swap a few lines:

Code: Select all

AmigaOSFilesystemNode::AmigaOSFilesystemNode(const Common::String &p) {
	ENTER();
	int offset = p.size();

	//assert(offset > 0);

	if (offset <= 0) {
		debug(6, "Bad offset");
		return;
	}
	// Open dos.library and it's IDOS interface
	DOSBase=IExec->OpenLibrary("dos.library",0);
	IDOS = (struct DOSIFace *)IExec->GetInterface(DOSBase, "main", 1, NULL);
A minor niggle, as I said. Interesing subject though.

OldFart
X5000, appears to be sick. Dismantled jan 1, 2024.
Dead MicroA1
A1200 in ElBox, c/w Blizzard '040 @ 50MHz + SCSI module, ZIV-board c/w (o.a.) cv64/3d + flickerdoubler + FastATA-ZIV + Lots of SCSI gear, sitting idle.
RaspBerry Pi 2B, 3B, 4B/4Gb, 4B/8Gb
OrangePi 5+ 8Gb
ACER Windows 10
User avatar
Raziel
Posts: 1170
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Re: Shared Objects - Help needed

Post by Raziel »

salass00 wrote:@Raziel

Could you also output the value of &IDOS?

Code: Select all

IExec->DebugPrintF("&IDOS: %#p\n", &IDOS);
This would say if something is just overwriting the value of IDOS or if it's being shadowed by another IDOS declaration, or there could be a problem with the relocation not working in this one instance(?).
I'll try and report back as soon as possible

Thank you
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
User avatar
Raziel
Posts: 1170
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Re: Shared Objects - Help needed

Post by Raziel »

@OldFart

I'll take every advice which will rule out upcoming issues, so i'm going to change it according to your example.

Thanks a lot
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
User avatar
Raziel
Posts: 1170
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Re: Shared Objects - Help needed

Post by Raziel »

salass00 wrote:@Raziel

Could you also output the value of &IDOS?

Code: Select all

IExec->DebugPrintF("&IDOS: %#p\n", &IDOS);
This would say if something is just overwriting the value of IDOS or if it's being shadowed by another IDOS declaration, or there could be a problem with the relocation not working in this one instance(?).
&IDOS seems to be fine when it crashes

Code: Select all

...
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
&IDOS: 0x4ACB5F1C
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
&IDOS: 0x4ACB5F1C
IDOS: 0x6FCCC170
Minimum newlib version: 52.20
&IDOS: 0x4ACB5F1C
IDOS: 0x00000000
Minimum newlib version: 52.20
&IDOS: 0x4ACB5F1C
Dump of context at 0xDF1FC7C0
Trap type: DSI exception
Machine State (raw): 0x100000000200B030
Machine State (verbose): [Hyper] [ExtInt on] [Super] [FPU on] [IAT on] [DAT on]
Instruction pointer: 0x7B91C7E8
Crashed process: scummvm (0x3FC58E30)
DSI verbose error description: Access not found in hash or BAT (page fault)
Access was a load operation
 0: 7B91C7BC 453F9890 20526F75 3997D188 40EA48D0 00000003 00000000 79204265
 8: 3997D19A 00000000 00000000 453F9890 00000798 4ACBDB3C 00000000 452AF340
16: 7B7E28D4 00000000 4CAE3C40 4BCDF588 02B30000 02B30000 00000000 00000003
24: 6FF8C180 00000002 46844888 00000000 4BCE0000 3997D188 4ACB2C00 453F9890
CR: 4A842888   XER: 20000028  CTR: 00000000  LR: 7B91C7BC
DSISR: 40000000  DAR: 00000474

FP0 : FFF8000082004000 3FF0000000000000 0000000000000000 3FF0000000000000
FP4 : 3FF0000000000000 BFF0000000000000 3FF0000000000000 3FE0000000000000
FP8 : 406E000000000000 3FE0000000000000 3FF0000000000000 43300000800001E0
FP12: 4330000080000280 41E0000000000000 0000000000000000 0000000000000000
FP16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FP20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FP24: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
FP28: 0000000000000000 0000000000000000 3FB99999A0000000 4330000080000000
FPSCR: 82004000
HID0: 0x8000000000000000  HID1: 0x000000005CE993B1
HID4: 0x4400240000080180  HID5: 0x0000006600000080

V0 : 00000000000000000000000000000000 FF999999FF999999FF999999FF999999
V2 : FE01DA25FE01DA25FE01DA25FE01DA25 FE01DA25FE01DA25FE01DA25FE01DA25
V4 : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FF017A86FF017A86FF017A86FF017A86
V6 : FE019F60FE019F60FE019F60FE019F60 00000000010101010202020203030303
V8 : 00000000000000000000000000000000 DA25DA25DA25DA25DA25DA25DA25DA25
V10: FFFFA07AFFFFA07AFFFFA07AFFFFA07A FF999999FF999999FF999999FF999999
V12: FF999999FF999999FF999999FF999999 FF999999FF999999FF999999FF999999
V14: 001002120414061608180A1A0C1C0E1E 01000100010001000100010001000100
V16: FF000000FF000000FF000000FF000000 FFDBDBDBFFDBDBDBFFDBDBDBFFDBDBDB
V18: 00000000000000000000000000000000 00000000000000000000000000000000
V20: 00000000000000000000000000000000 00000000000000000000000000000000
V22: 00000000000000000000000000000000 00000000000000000000000000000000
V24: 00000000000000000000000000000000 00000000000000000000000000000000
V26: 00000000000000000000000000000000 00000000000000000000000000000000
V28: 00000000000000000000000000000000 00000000000000000000000000000000
V30: 00000000000000000000000000000000 00000000000000000000000000000000
VSCR: 00000000 VRSAVE: 00000000

Disassembly of crash site:
 7B91C7D8: 39400000   li                r10,0
 7B91C7DC: 99490049   stb               r10,73(r9)
 7B91C7E0: 813E8018   lwz               r9,-32744(r30)
 7B91C7E4: 81290000   lwz               r9,0(r9)
>7B91C7E8: 83A90474   lwz               r29,1140(r9)
 7B91C7EC: 813E8018   lwz               r9,-32744(r30)
 7B91C7F0: 83890000   lwz               r28,0(r9)
 7B91C7F4: 813F0028   lwz               r9,40(r31)
 7B91C7F8: 39290028   addi              r9,r9,40
 7B91C7FC: 7D234B78   mr                r3,r9

Kernel command line: serial munge debuglevel=1

Registers pointing to code:
r0 : [backends/fs/amigaos4/amigaos4-fs.cpp:104] scummvm:_ZN21AmigaOSFilesystemNodeC2ERKN6Common6StringE()+0x190 (section 11 @ 0x141678)
r13: scummvm:_ZZN7MT32Emu6Tables11getInstanceEvE8instance()+0x86c (section 32 @ 0x7B28)
r16: scummvm:main()+0x0 (section 11 @ 0x7790)
r20: native kernel module graphics.library.kmod+0x00860580
r21: native kernel module graphics.library.kmod+0x00860580
r30: scummvm:logo_data()+0x181c (section 26 @ 0x340C)
ip : [backends/fs/amigaos4/amigaos4-fs.cpp:110] scummvm:_ZN21AmigaOSFilesystemNodeC2ERKN6Common6StringE()+0x1bc (section 11 @ 0x1416A4)
lr : [backends/fs/amigaos4/amigaos4-fs.cpp:104] scummvm:_ZN21AmigaOSFilesystemNodeC2ERKN6Common6StringE()+0x190 (section 11 @ 0x141678)
ctr: unknown (0x00000000)

Stack trace:
(0x453F9890) [backends/fs/amigaos4/amigaos4-fs.cpp:110] scummvm:_ZN21AmigaOSFilesystemNodeC2ERKN6Common6StringE()+0x1bc (section 11 @ 0x1416A4)
(0x453F98D0) [backends/fs/amigaos4/amigaos4-fs.cpp:104] scummvm:_ZN21AmigaOSFilesystemNodeC2ERKN6Common6StringE()+0x190 (section 11 @ 0x141678)
(0x453F98F0) [common/fs.cpp:45] scummvm:_ZN6Common6FSNodeC2ERKNS_6StringE()+0x134 (section 11 @ 0x36DAB8)
(0x453F9930) [base/main.cpp:147] scummvm:_ZL7runGamePK6PluginR7OSystemRKN6Common6StringE()+0x88 (section 11 @ 0x8240)
(0x453F9E20) [base/main.cpp:566] scummvm:scummvm_main()+0xd94 (section 11 @ 0xA180)
(0x454A10D0) [backends/platform/sdl/amigaos/amigaos-main.cpp:79] scummvm:main()+0x264 (section 11 @ 0x79F4)
(0x454A1D00) native kernel module newlib.library.kmod+0x000020a4
(0x454A1D70) native kernel module newlib.library.kmod+0x00002d0c
(0x454A1F10) native kernel module newlib.library.kmod+0x00002ee8
(0x454A1F50) scummvm:_start()+0x170 (section 11 @ 0x1AB8)
(0x454A1F90) native kernel module dos.library.kmod+0x000255c8
(0x454A1FC0) native kernel module kernel+0x000420ac
(0x454A1FD0) native kernel module kernel+0x000420f4

Disassembly of crash site:
 7B91C7D8: 39400000   li                r10,0
 7B91C7DC: 99490049   stb               r10,73(r9)
 7B91C7E0: 813E8018   lwz               r9,-32744(r30)
 7B91C7E4: 81290000   lwz               r9,0(r9)
>7B91C7E8: 83A90474   lwz               r29,1140(r9)
 7B91C7EC: 813E8018   lwz               r9,-32744(r30)
 7B91C7F0: 83890000   lwz               r28,0(r9)
 7B91C7F4: 813F0028   lwz               r9,40(r31)
 7B91C7F8: 39290028   addi              r9,r9,40
 7B91C7FC: 7D234B78   mr                r3,r9
Stack pointer (0x453F9890) is inside bounds
Redzone is OK (4)

68k register dump
DATA: 00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000
----> 00000001 - "Development:Coding/Ports/VM/scummvm-opengl-sdl2-shared/plugins/libscumm.so" Hunk 0000 Offset 00000000
ADDR: 6FFB8700 96F48300 00000000 00000000 00000000 00000000 00000000 453F91B0
Page information:
Page not found
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
User avatar
Raziel
Posts: 1170
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Re: Shared Objects - Help needed

Post by Raziel »

@all

Ok, please help, another one of those darn shared objects bugs i don't know how to deal with...

I get this on starting the app, no window/screen is ever opened, it seems it's crashing while reading in the plugins (again), but this time it's libstdc++ which is complaining

Code: Select all

Crash log for task "scummvm" 
Generated by GrimReaper 53.19 
Crash occured in module libstdc++.so at address 0x7EA176A0 
Type of crash: DSI (Data Storage Interrupt) exception 
Alert number: 0x80000003 

Register dump: 
GPR (General Purpose Registers): 
   0: 00000000 5CA7BD10 5F726561 4DFB9F8C FFFFFFFF 5C9ABC28 4DF8A470 5C9AC3F4  
   8: 4DF8A470 00000008 00000000 4DF901C0 28842824 4DFC1E6C 00000000 4EA30680  
  16: 7EE2E10C 00000000 4E047C40 5C9A8580 02B30000 02B30000 00000000 00000001  
  24: 6FF8C180 5C9AC3F4 FFFFFFFF 4DF8A470 5C9ABC28 00000001 4DFB1DD8 4DF901D8  


FPR (Floating Point Registers, NaN = Not a Number): 
   0:              nan     2.29025e-303     3.35397e-308       1.188e-302  
   4:     1.62719e-302     2.19876e-303     2.47325e-303     2.83923e-303  
   8:     2.38175e-303                1               64       4.5036e+15  
  12:      2.14748e+09      2.14748e+09                0                0  
  16:                0                0                0                0  
  20:                0                0                0                0  
  24:                0                0                0                0  
  28:                0                0              0.1       4.5036e+15  

FPSCR (Floating Point Status and Control Register): 0x82020000 


SPRs (Special Purpose Registers): 
           Machine State (msr) : 0x0000B030 
                Condition (cr) : 0x4DA55C34 
      Instruction Pointer (ip) : 0x7EA176A0 
       Xtended Exception (xer) : 0x5BFB4018 
                   Count (ctr) : 0x6FF494D0 
                     Link (lr) : 0x7FB11920 
            DSI Status (dsisr) : 0x5BFB3DD0 
            Data Address (dar) : 0x021AD048 



680x0 emulated registers: 
DATA: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000  
ADDR: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000  
FPU0:                0                0                0                0  
FPU4:                0                0                0                0  



Symbol info: 
Instruction pointer 0x7EA176A0 belongs to module "libstdc++.so" (PowerPC)  
Symbol: _ZNK10__cxxabiv121__vmi_class_type_info20__do_find_public_srcEiPKvPKNS_17__class_type_infoES2_ + 0xC0 in section 10 offset 0x000768D8 

Stack trace: 
    Development:Coding/Ports/VM/scummvm-test/sobjs/libstdc++.so:_ZNK10__cxxabiv121__vmi_class_type_info20__do_find_public_srcEiPKvPKNS_17__class_type_infoES2_()+0xc0 (section 10 @ 0x768D8) 
    Development:Coding/Ports/VM/scummvm-test/sobjs/libstdc++.so:__dynamic_cast()+0x170 (section 10 @ 0x772B4) 
    [backends/platform/sdl/sdl.cpp:294] scummvm:_ZN11OSystem_SDL11initBackendEv()+0x504 (section 11 @ 0x283C) 
    [base/main.cpp:469] scummvm:scummvm_main()+0x788 (section 11 @ 0x9B74) 
    [backends/platform/sdl/amigaos/amigaos-main.cpp:79] scummvm:main()+0x264 (section 11 @ 0x79F4) 
    native kernel module newlib.library.kmod+0x000020a4 
    native kernel module newlib.library.kmod+0x00002d0c 
    native kernel module newlib.library.kmod+0x00002ee8 
    scummvm:_start()+0x170 (section 11 @ 0x1AB8) 
    native kernel module dos.library.kmod+0x000255c8 
    native kernel module kernel+0x000420ac 
    native kernel module kernel+0x000420f4 

PPC disassembly: 
 7ea17698: 7cbc0214   add               r5,r28,r0 
 7ea1769c: 81230000   lwz               r9,0(r3) 
*7ea176a0: 81290020   lwz               r9,32(r9) 
 7ea176a4: 7d2903a6   mtctr             r9 
 7ea176a8: 4e800421   bctrl              

System information: 

CPU  
 Model: P.A. Semi PWRficient PA6T-1682M VB1  
 CPU speed: 1800 MHz  
 FSB speed: 900 MHz  
 Extensions: altivec  

Machine  
 Machine name: AmigaOne X1000  
 Memory: 2097152 KB  
 Extensions: bus.pci bus.pcie
Thank you
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg
Post Reply