Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP8266 crashes when loading a D64 image #18

Open
cgudrian opened this issue Sep 15, 2024 · 2 comments
Open

ESP8266 crashes when loading a D64 image #18

cgudrian opened this issue Sep 15, 2024 · 2 comments

Comments

@cgudrian
Copy link

cgudrian commented Sep 15, 2024

After LOAD "HTTP://MY.SERVER:8000/SHADES.D64", 8 the ESP8266 crashes:

28    IEC: [28]  (20 LISTEN 08 DEVICE) F0  (F0 OPEN) (00 CHANNEL) [48 54 54 50 3A 2F 2F 31 39 32 2E 31 36 38 2E 31 37 38 2E 32 31 30 3A 38 30 30 30 2F 53 48 41 44 45 53 2E 44 36 [cbmstandardserial.cpp:371] timeoutWait(): pin[12] state[1] wait[200] step[1] t[200]
34 3F  [HTTP://192.168.178.210:8000/SHADES.D64] (3F UNLISTEN)
DEVICE: [8] OPEN CHANNEL 0
LOAD "HTTP://192.168.178.210:8000/SHADES.D64",8
[drive.cpp:466] handleOpen(): OPEN Named Channel (08 Device) (00 Channel)
[iec_device.cpp:104] service(): [Process a command]
[device_db.cpp:47] select(): cur[0] new[8]
[device_db.cpp:59] select(): config_file[/.sys/device.8.conf]
[device_db.cpp:66] select(): loaded id[0]
[drive.cpp:331] handleListenCommand(): !!!! device changed: unit:0 current url: [null]
[drive.cpp:333] handleListenCommand(): m_mfile[]
[drive.cpp:192] parseLine(): * PARSE INCOMING LINE *******************************
[drive.cpp:194] parseLine(): we are in              []
[drive.cpp:195] parseLine(): unprocessed user input [HTTP://192.168.178.210:8000/SHADES.D64]
[drive.cpp:287] parseLine(): found command     [HTTP://192.168.178.210:8000/SHADES.D64]
[meat_io.cpp:371] cd(): cd requested: [HTTP://192.168.178.210:8000/SHADES.D64]
[meat_io.cpp:373] cd(): streamFile[]
[drive.cpp:299] parseLine(): full referenced path [HTTP://192.168.178.210:8000/SHADES.D64]
[drive.cpp:302] parseLine(): * END OF PARSE LINE *******************************
[drive.cpp:352] handleListenCommand(): command[HTTP://192.168.178.210:8000/SHADES.D64]
[drive.cpp:399] handleListenCommand(): change dir called by CD command or because of isDirectory
[drive.cpp:312] changeDir(): !!!! CD into [HTTP://192.168.178.210:8000/SHADES.D64]
[drive.cpp:313] changeDir(): new current url: [HTTP://192.168.178.210:8000/SHADES.D64]
[drive.cpp:314] changeDir(): LOAD $
48    IEC: [48]  (40 TALK 08 DEVICE) 60  (60 SECONDARY) (0 CHANNEL)
DEVICE: [8] DATA CHANNEL 0
[iec_device.cpp:132] service(): [Send data]
[drive.cpp:427] handleTalk(): channel[0] openState[3]
sendListing: [HTTP://192.168.178.210:8000/SHADES.D64]
=================================
[meat_io.cpp:327] getSourceStream(): pathInStream[] streamFile[HTTP://192.168.178.210:8000/SHADES.D64]
[http.cpp:14] getSourceStream(): [HTTP://192.168.178.210:8000/SHADES.D64]
[http.cpp:162] open(): input HTTP://192.168.178.210:8000/SHADES.D64: someRc=1
[http.cpp:173] open(): httpCode=200
[http.cpp:179] open(): isFriendlySkipper[0]
[http.cpp:181] open(): [HTTP://192.168.178.210:8000/SHADES.D64]
[http.cpp:184] open(): length=174848
[http.cpp:189] open(): content_type[application/octet-stream]
[meat_io.cpp:331] getSourceStream(): containerStream isRandomAccess[0] isBrowsable[0]
[d64.h:309] getDecodedStream(): [HTTP://192.168.178.210:8000/SHADES.D64]
[meat_io.cpp:334] getSourceStream(): decodedStream isRandomAccess[1] isBrowsable[0]
[meat_io.cpp:336] getSourceStream(): pathInStream []
[meat_media.h:199] obtain(): DIRECTORY [HTTP://192.168.178.210:8000/SHADES.D64]

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Exception (28):
epc1=0x4020c68d epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000004 depc=0x00000000

LoadProhibited: A load referenced a page mapped with an attribute that does not permit loads
  epc1=0x4020c68d in ClientContext::read(char*, unsigned int) at /home/christian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFi/src/include/ClientContext.h:254
     (inlined by) WiFiClient::read(char*, unsigned int) at /home/christian/.platformio/packages/framework-arduinoespressif8266/libraries/ESP8266WiFi/src/WiFiClient.cpp:274

>>>stack>>>

ctx: cont
sp: 3fff7fe0 end: 3fff8410 offset: 0150
3fff8130:  3fffb8c0 00000020 3fffb6bc 3fffab14  
3fff8140:  00000012 00000000 00000090 3fff543c  
3fff8150:  3fffaa3c 3fff81b8 3fffa9dc 4021816d  
3fff8160:  3fffb284 3fff81b8 3fffb6bc 402461ea  
3fff8170:  3fffb284 3fff81b8 3fffb6bc 402234cc  
3fff8180:  3fffa356 3ffe83c4 00000000 ffff0208  
3fff8190:  3fffa2fc 0000005a 00000003 00000000  
3fff81a0:  00000011 3ffe83c4 3fff8290 3ffec9c1  
3fff81b0:  3fffb63c 00000026 00000026 40258cd9  
3fff81c0:  00000000 ffffffff ffffffff 00000000  
3fff81d0:  00000001 00000037 3f302064 40258cd9  
3fff81e0:  00000000 00000007 00000000 3fff543c  
3fff81f0:  3fff4c08 3fffb284 3fff4c08 40223224  
3fff8200:  3fff82b0 00000020 3fffa2fc 3ffec618  
3fff8210:  3fff5258 00000020 3fffa2fc 401011c2  
3fff8220:  3fff83a0 0000005a 3fffa2fc 4023d484  
3fff8230:  3fff82b0 3fff8280 00000008 646e6573  
3fff8240:  7473694c 3a676e69 54485b20 2f3a5054  
3fff8250:  3239312f 3836312e 3837312e 3031322e  
3fff8260:  3030383a 48532f30 53454441 3436442e  
3fff8270:  3d0a0d5d 3d3d3d3d 003d3d3d ffff0208  
3fff8280:  3fff832c 0000003f 3fffb43c 0000006d  
3fff8290:  0000007e 00000003 00000012 ffff0208  
3fff82a0:  0000005b 0000003f 6000001c 3fffc200  
3fff82b0:  00000003 ffffffff 00000020 3fff543c  
3fff82c0:  3fff4c08 3fff4c08 3fff4c08 40234d6b  
3fff82d0:  00000000 3fffdad0 3fff543c 402429e1  
3fff82e0:  00000037 3fff4c08 3fff4c08 402547dd  
3fff82f0:  3fff83a0 3fff8370 00000008 3ffec998  
3fff8300:  3fff5258 00000037 3fff832c 4023cf28  
3fff8310:  3fff83c0 3fff8390 00000008 4023d474  
3fff8320:  3fff83a0 3fff8370 00000008 6972645b  
3fff8330:  632e6576 343a7070 205d3732 646e6168  
3fff8340:  6154656c 29286b6c 6863203a 656e6e61  
3fff8350:  5d305b6c 65706f20 3fff8360 00000003 <
3fff8360:  00726964 65636976 203a2928 6e65535b  
3fff8370:  61642064 0d5d6174 3ffec160 000001ab  
3fff8380:  402b6468 00000000 00000780 40211414  
3fff8390:  0000007e 00000002 3ffe96a4 00000084  
3fff83a0:  402b6158 00000002 3fff4964 3fff543c  
3fff83b0:  3fffdad0 3fff4c08 3fff4c08 40236331  
3fff83c0:  00000003 3fff4ce0 3fff4dc8 3fff543c  
3fff83d0:  3fffdad0 3fff4c08 00000003 402109a4  
3fff83e0:  3fffdad0 00000000 3fffdab0 4020695c  
3fff83f0:  feefeffe feefeffe 3fffdab0 40240e86  
3fff8400:  feefeffe feefeffe feefeffe 40100555  
<<<stack<<<

0x4021816d in HttpIStream::read(unsigned char*, unsigned int) at lib/meatloaf/network/http.cpp:204
0x402461ea in D64IStream::seekHeader() at lib/meatloaf/container/../disk/d64.h:230
0x402234cc in D64File::rewindDirectory() at lib/meatloaf/disk/d64.cpp:478 (discriminator 1)
0x40258cd9 in _svfprintf_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:528
0x40258cd9 in _svfprintf_r at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf.c:528
0x40223224 in D64File::getNextFileInDir() at lib/meatloaf/disk/d64.cpp:498
0x401011c2 in free at /home/christian/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/umm_malloc/umm_malloc.cpp:688
0x4023d484 in Print::printf(char const*, ...) at /home/christian/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/Print.cpp:68 (discriminator 1)
0x40234d6b in std::_Head_base<0u, MFile*, false>::_Head_base() at /home/christian/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/tuple:127
 (inlined by) std::_Tuple_impl<0u, MFile*, std::default_delete<MFile> >::_Tuple_impl() at /home/christian/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/tuple:213
 (inlined by) std::tuple<MFile*, std::default_delete<MFile> >::tuple<true, true>() at /home/christian/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/tuple:961
 (inlined by) std::__uniq_ptr_impl<MFile, std::default_delete<MFile> >::__uniq_ptr_impl(MFile*) at /home/christian/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/unique_ptr.h:155
 (inlined by) std::__uniq_ptr_data<MFile, std::default_delete<MFile>, true, true>::__uniq_ptr_impl(MFile*) at /home/christian/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/unique_ptr.h:210
 (inlined by) std::unique_ptr<MFile, std::default_delete<MFile> >::unique_ptr<std::default_delete<MFile>, void>(MFile*) at /home/christian/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/10.3.0/bits/unique_ptr.h:282
 (inlined by) devDrive::sendListing() at lib/device/drive.cpp:734
0x402429e1 in uart_write at /home/christian/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/uart.cpp:545
0x402547dd in vsnprintf at /workdir/repo/newlib/newlib/libc/stdio/vsnprintf.c:41
0x4023cf28 in HardwareSerial::write(unsigned char const*, unsigned int) at /home/christian/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/HardwareSerial.h:194
0x4023d474 in Print::printf(char const*, ...) at /home/christian/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/Print.cpp:66
0x402b6468 in etharp_output at ??:?
0x40211414 in Protocol::CBMStandardSerial::espPinMode(unsigned char, unsigned char) at lib/bus/protocol/cbmstandardserial.h:107
 (inlined by) Protocol::CBMStandardSerial::pull(unsigned char) at lib/bus/protocol/cbmstandardserial.h:85
 (inlined by) Protocol::CBMStandardSerial::receiveByte(unsigned char) at lib/bus/protocol/cbmstandardserial.cpp:161
0x402b6158 in etharp_output at ??:?
0x40236331 in devDrive::handleTalk(unsigned char) at lib/device/drive.cpp:447
0x402109a4 in iecDevice::service() at lib/bus/iec_device.cpp:138
0x4020695c in loop at src/main.cpp:149
0x40240e86 in loop_wrapper() at /home/christian/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/core_esp8266_main.cpp:258
0x40100555 in cont_wrapper at /home/christian/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/cont.S:81
@idolpx
Copy link
Owner

idolpx commented Sep 15, 2024

Please use the code in the meatloaf-specialty repo for the ESP32. :)

@cgudrian cgudrian changed the title ESP32 crashes when loading a D64 image ESP8266 crashes when loading a D64 image Sep 16, 2024
@cgudrian
Copy link
Author

cgudrian commented Sep 16, 2024

Sorry. I've corrected the issue title. I'm in fact on an ESP8266 (NodeMCUv2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants