[Gambas-devel] System error... (42)

Benoît Minisini gambas at ...1...
Sun Oct 9 10:15:24 CEST 2011


> Bingo!
> 
> THROW system error from CCUL.CUL_Read.227
> 
> Program received signal SIGTRAP, Trace/breakpoint trap.
> THROW (code=42) at gb_error.c:285
> 285 va_start(args, code);
> (gdb) bt
> #0  THROW (code=42) at gb_error.c:285
> #1  0x00000000004053af in THROW_SYSTEM (err=104, path=0x0) at
> gb_error.c:325 #2  0x0000000000416171 in STREAM_read (stream=0x7588c0,
> addr=0x7fffffffdba0, len=1) at gbx_stream.c:213
> #3  0x0000000000416847 in STREAM_read_type (stream=0x7588c0, type=2,
> value=0x65c880, len=0) at gbx_stream.c:480
> #4  0x000000000041a8a2 in SUBR_read () at gbx_subr_file.c:395
> #5  0x000000000043c1b3 in EXEC_loop () at gbx_exec_loop.c:476
> #6  0x000000000040c0ab in EXEC_function_loop () at gbx_exec.c:703
> #7  0x000000000040c042 in EXEC_function_real () at gbx_exec.c:690
> #8  0x00000000004231cb in call_method (object=0x757db0, desc=0x7546a0,
> nparam=0) at gbx_api.c:411
> #9  0x00000000004233eb in raise_event (observer=0x757db0, object=0x7588b0,
> func_id=11, nparam=0) at gbx_api.c:490
> #10 0x00000000004237ae in GB_Raise (object=0x7588b0, event_id=1, nparam=0)
> at gbx_api.c:594
> #11 0x00007ffff5d166de in CSocket_post_data_available (_object=0x7588b0) at
> CSocket.c:107
> #12 0x0000000000414446 in EVENT_check_post () at gbx_event.c:227
> #13 0x000000000042b04d in do_loop (wait=0x0) at gbx_watch.c:509
> #14 0x000000000042b0a6 in WATCH_loop () at gbx_watch.c:531
> #15 0x000000000042ca21 in main (argc=1, argv=0x7fffffffe3b8) at gbx.c:352
> (gdb)
> 
> PUBLIC SUB CUL_Read()
> 
>   DIM bData AS Byte
> 
>   TRY READ #hCUL, bData <-------------------- CCUL.CUL_Read.227
> 
>   IF ERROR THEN Main.WriteDebugLog(("[CUL] Error reading data from the TCP
> port! -> ") & Error.Text)
>   ProcessReceivedChar(bData)
> 
> END
> 
> (gdb) l gb_error.c:325
> 320
> 321 case EEXIST:
> 322 THROW(E_EXIST, path);
> 323
> 324 default:
> 325 THROW(E_SYSTEM, strerror(err));
> 326 }
> 327 }
> 328
> 329 void ERROR_panic(const char *error, ...)
> (gdb)
> 
> (gdb) l gbx_stream.c:213
> 208      case EAGAIN:
> 209        THROW(E_EOF);
> 210      case EIO:
> 211        THROW(E_READ);
> 212      default:
> 213        THROW_SYSTEM(errno, NULL);
> 214    }
> 215  }
> 216 }
> 217
> (gdb)
> 
> If i'm not mistaken error 104 is connection reset by peer.
> I noticed in the GUI version of my software it often didn't see a lost
> connection, ie it just continues without displaying the error.
> But with a lost connection.
> ie in this case CUL_Closed() wasn't always called, even if you pulled the
> network cable from the device where the TCP socket was connected too.
> But maybe this bug is not error code specific and was there on other error
> numbers too, don't know.
> 
> If you need any more info let me know.
> 
> Regards,
> Ron_2nd.
> 

That error is not an error returned by the event loop (you don't have the same 
backtrace). This is another error. You must try again!

-- 
Benoît Minisini




More information about the Devel mailing list