wxHtml crashes my program no more

0 views
Skip to first unread message

Pascal Baspeyras

unread,
Aug 24, 2001, 4:42:25 AM8/24/01
to wx-u...@lists.wxwindows.org
At last, I found out why my program crashed as soon as I used a
wxHtmlWindow !!
But I haven't completely solved the problem yet ...
Let me explain:
In fact, the program crashed because there was no modem in my
computer, and thus, it couldn't initialize the gsocket module.
What ????? But I don't want any of that !!!
So if I install a modem, the program works fine ... after having
established a connection with the net...
And all I did was creating a wxHtmlWindow object on the heap, that's
all.

I'm bringing you the news. I will try to solve the mysterie tomorrow.
But if you have an idea on what's happening, do not hesitate to make
me save my time ( I have already lost a full week on this ).

Pascal


Guillermo Rodriguez Garcia

unread,
Aug 24, 2001, 4:54:16 AM8/24/01
to wx-u...@lists.wxwindows.org
Is this on the Mac or where?

>_______________________________________________
>wx-users mailing list
>wx-u...@lists.wxwindows.org
>http://lists.wxwindows.org/mailman/listinfo/wx-users


Stefan Csomor

unread,
Aug 24, 2001, 5:33:00 AM8/24/01
to wx-u...@lists.wxwindows.org
actually if you have the debugger enabled you should have received an error
message on the log window, telling that the OpenTransport initialization
failed, if you have a newer system the tcp/ip autoconnect should not happen
automatically since you can tell it to open the connection only when needed.

Stefan

Guillermo Rodriguez Garcia

unread,
Aug 24, 2001, 6:11:46 AM8/24/01
to wx-u...@lists.wxwindows.org
Weren't we going to change this to use delayed initialisation instead?

Bob Paddock

unread,
Aug 24, 2001, 6:08:40 AM8/24/01
to wx-u...@lists.wxwindows.org
On Friday 24 August 2001 04:42 am, you wrote:
> At last, I found out why my program crashed as soon as I used a
> wxHtmlWindow !!

I've had problems where missformed HTML pages crash wxHtmlWindow. Take the
output of Micro$oft Power Point or Word and it crashes all most every time if
used as the input to wxHtmlWindow. Its not wxHtmlWindow's fault. Microsoft
fails all validation tests and such, at http://www.w3c.org/ .

Use 'tidy' from http://www.w3c.org to make sure you feed wxHtmlWindows only
valid HTML.


Stefan Csomor

unread,
Aug 24, 2001, 6:07:02 AM8/24/01
to wx-u...@lists.wxwindows.org
Right... ;-)

Stefan

-----Original Message-----
From: wx-user...@lists.wxwindows.org
[mailto:wx-user...@lists.wxwindows.org]On Behalf Of Guillermo
Rodriguez Garcia
Sent: Freitag, 24. August 2001 12:12
To: wx-u...@lists.wxwindows.org
Subject: RE: wxHtml crashes my program no more


Weren't we going to change this to use delayed initialisation instead?

At 11:33 AM 8/24/01 +0200, Stefan Csomor wrote:
>actually if you have the debugger enabled you should have received an error
>message on the log window, telling that the OpenTransport initialization
>failed, if you have a newer system the tcp/ip autoconnect should not happen
>automatically since you can tell it to open the connection only when
needed.
>
>Stefan
>
>-----Original Message-----
>From: wx-user...@lists.wxwindows.org
>[mailto:wx-user...@lists.wxwindows.org]On Behalf Of Pascal Baspeyras
>Sent: Freitag, 24. August 2001 10:42
>To: wx-u...@lists.wxwindows.org
>Subject: wxHtml crashes my program no more
>
>

>At last, I found out why my program crashed as soon as I used a
>wxHtmlWindow !!

Guillermo Rodriguez Garcia

unread,
Aug 24, 2001, 6:44:26 AM8/24/01
to wx-u...@lists.wxwindows.org
:) Will you do it? I don't have any Mac knowledge. In any case, as
long as the public GSocket API remains the same it should be OK...

Pascal Baspeyras

unread,
Aug 24, 2001, 11:47:54 AM8/24/01
to wx-u...@lists.wxwindows.org
Guillermo Rodriguez Garcia <gui...@iies.es> asked me what system I was
using:
This problem occurs when I am working on my macintosh Powerbook 5300
with Mac OS 8.6 + wxWindows 2.3.1 + Codewarrior 5.3 + Universal
Interfaces 3.4, but I guess it would be the same with an older version
of wxWindows, or with the latest CVS version ( still to be checked ).
But when I compile the same lines of code on my PC, wxHtmlWindow runs
without trying to connect to the internet, which seems more normal to
me.
Thus, the difference must be in the project settings, or in the
setup.h file I used to compile the library, or somewhere else ...


"Stefan Csomor" <cso...@advancedconcepts.ch> wrote:
> actually if you have the debugger enabled you should have received an error
> message on the log window, telling that the OpenTransport initialization
> failed, if you have a newer system the tcp/ip autoconnect should not happen
> automatically since you can tell it to open the connection only when needed.

The debugger does not send me any error message on the log window.
All it says about OpenTransport is that NavigationLib, OTInetLib,
OTClientUtilLib, OTUtilityLib and OTGlobalLib are loaded.
If the program exits when I don't have a modem installed, it's because
its initialisation fails, because wxModule::InitializeModules returned
FALSE, becauseGSocket_Init() returned FALSE, because
OTOpenInternetServices() returned a null InetSvcRef.
I didn't get what you meant by 'newer system'.
All I know is that I am before all interested in wxHtml to build a
nice interface, and I'd also like to use it as a web browser, but only
when desired...
There is not yet in my program any line of code about any internet
facilities !! But at the same time, I don't see any member function in
wxHtmlWindows to choose from working online or offline. This is a
point I definitively have to dig: how wxHtmlWindow interacts with
sockets.

Bob Paddock <bpad...@csonline.net> wrote:
> I've had problems where missformed HTML pages crash wxHtmlWindow. Take the
> output of Micro$oft Power Point or Word and it crashes all most every time if
> used as the input to wxHtmlWindow. Its not wxHtmlWindow's fault. Microsoft
> fails all validation tests and such, at http://www.w3c.org/ .
>
> Use 'tidy' from http://www.w3c.org to make sure you feed wxHtmlWindows only
> valid HTML.

Thanks for the 'tidy' info, I may need it later.


Stefan Csomor

unread,
Aug 24, 2001, 2:31:40 PM8/24/01
to wx-u...@lists.wxwindows.org
On 24.8.2001 17:47 Uhr, "Pascal Baspeyras" <bas...@yahoo.com> wrote:

> Guillermo Rodriguez Garcia <gui...@iies.es> asked me what system I was
> using:
> This problem occurs when I am working on my macintosh Powerbook 5300
> with Mac OS 8.6 + wxWindows 2.3.1 + Codewarrior 5.3 + Universal
> Interfaces 3.4, but I guess it would be the same with an older version
> of wxWindows, or with the latest CVS version ( still to be checked ).
> But when I compile the same lines of code on my PC, wxHtmlWindow runs
> without trying to connect to the internet, which seems more normal to
> me.

absolutely agreed, you can init the winsock without connecting, but you
couldn't init opentransport in some versions without tcp/ip trying to
connect to the internet (in case of no LAN tcp/ip setting). when you open
the tcp/ip control panel, after clicking <options> on the lower right, you
have the option to check <load only when needed> checking this option
avoided having the tcp/ip dial-in module starting a connection directly when
initialized instead of only when the first real socket connection was
opened. in which OT version this was changed is not known to me anymore, but
I should do a late init for this anyway, so I'll change the code anyway

> Thus, the difference must be in the project settings, or in the
> setup.h file I used to compile the library, or somewhere else ...
>
>
> "Stefan Csomor" <cso...@advancedconcepts.ch> wrote:
>> actually if you have the debugger enabled you should have received an error
>> message on the log window, telling that the OpenTransport initialization
>> failed, if you have a newer system the tcp/ip autoconnect should not happen
>> automatically since you can tell it to open the connection only when needed.
>
> The debugger does not send me any error message on the log window.
> All it says about OpenTransport is that NavigationLib, OTInetLib,
> OTClientUtilLib, OTUtilityLib and OTGlobalLib are loaded.
> If the program exits when I don't have a modem installed, it's because
> its initialisation fails, because wxModule::InitializeModules returned
> FALSE, becauseGSocket_Init() returned FALSE, because
> OTOpenInternetServices() returned a null InetSvcRef.
> I didn't get what you meant by 'newer system'.
> All I know is that I am before all interested in wxHtml to build a
> nice interface, and I'd also like to use it as a web browser, but only
> when desired...
> There is not yet in my program any line of code about any internet
> facilities !! But at the same time, I don't see any member function in
> wxHtmlWindows to choose from working online or offline. This is a
> point I definitively have to dig: how wxHtmlWindow interacts with
> sockets.

wxHtml handles everything through the use of file handlers, for the net the
fs_inet is responsible for handling the protocols that go outside

Stefan


Guillermo Rodriguez Garcia

unread,
Aug 24, 2001, 4:48:52 PM8/24/01
to wx-u...@lists.wxwindows.org
This is a Mac issue where the initialisation of GSocket should be delayed
until a socket is actually created (or until some address query is done
through a wxInetAddress object). Should be fixed in a near future.
Unfortunately I don't know anything about Mac and cannot do it myself.

Sorry for the trouble,
G.

Reply all
Reply to author
Forward
0 new messages