Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
04240 Crash/Freeze Critical (emulation) Always Feb 10, 2011, 06:53 Feb 14, 2011, 19:56
Tester Smitdogg View Status Public Platform
Assigned To Resolution Fixed OS
Status [?] Resolved Driver
Version 0.141u2 Fixed in Version 0.141u3 Build
Fixed in Git Commit Github Pull Request #
Summary 04240: All sets using TLCS90 CPU; all sets using MultiPCM: Crash: "Called save_item on a non-fundamental type!" before OK screen.
Description  "Called save_item on a non-fundamental type!" message on crash before OK in a number of drivers (assumed all sets in driver - unless noted), including:

dynax.c - gekisha, majrjhdx, mjreach, tenkai, tankai2b, tenkaibb, tenkaicb, tenkaid, tenkaie
All sets in model1.c
model2.c - daytona, daytona93, daytonam, daytonas, daytonat, desert, vcop
nmk16.c - raphero
All sets in nss.c
royalmah.c - cafebrk, cafedoll, cafetime, mjdejav2, mjdejavu, mjifb, mjifb2, mjifb3, mjtensin, mjvegas, mjvegasa
segas32.c - harddunk, harddunkj, orunners, orunnersu, scross, scrossu, titlef, titlefu (dual monitor games)
All sets in sfcbox.c
All sets in snesb.c
Steps To Reproduce
Additional Information
Github Commit
Flags
Regression Version 0.141u2
Affected Sets / Systems All sets using TLCS90 CPU; all sets using MultiPCM
Attached Files
png file icon crash.png (2,566 bytes) Feb 10, 2011, 06:53 Uploaded by Smitdogg
Smitdogg
Relationships
has duplicate 04252Closed  iron: popup message - Called save_item on non fundamental type! 
Notes
6
User avatar
No.07185
Tafoid
Administrator
Feb 10, 2011, 18:41
Adapted bug report for cover the larger problem covering numerous drivers.
User avatar
No.07186
AWJ
Developer
Feb 10, 2011, 20:31
All sets using a TLCS90 CPU are affected...
User avatar
No.07188
bitbytebit
Tester
Feb 13, 2011, 17:11
Here's an unofficial temporary fix, makes the games work again at least (and seems correct, the value of EG.state is NULL, guessing there's a deeper issue beyond just that though)...


diff --git a/src/emu/sound/multipcm.c b/src/emu/sound/multipcm.c
index d0546b9..55db035 100644
--- a/src/emu/sound/multipcm.c
+++ b/src/emu/sound/multipcm.c
@@ -627,7 +627,8 @@ static DEVICE_START( multipcm )
                device->save_item(NAME(ptChip->Slots[i].TLStep), i);
                device->save_item(NAME(ptChip->Slots[i].Prev), i);
                device->save_item(NAME(ptChip->Slots[i].EG.volume), i);
- device->save_item(NAME(ptChip->Slots[i].EG.state), i);
+ if (ptChip->Slots[i].EG.state)
+ device->save_item(NAME(ptChip->Slots[i].EG.state), i);
                device->save_item(NAME(ptChip->Slots[i].EG.step), i);
                device->save_item(NAME(ptChip->Slots[i].EG.AR), i);
                device->save_item(NAME(ptChip->Slots[i].EG.D1R), i);
User avatar
No.07189
hap
Developer
Feb 13, 2011, 17:22
err, of course state is initialized to 0, :P that fix would be the same as completely removing "device->save_item(NAME(ptChip->Slots[i].EG.state), i);"

The real problem is that state.c/h doesn't allow custom enums, like the one in multipcm.c:
typedef enum {ATTACK,DECAY1,DECAY2,RELEASE} _STATE;
User avatar
No.07190
bitbytebit
Tester
Feb 13, 2011, 17:30
Ah that figures, must be a lot deeper of an issue then, was hoping for a quick fix but sounds like it's much more complicated :/.
User avatar
No.07194
Tafoid
Administrator
Feb 14, 2011, 19:56
etabeta fixed snes + clone system
hap fixed everything else