Lazarus

Free Pascal => General => Topic started by: lazer on January 28, 2023, 04:18:14 pm

Title: Unknown exception code 32
Post by: lazer on January 28, 2023, 04:18:14 pm
Hi, I'm using the very flexible uos sound library for sound on Linux.

I had my project working fine building on both Linux and Win32.  Then a system up date seems to have messed stuff up , I had Lazarus complaining about different time stamps, libs newer than compiler and such like, so I reinstalled distro fpc 3.2.2. and used it to do a clean rebuild of my github 3.1.1 fpc.

I then removed the distro fpc, restored /etc/fpc.cfg renewed the symlinks to ppx64 et al removed the duplicate ppu files under fv and tried again.

My program mostly seems fine but crashes when I try to play sound on the dev system ( Fedora 36 ).

'External: Unknown exception code 32'.

I don't find any info googling this error and it is pretty unhelpful.

Here is a screenshot of the code dump.

It's really annoying when this was working fine before. Any ideas on how to chase this down ?

TIA

Code: Pascal  [Select][+][-]
  1. Lazarus 2.3.0 (rev main-2_3-2165-gc63984efd6) FPC 3.3.1 x86_64-linux-gtk2
Title: Re: Unknown exception code 32
Post by: Martin_fr on January 28, 2023, 06:54:52 pm
Try to use the gdb based debugger and see what it reports. Maybe it's more meaningful....

Menu: Tools > Options > Debugger > Debugger Backend
Title: Re: Unknown exception code 32
Post by: Martin_fr on January 28, 2023, 06:58:15 pm
Or recompile the IDE with -dDebuglnLinuxDebugEvents  // EDIT: using FpDebug

- Then start the IDE from a terminal (so you can see any output it writes to console)
- Alternatively start the IDE with --debug-log=somefile.txt  to get the output in that file

Then when the issue happens, get the last 50 lines of output, and post them here.
Title: Re: Unknown exception code 32
Post by: Thaddy on January 28, 2023, 08:26:55 pm
Error 32 is NOT a Freepascal or Lazarus error....
Title: Re: Unknown exception code 32
Post by: lazer on January 28, 2023, 08:35:25 pm
Thanks Martin,

I switched the debugger and set compiler from -gd3 to -g, rebuild and ran with gdb as debugger. Now if I F8 or F9 from that problematic line I no longer crash but get no change :?   I see this on console for each key stroke:

Code: Pascal  [Select][+][-]
  1. Hint: (lazarus) [TMainIDE.DoRunProject] INIT
  2. Hint: (lazarus) [TMainIDE.DoRunProject] Debugger=TGDBMIDebugger
  3. Hint: (lazarus) [TMainIDE.DoRunProject] END
  4. Hint: (lazarus) [TMainIDE.DoRunProject] INIT
  5. Hint: (lazarus) [TMainIDE.DoRunProject] Debugger=TGDBMIDebugger
  6. Hint: (lazarus) [TMainIDE.DoRunProject] END
  7. Hint: (lazarus) [TMainIDE.DoRunProject] INIT
  8. Hint: (lazarus) [TMainIDE.DoRunProject] Debugger=TGDBMIDebugger
  9. Hint: (lazarus) [TMainIDE.DoRunProject] END

That's all I get in the log file too. :?


Title: Re: Unknown exception code 32
Post by: lazer on January 28, 2023, 09:00:37 pm
Error 32 is NOT a Freepascal or Lazarus error....

Good point.  It may be a rather badly trapped error in the uos code which is reporting a pseudo-windowsey error message.

I'm no longer getting the assy dump but still no sound.  I think that it Fedora's wireplumber sound system which is totally disfunctional and does everything it "thinks" I need to do instead of what I configure it to do.
Title: Re: Unknown exception code 32
Post by: Martin_fr on January 28, 2023, 09:00:40 pm
Quote
Now if I F8 or F9 from that problematic line I no longer crash but get no change
You mean the debugged project does not step, nor continue to run ?


Menu: View > Ide Internals > Debug Output
Open that window before you start debugging, then when the problem happens copy the last about 50 lines.
Title: Re: Unknown exception code 32
Post by: Martin_fr on January 28, 2023, 09:05:09 pm
Error 32 is NOT a Freepascal or Lazarus error....

Good point.  It may be a rather badly trapped error in the uos code which is reporting a pseudo-windowsey error message.

I'm no longer getting the assy dump but still no sound.  I think that it Fedora's wireplumber sound system which is totally disfunctional and does everything it "thinks" I need to do instead of what I configure it to do.

Indeed, it likely is part of a signal sent to the process (and first presented to the debugger).

However I could not find a signal corresponding to 32. Yet it could be, that other bits in the signal are set, and not reported.

I was hoping gdb would then report more info.



The -dDebuglnLinuxDebugEvents  option was to make FpDebug to print some info to the console, to see what exactly the OS had reported (resulting in the 32 given by FpDebug).
Title: Re: Unknown exception code 32
Post by: Leledumbo on February 02, 2023, 10:18:23 am
Error 32 is broken pipe, this can have quite a range of root cause. Try checking your audio server logs.
Title: Re: Unknown exception code 32
Post by: lazer on February 02, 2023, 10:40:28 am
Ah thanks, that makes sense in this context.

The issue is resolved now, can't recall what it was.  [Oh, look, there's an orange castle down there surrounded by plastic coral. I wonder where it came from ]
TinyPortal © 2005-2018