Autor Beitrag
neo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179



BeitragVerfasst: Sa 31.12.05 15:14 
Ich habe ein Programm geschrieben, welches ohne Fehler/Stack Überläufe etc. rennt, daher eigentlich fehlerfrei. Leider ist es das aber nur der Fall, wenn ich es aus Delphi heraus starte.

Wenn ich die kompilierte exe über den Explorer öffne, bekomme ich bei einer Funktion immer eine "Ungültige Gleitkommaoperation" und "Divisionen durch 0", obwohl ich an dieser Stelle gar nichts berechne.

Was kann ich dagegen machen?
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Sa 31.12.05 15:41 
user profile iconneo hat folgendes geschrieben:
Was kann ich dagegen machen?
Den Fehler beheben. Wo er liegt, kann ich so nicht sagen.

_________________
We are, we were and will not be.
neo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179



BeitragVerfasst: Sa 31.12.05 15:48 
Titel: Re: Prog läuft über Delphi fehlerfrei -> Über Explorer Fehle
user profile iconGausi hat folgendes geschrieben:
user profile iconneo hat folgendes geschrieben:
Was kann ich dagegen machen?
Den Fehler beheben.


Das war genau die Antwort die ich mir gewünscht habe
DarkHunter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 477

Win XP
D3 Prof, D2005 PE
BeitragVerfasst: Sa 31.12.05 15:56 
Irgendwie klingt das für mich danach das du von 2 verschiedenen Programmen redest.
Ich hatte dasselber mal, das ich eine andere (ältere) Exe aus geführt habe und mich gewundert habe, warum der die neuen Änderungen (die unter Delphi sichtbar sind) nicht übernimmt.
Bis ich gemerkt habe das es eine alter Version der Exe war.

Eigentlich aber eher unwahrscheinlich :D

_________________
I believe that every human has a finite number of heart-beats. I don't intend to waste any of mine running around doing exercises.
- Neil Armstrong
neo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179



BeitragVerfasst: Sa 31.12.05 16:05 
Titel: @darkhunter
@ darkhunter:
nein ich nehm schon die richtige datei ;)
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Sa 31.12.05 16:09 
Titel: Re: Prog läuft über Delphi fehlerfrei -> Über Explorer Fehle
user profile iconneo hat folgendes geschrieben:

Das war genau die Antwort die ich mir gewünscht habe

Das war aber die einzig mögliche ;). Wie soll man ohne ein code-schnippsel dir helfen wollen/können, wenn wir nicht wissen, was du in deiner "Funktion" machst?

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Sa 31.12.05 16:13 
irgendwo teilst du durch 0 das musst du verhindern :!:
neo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179



BeitragVerfasst: Sa 31.12.05 18:19 
Ich habs jetzt mal über die russische Methode

ausblenden Delphi-Quelltext
1:
2:
3:
4:
TRY
...
Except
end;


gelöst. Es gibt an dieser Stelle nämlich keinen wirklichen Fehler, da alle Aktionen genauso ausgeführt werden, wie sie sollen

Dafür bekomme ich an einer anderen Stelle vom Explorer einen Fehler, wo Delphi nicht mal wenn ich "Bei Exception stoppen" anklicke etwas anzeigt?!?
Jailbird
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 127

Windows XP Pro SP2
Delphi 7 Professional
BeitragVerfasst: Sa 31.12.05 18:24 
Ohne Code können wir nicht helfen. Ende der Durchsage :-)

PS. Guten Rutsch ins hoffentlich gute, neue Jahr
neo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179



BeitragVerfasst: Sa 31.12.05 18:34 
user profile iconJailbird hat folgendes geschrieben:
Ohne Code können wir nicht helfen. Ende der Durchsage :-)


Das ist mir doch eh klar. Nur der Code wäre sehr sehr lange, weil da viele verschachtelte Funktionen drinnen sind, das möchte ich euch auch nicht zumuten ;)
MisterBum83
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 245
Erhaltene Danke: 2

WIN XP
Delphi 6
BeitragVerfasst: Sa 31.12.05 18:44 
Pech gehabt!!!!!!
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Sa 31.12.05 18:48 
Dann versuche, die Funktion zu finden, die den Fehler verursacht. Teste durch, an welcher Stelle im Programm es hakt. Ins blaue zu raten, wo der Fehler liegt, bringt gar nichts. Fest steht durch die Fehlermeldung, dass irgendwo eine Berechnung schiefläuft. Stelle fest wo, und man kann dir helfen ;-)

_________________
We are, we were and will not be.
neo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179



BeitragVerfasst: Sa 31.12.05 18:50 
so jetzt kann ich doch mit Code dienen, da ich wirklich jede Zeile durchgegangen bin, bis ich die Fehlerquelle hatte:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
procedure LoadSong2Deck(Deck:TBassChannel;flag:String);
begin

        if Deck.Status=sndplaying then
        if Application.MessageBox('really stop playing to load new file?','really stop playing to load new file?',MB_YESNO)=7 then
        exit;
        
        form1.Caption:=strfile; //zum debuggen
        TRY
        Deck.LoadFromFile(strFile); //Hier passiert der Fehler
        except
        //ShowMessage('hier ist der fehler/error');
        end;

        ResetInfos(flag);
        Form1.lbxPlaylist.Items.Delete(0);
        if Form1.lbxPlaylist.Items.Count>0 then
        UpdateOnDeck()
        else
        Form1.lblonDeck.Caption:='';
end;


Also die anderen Funktionen die aufgerufen werden, passen alle, ich hab eh markiert wo der Fehler passiert. Das komische ist nur: Diese Funktion wird auch früher im Programm schon einmal aufgerufen, und da funktioniert alles ohne Probleme. Der Dateiname ist auch zu 100% richtig.
Über Delühi gestartet gibt es keine Probleme, über den Explorer macht die markierte Zeile den Fehler: "Ungültige Gleitkommaoperation"

Um noch zu beschreiben was hier passiert: Einem Channel des BassPlayers wird eine Datei übergeben, die geladen werden soll
//edit: strFile ist eine globale Variable, in der der Dateiname steht
Jailbird
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 127

Windows XP Pro SP2
Delphi 7 Professional
BeitragVerfasst: Sa 31.12.05 19:01 
nur der dateiname oder der ganze pfad + dateiname? ich vermute, dass das aktuelle verzeichnis (working directory) nämlich nicht stimmt :)
neo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179



BeitragVerfasst: Sa 31.12.05 19:10 
nein die stimmen 100%ig, ich kann genau diese funktion auch über ein popup menü aufrufen, und da funktioniert es immer..
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: Sa 31.12.05 19:59 
Und wie stehts mit der Funktion LoadFromFile? Weil TBassChannel entstammt doch einer Fremdwkomponente, kann da vllcht ein Fehler drinnen sein?

_________________
Programmers never die, they just GOSUB without RETURN
neo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179



BeitragVerfasst: So 01.01.06 13:51 
Titel: re:
Wie schon gesagt, ich führe an früherer Stelle genau diese Prozedur auch schon aus, und da funzt alles ohne Probleme..

//edit:
Ich habe jetzt ein Beispiel von dem Entwickler des TBassPlayers durchgearbeitet (omata), und gesehen, dass er den Fehler auch ganz unregelmäßig erhält, das dürfte also ein Fehler in diesen Units sein..
alias5000
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2145

WinXP Prof SP2, Ubuntu 9.04
C/C++(Code::Blocks, VS.NET),A51(Keil),Object Pascal(D2005PE, Turbo Delphi Explorer) C# (VS 2008 Express)
BeitragVerfasst: So 01.01.06 14:23 
siehste?

_________________
Programmers never die, they just GOSUB without RETURN
neo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179



BeitragVerfasst: So 01.01.06 14:35 
user profile iconalias5000 hat folgendes geschrieben:
siehste?


ja aber mit dem rechnet man halt auch nicht, vorallem weil ich schon mit früheren Versionen dieser Units gearbeitet habe, und da war immer alles ok