AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Object-Pascal / Delphi-Language D2009 - IDE reagiert nicht mehr bei bestimmtem Befehl mit Windows 11
Thema durchsuchen
Ansicht
Themen-Optionen

D2009 - IDE reagiert nicht mehr bei bestimmtem Befehl mit Windows 11

Ein Thema von colaflasche · begonnen am 2. Sep 2023 · letzter Beitrag vom 5. Sep 2023
Antwort Antwort
colaflasche

Registriert seit: 1. Jun 2007
33 Beiträge
 
#1

D2009 - IDE reagiert nicht mehr bei bestimmtem Befehl mit Windows 11

  Alt 2. Sep 2023, 21:44
Delphi-Version: 2009
Guten Tag zusammen,

ich starte ein Programm aus Delphi 2009 mit Debugger. Wenn ich an diese Zeilen komme, reagiert das Programm nicht mehr und die IDE friert auch ein, also reagiert nicht mehr.

Delphi-Quellcode:
    MMSystem.PlaySound('MenuPopup', 0,
      SND_ALIAS or SND_ASYNC or SND_NODEFAULT or SND_NOWAIT);

Das selbe hat unter Windows 10 noch funktioniert.
Wenn ich mein Programm ohne Debugger ausführe, startet es und führt die Zeile aus.
Es ist leicht nachstellbar, da die Unit MMSystem mit Delphi ausgeliefert wird.

Das ganz habe ich auf zwei Rechnern getestet, auf beiden das selbe Ergebnis.
Diese Zeilen in einer neueren Delphiversion (10.3) sind kein Problem, allerdings ist es keine Option, das gesamte Projekt zu migrieren.

Hat jemand eine Idee, was hier das Problem sein könnte?
Gruß Jan

Geändert von colaflasche ( 2. Sep 2023 um 21:48 Uhr)
  Mit Zitat antworten Zitat
Benutzerbild von jaenicke
jaenicke

Registriert seit: 10. Jun 2003
Ort: Berlin
9.353 Beiträge
 
Delphi 11 Alexandria
 
#2

AW: D2009 - IDE reagiert nicht mehr bei bestimmtem Befehl mit Windows 11

  Alt 2. Sep 2023, 22:36
PlaySound ist alt und macht unter Windows 11 einige Probleme, Delphi 2009 ist auch steinalt. Das macht einfach wenig Sinn, das unter Windows 11 zu betreiben. Wie wäre es mit einer VM mit einer passenderen Windowsversion?

Lösen lässt sich das einfach, indem du die Zeile per if not IsDebuggerPresent then nur ausführst, wenn das Programm gerade nicht debuggt wird.
Sebastian Jänicke
Alle eigenen Projekte sind eingestellt, ebenso meine Homepage, Downloadlinks usw. im Forum bleiben aktiv!
  Mit Zitat antworten Zitat
Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.164 Beiträge
 
Delphi 12 Athens
 
#3

AW: D2009 - IDE reagiert nicht mehr bei bestimmtem Befehl mit Windows 11

  Alt 2. Sep 2023, 22:51
Njoar, 23 Jahre ist für eine API nicht soooo alt, aber dass man Diese nicht mehr in der aktuellen Hilfe findet, sagt schon alles.

Da das eine WinAPI ist und direkt eine Funktion im Windows aufgerufen wird, ist es per se egal, welche Delphiversion genutzt wird, also von Delphi 2 bis 11.3.
Aber natürlich sind die Debugger unterschiedlich und es kann sein, dass der Debugger unter Windows 11 schon ein paar Probleme hat.
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests
  Mit Zitat antworten Zitat
Kas Ob.

Registriert seit: 3. Sep 2023
214 Beiträge
 
#4

AW: D2009 - IDE reagiert nicht mehr bei bestimmtem Befehl mit Windows 11

  Alt 3. Sep 2023, 09:48
Hi everyone,

Sorry for using English (bad English though), and hope you mind me writing in non German.

Does anyone have an idea what could be the problem here?
I saw such behaviour years ago, half the problem falls on old Delphi debuggers, the other half with this specific bug is on the Windows OS installed codecs (audio and video).
Many old codecs where proprietary and needed a license also used some sort of protection against debugging, this caused a lot of troubles with many debuggers (not only Delphi's), also that old API "PlaySound" is there and will work forever as is it, the problem with it that it does populate all the installed codecs to decide which one to use and this might trigger some protection or DRM code to execute, Delphi Debugger on other hand just fail to handle some rare and exotic exceptions.

Suggested solutions:
1) Verify the encoding of that audio file, and try to use PCM (wave uncompressed format) or may be different one might solve this, I recommend PCM as never witnessed such a problem with PCM.
2) Check the installed codecs, SysInternals Autoruns will show the installed module but will not show the logical codec themselves, this enough to see and disable the culprit, or at least put your finger on the problem.

Hope that helps.
  Mit Zitat antworten Zitat
colaflasche

Registriert seit: 1. Jun 2007
33 Beiträge
 
#5

AW: D2009 - IDE reagiert nicht mehr bei bestimmtem Befehl mit Windows 11

  Alt 5. Sep 2023, 15:40
Danke an alle.

@jaenicke: Das mit der VM war auch mein Notfallplan.
Gruß Jan
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:52 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz