- --
Viewing Issue Advanced Details
ID | Category [?] | Severity [?] | Reproducibility | Date Submitted | Last Update |
---|---|---|---|---|---|
01905 | Crash/Freeze | Critical (emulator) | Always | Jun 17, 2008, 16:56 | Jun 25, 2008, 02:42 |
Tester | Tafoid | View Status | Public | Platform | MAME (Self-compiled) |
Assigned To | aaron | Resolution | Fixed | OS | |
Status [?] | Resolved | Driver | |||
Version | 0.125u6 | Fixed in Version | 0.125u7 | Build | |
Fixed in Git Commit | Github Pull Request # | ||||
Summary | 01905: Many Sets: Fatal Error crash - Fatal error: Input ports cannot be read at init time! (src/emu/inptport.c:1278) | ||||
Description |
Fatal error: Input ports cannot be read at init time! (src/emu/inptport.c:1278) Effects multiple sets and drivers. Report all here per instructions in Additional Information. |
||||
Steps To Reproduce | |||||
Additional Information |
Added sets/drivers found with this as notes.. if you have more to add after initial note, edit your note. Sets effected:
findout.c and getrivia.c merged to gei.c in 0.135u1 cubocd32.c changed to cd32.c in 0.141u3 cd32.c changed to cubo.c in 0.154 |
||||
Github Commit | |||||
Flags | |||||
Regression Version | 0.125u6 | ||||
Affected Sets / Systems | Many Sets | ||||
Attached Files
|
less-aggressive-check.diff (2,324 bytes) Jun 18, 2008, 02:28 [Show Content] [Hide Content]Modified: trunk/src/emu/inptport.c =================================================================== --- trunk/src/emu/inptport.c 2008-06-17 19:55:40 UTC (rev 1977) +++ trunk/src/emu/inptport.c 2008-06-18 02:10:53 UTC (rev 1978) @@ -240,6 +240,9 @@ /* private input port state */ struct _input_port_private { + /* global state */ + UINT8 safe_to_read; /* clear at start; set after state is loaded */ + /* types */ input_type_state * typestatelist; /* list of live type states */ input_type_state * type_to_typestate[__ipt_max][MAX_PLAYERS]; /* map from type/player to type state */ @@ -1210,6 +1213,8 @@ callback_field_info *custom; input_port_value result; + assert_always(portdata->safe_to_read, "Input ports cannot be read at init time!"); + /* start with the digital */ result = port->state->digital; @@ -1275,7 +1280,6 @@ input_port_value input_port_read(running_machine *machine, const char *tag) { const input_port_config *port = input_port_by_tag(machine->portconfig, tag); - assert_always(mame_get_phase(machine) != MAME_PHASE_INIT, "Input ports cannot be read at init time!"); if (port == NULL) fatalerror("Unable to locate input port '%s'", tag); return input_port_read_direct(port); @@ -1291,7 +1295,6 @@ input_port_value input_port_read_safe(running_machine *machine, const char *tag, UINT32 defvalue) { const input_port_config *port = input_port_by_tag(machine->portconfig, tag); - assert_always(mame_get_phase(machine) != MAME_PHASE_INIT, "Input ports cannot be read at init time!"); return (port == NULL) ? defvalue : input_port_read_direct(port); } @@ -1304,7 +1307,6 @@ input_port_value input_port_read_indexed(running_machine *machine, int portnum) { const input_port_config *port = input_port_by_index(machine->portconfig, portnum); - assert_always(mame_get_phase(machine) != MAME_PHASE_INIT, "Input ports cannot be read at init time!"); return (port == NULL) ? 0 : input_port_read_direct(port); } @@ -3381,7 +3383,10 @@ /* in the completion phase, we finish the initialization with the final ports */ if (config_type == CONFIG_TYPE_FINAL) + { + portdata->safe_to_read = TRUE; frame_update(machine); + } /* early exit if no data to parse */ if (parentnode == NULL) | ||||
Relationships
There are no relationship linked to this issue. |
Notes
16
No.01295
etabeta Developer
Jun 17, 2008, 23:15
|
can any dev give more hints about what is wrong with these? empty input port? duplicate entries? what kind of sanity checks have been added? (I have no way to test these directly until SDLMAME is released, so any info would be useful :) ) |
---|---|
No.01296
M.A.S.H. Senior Tester
Jun 18, 2008, 00:57
|
To fix the Fatal Error crash use the old 0.125u5 emu\inptport.c file. Now you can play Wily Tower with sound |
No.01297
aaron Developer
Jun 18, 2008, 02:02
|
They are due to input_port_read being called during DRIVER_INIT/MACHINE_START/VIDEO_START or other early initialization time. When input ports are read at these times, the data is not valid, so the driver is acting on invalid information. |
No.01299
aaron Developer
Jun 18, 2008, 02:29
|
Actually, the check in 0.125u6 is too aggressive. Can we verify the reported crashes against the less aggressive check in the attached .diff? |
No.01300
Tafoid Administrator
Jun 18, 2008, 02:33
edited on: Jun 18, 2008, 05:05 |
As soon as I'm done the first sweep.. sure. Second thought, I'll try it when I get up in the morning - Checking 4k sets in one day is enough :) If someone feels compelled to check the list I compiled after applying that DIFF from Aaron - please do. If it's not done when I get up and around, I'll do it. |
No.01303
aaron Developer
Jun 18, 2008, 05:29
|
Thanks for being so thorough. :) |
No.01307
etabeta Developer
Jun 18, 2008, 07:23
edited on: Jun 18, 2008, 07:25 |
with less-strict checks we're down to 7 drivers with issues, and only namcos22 with more than 2 parents involved (mind that I only tested drivers in the list above) 8080bw.c: schaser 8080bw.c: polaris 8080bw.c: polarisa centiped.c: warlords grchamp.c: grchamp namcofl.c: speedrcr namcofl.c: finalapr namcofl.c: finalapb namcofl.c: finalapo namcos22.c: ridgerac namcos22.c: ridgerab namcos22.c: ridgeraj namcos22.c: acedrvrw namcos22.c: ridgera2 namcos22.c: ridger2a namcos22.c: ridger2b namcos22.c: raveracw namcos22.c: raveracj namcos22.c: raveraja namcos22.c: cybrcomm namcos22.c: victlapw neodrvr.c: svcpcb neodrvr.c: svcpcba ultratnk.c: ultratnk |
No.01308
abelenki Tester
Jun 18, 2008, 07:53
edited on: May 17, 2009, 19:49 |
etabeta, does less-aggressive-check.diff fix this bug?: 01906 |
No.01309
Layne Tester
Jun 18, 2008, 08:27
|
ddragon3.c: ddrago3b |
No.01310
Firewave Senior Tester
Jun 18, 2008, 08:57
|
I am running a complete test right now and I hope it won't crash, so I get complete results with the net two days. |
No.01312
aaron Developer
Jun 18, 2008, 10:34
|
abelenki: No, that's a separate issue |
No.01313
etabeta Developer
Jun 18, 2008, 11:34
|
would you mind posting the patch for that issue as well, either here or in bug 1906? thanks |
No.01314
Firewave Senior Tester
Jun 18, 2008, 16:27
|
Additional sets so far (with the less restrictive patch): mw8080bw.c: boothill mw8080bw.c: checkmat mw8080bw.c: clowns mw8080bw.c: clowns1 mw8080bw.c: desertgu mw8080bw.c: dplay mw8080bw.c: einning mw8080bw.c: roadrunm dkong.c: 8ballact dkong.c: 8ballat2 dkong.c: dkong dkong.c: dkongjo dkong.c: dkongjo1 dkong.c: dkongjp dkong.c: dkongo dkong.c: drakton dkong.c: herbiedk dkong.c: herodk dkong.c: herodku dkong.c: hunchbkd dkong.c: radarsc1 dkong.c: radarscp dkong.c: sbdk dkong.c: shootgal dkong.c: spcfrcii dkong.c: spclforc dkong.c: strtheat vicdual.c: frogs crbaloon.c: crbalon2 crbaloon.c: crbaloon |
No.01315
Tafoid Administrator
Jun 18, 2008, 16:35
edited on: Jun 18, 2008, 16:36 |
Boy, that's odd that dkong didn't trigger on the run with more stringent testing and now it does? MAME is a strange beast :) Appreciate the complete run, Firewave! |
No.01327
Firewave Senior Tester
Jun 19, 2008, 18:05
|
Run is complete. Here are the remaining: canyon.c: canyon canyon.c: canyonp circus.c: crash crbaloon.c: crbalon2 crbaloon.c: crbaloon sprint2.c: dominos sprint2.c: sprint1 sprint2.c: sprint2 sprint2.c: sprint2a dragrace.c: dragrace firetrk.c: firetrk firetrk.c: montecar firetrk.c: superbug nitedrvr.c: nitedrvr skydiver.c: skydiver sprint4.c: sprint4 sprint4.c: sprint4a tank8.c: tank8 tank8.c: tank8a tank8.c: tank8b tank8.c: tank8c tank8.c: tank8d triplhnt.c: triplhnt |
No.01376
hotcoke Tester
Jun 25, 2008, 02:42
|
great!! |