Author Topic: Delphi 2 & 3 - INT64  (Read 46010 times)

fredvs

  • Posts: 325
Re: Delphi 2 & 3 - INT64
« Reply #50 on: 23 May '03 - 20:09 »
Hi DP.

What is this option "tools-exception...".

I have noted that with my d3, i cant run and debug big apps.
I have to compiled it, close delphi, run the exe, see the debug then, cose the app, reload delphi, change the wrong code, etc...

DanaPaul

  • Posts: 335
Re: Delphi 2 & 3 - INT64
« Reply #51 on: 23 May '03 - 20:18 »

Quote

What is this option "tools-exception...".


When running apps in the Delphi IDE this option controls whether all Exceptions stop and display a dialog box, or only untrapped exceptions.  The latter being normal behavour when the app is compiled and run outside of the IDE.

Quote

I have noted that with my d3, i cant run and debug big apps.
I have to compiled it, close delphi, run the exe, see the debug then, cose the app, reload delphi, change the wrong code, etc...


This is a seriuos issue.  I'd solve this, or make smaller apps.

fredvs

  • Posts: 325
Re: Delphi 2 & 3 - INT64
« Reply #52 on: 23 May '03 - 20:24 »
Hi dp

Quote
When running apps in the Delphi IDE this option controls whether all Exceptions stop and display a dialog box, or only untrapped exceptions.  The latter being normal behavour when the app is compiled and run outside of the IDE.



OK perfect, i agree, but please say me where i can change that option with delphi, where is that checkbox...

Quote
I'd solve this,



Hummm, yes, congratulation, and how... :-/

DanaPaul

  • Posts: 335
Re: Delphi 2 & 3 - INT64
« Reply #53 on: 23 May '03 - 20:27 »

Quote

i dont see the option, : Tools- Exception... in my Delphi 3 Client-server version even not in my Delphi 2 version...


Ummm, how 'bout "Break On Exception" in D2 :)

DanaPaul

  • Posts: 335
Re: Delphi 2 & 3 - INT64
« Reply #54 on: 23 May '03 - 20:30 »

Quote

Hummm, yes, congratulation, and how... :-/


Rebuild the app, unit by unit, component by component, and test[/u] it every step of the way.  This will isolate the probelm area.

fredvs

  • Posts: 325
Re: Delphi 2 & 3 - INT64
« Reply #55 on: 23 May '03 - 20:40 »
Thanks DP

I agree totaly with you.

I dont know if you have test the last release of MixK.
http://members.lycos.co.uk/mixk/

It is compiled with one of your bass.pas, basswma.pas, basscd.pas headers (20/05/03).

On my pc, i dont have find any more exceptions, it is only if i recompile it with your new release that i get this "Handle is not valid" messages...

But perhaps on your pc, you get also those "invalid handle" messages with your old header...
« Last Edit: 23 May '03 - 20:42 by fredvs »

DanaPaul

  • Posts: 335
Re: Delphi 2 & 3 - INT64
« Reply #56 on: 23 May '03 - 20:43 »

Quote

On my pc, i dont have find any more exceptions, it is only with your new release that i get this "Handle is not valid" messages...


Then I think that we agree to disagree :)

Quote

But perhaps on your pc, you get also those "invalid handle" messages with your old header...


Nope, sorry.  Negative answer for both headers, new and old. :)

DanaPaul

  • Posts: 335
Re: Delphi 2 & 3 - INT64
« Reply #57 on: 23 May '03 - 20:52 »
However, I can probably tell you where your ap is having a problem (you can't debug so, in that vein...)

fChannel := BASS_StreamCreateFile()
if fChannel = 0 then
 fChannel := BASS_WMA_StreamCreateFile()
if fChannel = 0 then
 fChannel := BASS_MusicLoad()

Neither BASS_WMA_StreamCreateFile nor BASS_MusicLoad will execute if Bass returns a nil result for BASS_StreamCreateFile.  IE: The media format wasn't supported.

Make sense? :)

fredvs

  • Posts: 325
Re: Delphi 2 & 3 - INT64
« Reply #58 on: 23 May '03 - 21:05 »
Hi DP
Quote
Nope, sorry.  Negative answer for both headers, new and old.  


Humm, are you token about MixK or your header on your pc ( the relase on the net is with your old release just before you have changed bassdllload into loadbassdll)?


fredvs

  • Posts: 325
Re: Delphi 2 & 3 - INT64
« Reply #59 on: 23 May '03 - 21:09 »
Hi DP

Quote
fChannel := BASS_StreamCreateFile()
if fChannel = 0 then
fChannel := BASS_WMA_StreamCreateFile()
if fChannel = 0 then
fChannel := BASS_MusicLoad()


It is exactly what i use in my app ("fChannel" is "Str").
What have i to change and how can you see the source ?
« Last Edit: 23 May '03 - 21:11 by fredvs »

DanaPaul

  • Posts: 335
Re: Delphi 2 & 3 - INT64
« Reply #60 on: 23 May '03 - 21:11 »

Quote

Humm, are you token about MixK or your header on your pc ( the relase on the net is with your old release just before you have changed bassdllload into loadbassdll)?

Reference to the header files.

Fred, in all honesty, until you are able to debug your app all discussions about headers and apps are, well... pointless. Rebuild from scratch and go forth :)

DanaPaul

  • Posts: 335
Re: Delphi 2 & 3 - INT64
« Reply #61 on: 23 May '03 - 21:25 »

Quote

It is exactly what i use in my app ("fChannel" is "Str").
What have i to change and how can you see the source ?


I can't see your source, I guessed :)

Try
 fChannel := BASS_StreamCreateFile();
Except
 on EBass do begin
   Try
     fChannel := BASS_WMA_StreamCreateFile();
   Except
     on EBass do
       fChannel := BASS_MusicLoad();
     else raise;
     end;
   end;
 else raise;
 end;

fredvs

  • Posts: 325
Re: Delphi 2 & 3 - INT64
« Reply #62 on: 23 May '03 - 21:26 »
Hi DP

Quote
Fred, in all honesty, until you are able to debug your app all discussions about headers


You right, but i can debug my apps, i compile it with the integrated debuging option, and i run the app with the exe then i get my errors.

When i dont find any more error messages, i recompile it without integrated debugging (less Kb) and i give the app for beta test.

I only wanted to say you that all your bass.pas header where perfect, very usefull to find bugs with the integrated debugger, and at one moment, it was perfect, no more errors, but with your very last release, i have get problems.

I m very sorry to have spend your time and your brain.

Excuse-me

DanaPaul

  • Posts: 335
Re: Delphi 2 & 3 - INT64
« Reply #63 on: 23 May '03 - 21:34 »

Quote

i can debug my apps, i compile it with the integrated debuging option, and i run the app with the exe then i get my errors.


QQps, I stand corrected.  My appologies :)

DanaPaul

  • Posts: 335
Re: Delphi 2 & 3 - INT64
« Reply #64 on: 23 May '03 - 21:56 »
Fred, you have mail.  Attached is the header file that fixes Get/Set Position and doesn't have (exception) full error checking (you can do this on your own.)

fredvs

  • Posts: 325
Re: Delphi 2 & 3 - INT64
« Reply #65 on: 24 May '03 - 07:46 »
Hi DP.

My appologies, you where right and your last header is perfect for debugging.

Thanks to your last header i have learned lots of things about bass that Ian dont say to us  :o:

For example : Dont try to BASS_ChannelGetLevel(str) if your stream is Paused, you will raise a error, dont try to BASS_ChannelSetAttributes(str) if str = 0, etc...

Thanks a lot  :-*, your header is realy a must. (and i have to re-check my 60.000 lines, no music this we :-/)  



« Last Edit: 24 May '03 - 07:50 by fredvs »

DanaPaul

  • Posts: 335
Re: Delphi 2 & 3 - INT64
« Reply #66 on: 24 May '03 - 11:24 »
Thanks to Fred's very helpful suggestion, I have added a more descriptive message string to the more generic error messages.  "Unknown error at : StreamCreate".  This will be very useful if/when nesting calls.  Some of these error strings have already been posted.  The remainder will be a work in progress.

Shiny happy people :)

fredvs

  • Posts: 325
Re: Delphi 2 & 3 - INT64
« Reply #67 on: 24 May '03 - 14:20 »
Hi DP

Thanks a lot for your great job.

And if gives a  bemol to Bass, some of the bass-delphi samples raise hidden error (sorry Ian...), if compiled with your header.

Example :
Quote
str := BASS_StreamCreateFile();
         if str = 0 then BASS_WMA_StreamCreateFile();
         if str =0 then BASS_MusicLoad();

Raise a exception with your header (of course i have changed it with a try...expect code.)
« Last Edit: 24 May '03 - 14:22 by fredvs »

DanaPaul

  • Posts: 335
Re: Delphi 2 & 3 - INT64
« Reply #68 on: 24 May '03 - 14:45 »
Well, the error is no longer hidden if it is "raised", eh?:)

Every developer has decisions to make as to exactly how they wish to handle very specific situations.  However, any situation that has an application plowing along with a nil stream, or nil channel is a bad situation.

Back to multiple instances and creating a second copy of the Bass library on the fly. Not all developers will stick to creating a Temp file, nor will all developers park files loosely on the disk.  Some may unpack files from a *.cab, and/or make permanent copies once installed.
« Last Edit: 24 May '03 - 14:50 by DanaPaul »